diff --git a/.github/workflows/update-vendored-files.yaml b/.github/workflows/update-vendored-files.yaml new file mode 100644 index 00000000..4eb7996e --- /dev/null +++ b/.github/workflows/update-vendored-files.yaml @@ -0,0 +1,25 @@ +name: Update Vendored Files + +on: + repository_dispatch: + types: rescrape + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +jobs: + update-files: + name: "Update Files" + runs-on: ubuntu-latest + steps: + - name: Update Files + uses: actions/checkout@v2 + - name: Run Download Script + run: | + ./vendor.sh download + - name: Upload Updated Files + run: | + git config --global user.name "Go Tree Sitter Bot" + git config --global user.email "smacker@users.noreply.github.com" + git commit -am "Updated vendor files" + git push diff --git a/lua/parser.c b/lua/parser.c index b7f746e7..87eac401 100644 Binary files a/lua/parser.c and b/lua/parser.c differ diff --git a/lua/parser.h b/lua/parser.h index a3a87bd1..cbbc7b4e 100644 --- a/lua/parser.h +++ b/lua/parser.h @@ -102,8 +102,8 @@ struct TSLanguage { const uint16_t *small_parse_table; const uint32_t *small_parse_table_map; const TSParseActionEntry *parse_actions; - const char **symbol_names; - const char **field_names; + const char * const *symbol_names; + const char * const *field_names; const TSFieldMapSlice *field_map_slices; const TSFieldMapEntry *field_map_entries; const TSSymbolMetadata *symbol_metadata; diff --git a/lua/scanner.cc b/lua/scanner.cc index cdda35c1..6032c754 100644 --- a/lua/scanner.cc +++ b/lua/scanner.cc @@ -101,7 +101,7 @@ namespace { } // Try to make a short literal string with single quote - if (lexer->lookahead == '\'') { + if (valid_symbols[MULTI_STRING] && lexer->lookahead == '\'') { lexer->result_symbol = MULTI_STRING; // Consume first appearance of '\'' @@ -138,7 +138,7 @@ namespace { } // Try to make a short literal string with double quote - else if (lexer->lookahead == '"') { + else if (valid_symbols[MULTI_STRING] && lexer->lookahead == '"') { lexer->result_symbol = MULTI_STRING; // Consume first appearance of '"'