1
0
forked from Mirror/wren
This commit is contained in:
Bob Nystrom
2014-02-14 20:15:49 -08:00
parent ea3cfa05bd
commit b1bae8fc6c
2 changed files with 7 additions and 0 deletions

View File

@ -2546,6 +2546,9 @@ static void classDefinition(Compiler* compiler)
// Define the method.
emitShort(compiler, instruction, methodSymbol);
// Don't require a newline after the last definition.
if (match(compiler, TOKEN_RIGHT_BRACE)) break;
consume(compiler, TOKEN_LINE,
"Expect newline after definition in class.");
}

View File

@ -5,3 +5,7 @@ class A {}
class B {
}
// No newline after last method.
class C {
method {} }