fix: allow class body to end without newline after last method definition
In classDefinition in wren_compiler.c, add a check for TOKEN_RIGHT_BRACE before requiring a newline after the last method definition, so that a closing brace immediately following a method is accepted. Update test/class/syntax.wren with a test case for this syntax.
This commit is contained in:
@@ -5,3 +5,7 @@ class A {}
|
||||
class B {
|
||||
|
||||
}
|
||||
|
||||
// No newline after last method.
|
||||
class C {
|
||||
method {} }
|
||||
|
||||
Reference in New Issue
Block a user