From dce714b2598c41e36113a4339fb9fb14655bc090 Mon Sep 17 00:00:00 2001 From: Khaled Hammouda Date: Mon, 24 Jul 2023 13:48:41 -0400 Subject: [PATCH] Fix grammar top rule (#22325) change stmt to complexOrSimpleStmt in the top grammar rule --- compiler/parser.nim | 2 +- doc/grammar.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/parser.nim b/compiler/parser.nim index 1b8fd70a60..7d12c2a785 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -310,7 +310,7 @@ proc checkBinary(p: Parser) {.inline.} = if p.tok.spacing == {tsTrailing}: parMessage(p, warnInconsistentSpacing, prettyTok(p.tok)) -#| module = stmt ^* (';' / IND{=}) +#| module = complexOrSimpleStmt ^* (';' / IND{=}) #| #| comma = ',' COMMENT? #| semicolon = ';' COMMENT? diff --git a/doc/grammar.txt b/doc/grammar.txt index 458eeb54a6..3096eecb52 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -1,5 +1,5 @@ # This file is generated by compiler/parser.nim. -module = stmt ^* (';' / IND{=}) +module = complexOrSimpleStmt ^* (';' / IND{=}) comma = ',' COMMENT? semicolon = ';' COMMENT? colon = ':' COMMENT?