File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -840,8 +840,9 @@ export class Compiler {
840840 return this . asm . _functionDecls . at ( - 1 ) ;
841841 }
842842
843- compileRule ( name , ruleInfo ) {
843+ compileRule ( name ) {
844844 const { asm} = this ;
845+ const ruleInfo = getNotNull ( this . rules , name ) ;
845846 let paramTypes = [ ] ;
846847 if ( ruleInfo . patterns ) {
847848 paramTypes = [ w . valtype . i32 ] ;
@@ -1072,10 +1073,7 @@ export class Compiler {
10721073 ruleDecls . push ( this . compileTerminalRule ( name ) ) ;
10731074 } else {
10741075 assert ( ! name . startsWith ( '$term' ) ) ;
1075- const ruleInfo = ( this . _currRuleInfo = getNotNull ( this . rules , name ) ) ;
1076- this . _currRuleName = name ;
1077- ruleDecls . push ( this . compileRule ( name , ruleInfo ) ) ;
1078- this . _currRuleName = this . _currRuleInfo = undefined ;
1076+ ruleDecls . push ( this . compileRule ( name ) ) ;
10791077 }
10801078 }
10811079 const { asm} = this ;
You can’t perform that action at this time.
0 commit comments