|
@@ -135,7 +135,7 @@ namespace NTERA.Interpreter.Compiler
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- ExecutionNode value = null;
|
|
|
+ ExecutionNode value;
|
|
|
|
|
|
if (Enumerator.Current == Token.Increment)
|
|
|
{
|
|
@@ -260,7 +260,8 @@ namespace NTERA.Interpreter.Compiler
|
|
|
Enumerator.MoveNext();
|
|
|
|
|
|
while (Enumerator.Current != Token.NewLine
|
|
|
- && Enumerator.Current != Token.EOF)
|
|
|
+ && Enumerator.Current != Token.EOF
|
|
|
+ && Enumerator.Current != Token.RParen)
|
|
|
{
|
|
|
parameters.Add(Expression(out error));
|
|
|
if (error != null)
|
|
@@ -413,8 +414,9 @@ namespace NTERA.Interpreter.Compiler
|
|
|
{
|
|
|
return node;
|
|
|
}
|
|
|
- else if (GetNextToken(true) == Token.Colon
|
|
|
- || GetNextToken(true) == Token.Equal)
|
|
|
+
|
|
|
+ if (GetNextToken(true) == Token.Colon
|
|
|
+ || GetNextToken(true) == Token.Equal)
|
|
|
{
|
|
|
error = new ParserError($"Undeclared variable: {statementName}", node.Symbol);
|
|
|
return null;
|
|
@@ -697,6 +699,7 @@ namespace NTERA.Interpreter.Compiler
|
|
|
&& token != Token.Colon
|
|
|
&& token != Token.Format
|
|
|
&& token != Token.CloseBracket
|
|
|
+ && token != Token.RParen
|
|
|
&& (useModulo || token != Token.Modulo))
|
|
|
{
|
|
|
if (token == Token.Value)
|
|
@@ -824,7 +827,7 @@ namespace NTERA.Interpreter.Compiler
|
|
|
formatParams.Add(tempValue);
|
|
|
} while (Enumerator.Current == Token.Comma);
|
|
|
|
|
|
- var formattedValue = CallMethod("_FORMAT", symbolMarker, formatParams.ToArray());
|
|
|
+ var formattedValue = CallMethod("__FORMAT", symbolMarker, formatParams.ToArray());
|
|
|
|
|
|
value = value == null
|
|
|
? formattedValue
|