Skip to content

Commit a729aa3

Browse files
committed
Correct object initializer and declaration statement parsing
1 parent d13f7c7 commit a729aa3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/syntax.grammar

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ objectOrCollectionInit { objectInit | collectionInit }
623623
// Object initializers
624624

625625
objectInit {
626-
braces<csep1<memberInit>>
627-
| braces<csep0<memberInit> ','>
626+
braces<csep0<memberInit>>
627+
| braces<csep1<memberInit> ','>
628628
}
629629

630630
memberInit { InitializerTarget !assign '=' ref? initializerValue }
@@ -1074,14 +1074,14 @@ TopLevelLabeledStmt[group=Statement] { identifier ':' TopLevelStmt }
10741074
// Declaration statement
10751075

10761076
DeclStmt[group=Statement] {
1077-
LocalVarDecl
1078-
| LocalConstDecl
1077+
LocalVarDecl ';'
1078+
| LocalConstDecl ';'
10791079
| LocalFuncDecl
10801080
}
10811081

10821082
TopLevelDeclStmt[group=Statement] {
1083-
TopLevelVarDecl
1084-
| LocalConstDecl
1083+
TopLevelVarDecl ';'
1084+
| LocalConstDecl ';'
10851085
| TopLevelLocalFuncDecl
10861086
}
10871087

0 commit comments

Comments
 (0)