update: changed the way heredocs are parsed

This commit is contained in:
maix0 2024-09-15 20:29:27 +00:00
parent 8272d72997
commit 43b969183d
365 changed files with 20907 additions and 51362 deletions

View file

@ -21,26 +21,11 @@ static const \
t_unique_symbols_map_array g_t_unique_symbols_map_array = {.a = {
[ts_builtin_sym_end] = ts_builtin_sym_end,
[sym_word] = sym_word,
[anon_sym_for] = anon_sym_for,
[anon_sym_in] = anon_sym_in,
[anon_sym_while] = anon_sym_while,
[anon_sym_until] = anon_sym_until,
[anon_sym_do] = anon_sym_do,
[anon_sym_done] = anon_sym_done,
[anon_sym_if] = anon_sym_if,
[anon_sym_then] = anon_sym_then,
[anon_sym_fi] = anon_sym_fi,
[anon_sym_elif] = anon_sym_elif,
[anon_sym_else] = anon_sym_else,
[anon_sym_case] = anon_sym_case,
[anon_sym_esac] = anon_sym_esac,
[anon_sym_LPAREN] = anon_sym_LPAREN,
[anon_sym_PIPE] = anon_sym_PIPE,
[anon_sym_RPAREN] = anon_sym_RPAREN,
[anon_sym_LF] = anon_sym_LF,
[anon_sym_SEMI_SEMI] = anon_sym_SEMI_SEMI,
[anon_sym_LBRACE] = anon_sym_LBRACE,
[anon_sym_RBRACE] = anon_sym_RBRACE,
[anon_sym_LPAREN] = anon_sym_LPAREN,
[anon_sym_RPAREN] = anon_sym_RPAREN,
[anon_sym_PIPE] = anon_sym_PIPE,
[anon_sym_AMP_AMP] = sym__immediate_double_hash,
[anon_sym_PIPE_PIPE] = sym__immediate_double_hash,
[anon_sym_BANG] = anon_sym_BANG,
@ -91,12 +76,8 @@ t_unique_symbols_map_array g_t_unique_symbols_map_array = {.a = {
[anon_sym_0] = anon_sym_AT,
[aux_sym__word_no_brace_token1] = aux_sym__word_no_brace_token1,
[anon_sym_SEMI] = anon_sym_SEMI,
[anon_sym_LT_LT_DASH] = anon_sym_LT_LT_DASH,
[sym_heredoc_start] = sym_heredoc_start,
[sym_simple_heredoc_body] = sym_heredoc_body,
[sym__heredoc_body_beginning] = sym__heredoc_body_beginning,
[sym_heredoc_content] = sym_heredoc_content,
[sym_heredoc_end] = sym_heredoc_end,
[anon_sym_SEMI_SEMI] = anon_sym_SEMI_SEMI,
[aux_sym_terminator_token1] = aux_sym_terminator_token1,
[sym_file_descriptor] = sym_file_descriptor,
[sym__empty_value] = sym__empty_value,
[sym__concat] = sym__concat,
@ -112,16 +93,6 @@ t_unique_symbols_map_array g_t_unique_symbols_map_array = {.a = {
[aux_sym__terminated_statement] = aux_sym__terminated_statement,
[sym__statement_not_pipeline] = sym__statement_not_pipeline,
[sym_redirected_statement] = sym_redirected_statement,
[sym_for_statement] = sym_for_statement,
[sym_while_statement] = sym_while_statement,
[sym_do_group] = sym_do_group,
[sym_if_statement] = sym_if_statement,
[sym_elif_clause] = sym_elif_clause,
[sym_else_clause] = sym_else_clause,
[sym_case_statement] = sym_case_statement,
[sym__case_item_last] = sym_case_item,
[sym_case_item] = sym_case_item,
[sym_function_definition] = sym_function_definition,
[sym_compound_statement] = sym_compound_statement,
[sym_subshell] = sym_subshell,
[sym_pipeline] = sym_pipeline,
@ -133,12 +104,6 @@ t_unique_symbols_map_array g_t_unique_symbols_map_array = {.a = {
[sym__variable_assignments] = sym__variable_assignments,
[sym_file_redirect] = sym_file_redirect,
[sym_heredoc_redirect] = sym_heredoc_redirect,
[sym__heredoc_pipeline] = sym_pipeline,
[sym__heredoc_expression] = sym__heredoc_expression,
[aux_sym__heredoc_command] = aux_sym__heredoc_command,
[sym__heredoc_body] = sym__heredoc_body,
[sym_heredoc_body] = sym_heredoc_body,
[sym__simple_heredoc_body] = sym__simple_heredoc_body,
[sym_arithmetic_expansion] = sym_arithmetic_expansion,
[sym__arithmetic_expression] = sym__arithmetic_expression,
[sym_arithmetic_literal] = sym_arithmetic_literal,
@ -156,22 +121,16 @@ t_unique_symbols_map_array g_t_unique_symbols_map_array = {.a = {
[sym__expansion_regex] = sym__expansion_regex,
[sym__concatenation_in_expansion] = sym_concatenation,
[sym_command_substitution] = sym_command_substitution,
[sym__extglob_blob] = sym__extglob_blob,
[sym__word_no_brace] = sym__word_no_brace,
[sym_terminator] = sym_terminator,
[aux_sym__statements_repeat1] = aux_sym__statements_repeat1,
[aux_sym_redirected_statement_repeat1] = aux_sym_redirected_statement_repeat1,
[aux_sym_redirected_statement_repeat2] = aux_sym_redirected_statement_repeat2,
[aux_sym_for_statement_repeat1] = aux_sym_for_statement_repeat1,
[aux_sym_if_statement_repeat1] = aux_sym_if_statement_repeat1,
[aux_sym_case_statement_repeat1] = aux_sym_case_statement_repeat1,
[aux_sym__case_item_last_repeat1] = aux_sym__case_item_last_repeat1,
[aux_sym__case_item_last_repeat2] = aux_sym__case_item_last_repeat2,
[aux_sym_pipeline_repeat1] = aux_sym_pipeline_repeat1,
[aux_sym_command_repeat1] = aux_sym_command_repeat1,
[aux_sym_command_repeat2] = aux_sym_command_repeat2,
[aux_sym__variable_assignments_repeat1] = aux_sym__variable_assignments_repeat1,
[aux_sym_heredoc_body_repeat1] = aux_sym_heredoc_body_repeat1,
[aux_sym_file_redirect_repeat1] = aux_sym_file_redirect_repeat1,
[aux_sym_concatenation_repeat1] = aux_sym_concatenation_repeat1,
[aux_sym_string_repeat1] = aux_sym_string_repeat1,
[aux_sym__expansion_regex_repeat1] = aux_sym__expansion_regex_repeat1,