Merge branch 'msvc-project-and-compatibility' of git://github.com/MarcoLizza/wren into MarcoLizza-msvc-project-and-compatibility
This commit is contained in:
+17
-5
@@ -594,7 +594,7 @@ static void readUnicodeEscape(Parser* parser)
|
||||
break;
|
||||
}
|
||||
|
||||
char digit = readHexDigit(parser);
|
||||
int digit = readHexDigit(parser);
|
||||
if (digit == -1)
|
||||
{
|
||||
lexError(parser, "Invalid Unicode escape sequence.");
|
||||
@@ -2576,7 +2576,10 @@ void statement(Compiler* compiler)
|
||||
return;
|
||||
}
|
||||
|
||||
if (match(compiler, TOKEN_FOR)) return forStatement(compiler);
|
||||
if (match(compiler, TOKEN_FOR)) {
|
||||
forStatement(compiler);
|
||||
return;
|
||||
}
|
||||
|
||||
if (match(compiler, TOKEN_IF))
|
||||
{
|
||||
@@ -2629,7 +2632,10 @@ void statement(Compiler* compiler)
|
||||
return;
|
||||
}
|
||||
|
||||
if (match(compiler, TOKEN_WHILE)) return whileStatement(compiler);
|
||||
if (match(compiler, TOKEN_WHILE)) {
|
||||
whileStatement(compiler);
|
||||
return;
|
||||
}
|
||||
|
||||
// Expression statement.
|
||||
expression(compiler);
|
||||
@@ -2798,8 +2804,14 @@ static void variableDefinition(Compiler* compiler)
|
||||
// like the non-curly body of an if or while.
|
||||
void definition(Compiler* compiler)
|
||||
{
|
||||
if (match(compiler, TOKEN_CLASS)) return classDefinition(compiler);
|
||||
if (match(compiler, TOKEN_VAR)) return variableDefinition(compiler);
|
||||
if (match(compiler, TOKEN_CLASS)) {
|
||||
classDefinition(compiler);
|
||||
return;
|
||||
}
|
||||
if (match(compiler, TOKEN_VAR)) {
|
||||
variableDefinition(compiler);
|
||||
return;
|
||||
}
|
||||
|
||||
block(compiler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user