Skip to content

Commit

Permalink
fixup! Move empty rule (ε) constant to WP_Parser_Grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
JanJakes committed Nov 12, 2024
1 parent d00c591 commit 3de76b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grammar-tools/convert-grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function export_as_php_var( $variable ) {
foreach ( $branch as $i => $name ) {
$is_terminal = ! isset( $rule_id_by_name[ $name ] );
if ( $is_terminal ) {
$token_id = 'ε' === $name
$token_id = 'ε' === $name
? WP_Parser_Grammar::EMPTY_RULE_ID
: WP_MySQL_Lexer::get_token_id( $name );
$new_branch[] = $token_id;
Expand Down

0 comments on commit 3de76b0

Please sign in to comment.