Skip to content

Commit

Permalink
Make use of default actions
Browse files Browse the repository at this point in the history
For the default action $$ = $1, save the closure invocation.
  • Loading branch information
nikic committed Jul 9, 2023
1 parent 748aab3 commit b20267c
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 1,062 deletions.
4 changes: 1 addition & 3 deletions grammar/parser.template
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ class #(-p) extends \PhpParser\ParserAbstract
%b
},
#noact
%n => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos];
},
%n => null,
#endreduce
];
}
Expand Down

0 comments on commit b20267c

Please sign in to comment.