From 3de76b0ebc002728c13c25c040acee737f3efb4d Mon Sep 17 00:00:00 2001 From: Jan Jakes Date: Tue, 12 Nov 2024 15:39:46 +0100 Subject: [PATCH] =?UTF-8?q?fixup!=20Move=20empty=20rule=20(=CE=B5)=20const?= =?UTF-8?q?ant=20to=20WP=5FParser=5FGrammar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grammar-tools/convert-grammar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar-tools/convert-grammar.php b/grammar-tools/convert-grammar.php index b3db8c5a..5289adc1 100644 --- a/grammar-tools/convert-grammar.php +++ b/grammar-tools/convert-grammar.php @@ -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;