45 ExpressionSymbol* sym; |
45 ExpressionSymbol* sym; |
46 |
46 |
47 while ((sym = ParseSymbol()) != null) |
47 while ((sym = ParseSymbol()) != null) |
48 mSymbols << sym; |
48 mSymbols << sym; |
49 |
49 |
|
50 // If we were unable to get any expression symbols, something's wonky with |
|
51 // the script. Report an error. mBadTokenText is set to the token that |
|
52 // ParseSymbol ends at when it returns false. |
50 if (mSymbols.IsEmpty()) |
53 if (mSymbols.IsEmpty()) |
51 Error ("Expected expression"); |
54 Error ("unknown identifier '%1'", mBadTokenText); |
52 |
55 |
53 AdjustOperators(); |
56 AdjustOperators(); |
54 Verify(); |
57 Verify(); |
55 Evaluate(); |
58 Evaluate(); |
56 } |
59 } |