Something wrong with this, need to understand more
This commit is contained in:
parent
02c1aa507e
commit
e07f2be3fa
1 changed files with 5 additions and 4 deletions
|
|
@ -135,10 +135,11 @@ class FineGrammar(Grammar):
|
|||
# Block
|
||||
@rule("Block")
|
||||
def block(self) -> Rule:
|
||||
return seq(
|
||||
self.LCURLY,
|
||||
opt(opt(self._statement_list), self.expression)
|
||||
self.RCURLY,
|
||||
return (
|
||||
seq(self.LCURLY, self.RCURLY)
|
||||
| seq(self.LCURLY, self.expression, self.RCURLY)
|
||||
| seq(self.LCURLY, self._statement_list, self.RCURLY)
|
||||
| seq(self.LCURLY, self._statement_list, self.expression, self.RCURLY)
|
||||
)
|
||||
|
||||
@rule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue