Files
wren/test/class/syntax.wren
T
Bob Nystrom 5f505c2a02 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.
2014-02-15 04:15:49 +00:00

12 lines
115 B
Plaintext

// Empty body.
class A {}
// Newline body.
class B {
}
// No newline after last method.
class C {
method {} }