diff options
Diffstat (limited to 'ext/tokenizer/tokenizer_data_gen.sh')
-rwxr-xr-x | ext/tokenizer/tokenizer_data_gen.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/tokenizer/tokenizer_data_gen.sh b/ext/tokenizer/tokenizer_data_gen.sh index 13384c8490..49ef7cbfa3 100755 --- a/ext/tokenizer/tokenizer_data_gen.sh +++ b/ext/tokenizer/tokenizer_data_gen.sh @@ -45,7 +45,10 @@ echo '/* echo 'void tokenizer_register_constants(INIT_FUNC_ARGS) {' >> $OUTFILE -$AWK '/^#define T_/ { print " REGISTER_LONG_CONSTANT(\"" $2 "\", " $2 ", CONST_CS | CONST_PERSISTENT);" }' < $INFILE >> $OUTFILE +$AWK ' + /^#define T_ERROR/ { next } + /^#define T_/ { print " REGISTER_LONG_CONSTANT(\"" $2 "\", " $2 ", CONST_CS | CONST_PERSISTENT);" } +' < $INFILE >> $OUTFILE echo ' REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT);' >> $OUTFILE echo '}' >> $OUTFILE @@ -61,6 +64,7 @@ $AWK ' print " case T_PAAMAYIM_NEKUDOTAYIM: return \"T_DOUBLE_COLON\";" next } + /^#define T_ERROR/ { next } /^#define T_/ { print " case " $2 ": return \"" $2 "\";" } |