From cc6fa3e0f719f18e9558829dc788f85a5178604b Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 7 Jan 2023 21:55:42 +0300 Subject: [PATCH] grammar: rename comment blocks --- grammar.js | 6 +- src/grammar.json | 8 +- src/node-types.json | 20 +- src/parser.c | 482 +++++++++++++++++++-------------------- tree-sitter-plpgsql.wasm | Bin 26578 -> 26594 bytes 5 files changed, 258 insertions(+), 258 deletions(-) diff --git a/grammar.js b/grammar.js index 1e54a01..3c4fb1b 100644 --- a/grammar.js +++ b/grammar.js @@ -1,7 +1,7 @@ module.exports = grammar({ name: "plpgsql", - extras: ($) => [/\s\n/, /\s/, $.comment, $.marginalia], + extras: ($) => [/\s\n/, /\s/, $.line_comment, $.block_comment], conflicts: ($) => [[$.keyword_char, $.keyword_varchar]], @@ -239,9 +239,9 @@ module.exports = grammar({ // ------- - comment: (_) => seq("--", /.*\n/), + line_comment: (_) => seq("--", /.*\n/), // https://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment - marginalia: (_) => seq("/*", /[^*]*\*+(?:[^/*][^*]*\*+)*/, "/"), + block_comment: (_) => seq("/*", /[^*]*\*+(?:[^/*][^*]*\*+)*/, "/"), _literal_string: ($) => choice(seq("'", /[^']*/, "'")), _number: (_) => /\d+/, diff --git a/src/grammar.json b/src/grammar.json index 42d46f3..f3e1ae8 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1119,7 +1119,7 @@ "type": "PATTERN", "value": "jsonb|JSONB" }, - "comment": { + "line_comment": { "type": "SEQ", "members": [ { @@ -1132,7 +1132,7 @@ } ] }, - "marginalia": { + "block_comment": { "type": "SEQ", "members": [ { @@ -1217,11 +1217,11 @@ }, { "type": "SYMBOL", - "name": "comment" + "name": "line_comment" }, { "type": "SYMBOL", - "name": "marginalia" + "name": "block_comment" } ], "conflicts": [ diff --git a/src/node-types.json b/src/node-types.json index 7bb5ef8..392ce38 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1,4 +1,9 @@ [ + { + "type": "block_comment", + "named": true, + "fields": {} + }, { "type": "char", "named": true, @@ -206,11 +211,6 @@ ] } }, - { - "type": "comment", - "named": true, - "fields": {} - }, { "type": "create_table", "named": true, @@ -334,6 +334,11 @@ "named": true, "fields": {} }, + { + "type": "line_comment", + "named": true, + "fields": {} + }, { "type": "literal", "named": true, @@ -357,11 +362,6 @@ ] } }, - { - "type": "marginalia", - "named": true, - "fields": {} - }, { "type": "numeric", "named": true, diff --git a/src/parser.c b/src/parser.c index c4c9d45..114801c 100644 --- a/src/parser.c +++ b/src/parser.c @@ -67,9 +67,9 @@ enum { sym_keyword_json = 48, sym_keyword_jsonb = 49, anon_sym_DASH_DASH = 50, - aux_sym_comment_token1 = 51, + aux_sym_line_comment_token1 = 51, anon_sym_SLASH_STAR = 52, - aux_sym_marginalia_token1 = 53, + aux_sym_block_comment_token1 = 53, anon_sym_SLASH = 54, anon_sym_SQUOTE = 55, aux_sym__literal_string_token1 = 56, @@ -111,8 +111,8 @@ enum { sym__without_time_zone = 92, sym__with_time_zone = 93, sym__keyword_time_zone = 94, - sym_comment = 95, - sym_marginalia = 96, + sym_line_comment = 95, + sym_block_comment = 96, sym__literal_string = 97, sym_identifier = 98, aux_sym_source_file_repeat1 = 99, @@ -172,9 +172,9 @@ static const char * const ts_symbol_names[] = { [sym_keyword_json] = "keyword_json", [sym_keyword_jsonb] = "keyword_jsonb", [anon_sym_DASH_DASH] = "--", - [aux_sym_comment_token1] = "comment_token1", + [aux_sym_line_comment_token1] = "line_comment_token1", [anon_sym_SLASH_STAR] = "/*", - [aux_sym_marginalia_token1] = "marginalia_token1", + [aux_sym_block_comment_token1] = "block_comment_token1", [anon_sym_SLASH] = "/", [anon_sym_SQUOTE] = "'", [aux_sym__literal_string_token1] = "_literal_string_token1", @@ -216,8 +216,8 @@ static const char * const ts_symbol_names[] = { [sym__without_time_zone] = "_without_time_zone", [sym__with_time_zone] = "_with_time_zone", [sym__keyword_time_zone] = "_keyword_time_zone", - [sym_comment] = "comment", - [sym_marginalia] = "marginalia", + [sym_line_comment] = "line_comment", + [sym_block_comment] = "block_comment", [sym__literal_string] = "_literal_string", [sym_identifier] = "identifier", [aux_sym_source_file_repeat1] = "source_file_repeat1", @@ -277,9 +277,9 @@ static const TSSymbol ts_symbol_map[] = { [sym_keyword_json] = sym_keyword_json, [sym_keyword_jsonb] = sym_keyword_jsonb, [anon_sym_DASH_DASH] = anon_sym_DASH_DASH, - [aux_sym_comment_token1] = aux_sym_comment_token1, + [aux_sym_line_comment_token1] = aux_sym_line_comment_token1, [anon_sym_SLASH_STAR] = anon_sym_SLASH_STAR, - [aux_sym_marginalia_token1] = aux_sym_marginalia_token1, + [aux_sym_block_comment_token1] = aux_sym_block_comment_token1, [anon_sym_SLASH] = anon_sym_SLASH, [anon_sym_SQUOTE] = anon_sym_SQUOTE, [aux_sym__literal_string_token1] = aux_sym__literal_string_token1, @@ -321,8 +321,8 @@ static const TSSymbol ts_symbol_map[] = { [sym__without_time_zone] = sym__without_time_zone, [sym__with_time_zone] = sym__with_time_zone, [sym__keyword_time_zone] = sym__keyword_time_zone, - [sym_comment] = sym_comment, - [sym_marginalia] = sym_marginalia, + [sym_line_comment] = sym_line_comment, + [sym_block_comment] = sym_block_comment, [sym__literal_string] = sym__literal_string, [sym_identifier] = sym_identifier, [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, @@ -535,7 +535,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [aux_sym_comment_token1] = { + [aux_sym_line_comment_token1] = { .visible = false, .named = false, }, @@ -543,7 +543,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [aux_sym_marginalia_token1] = { + [aux_sym_block_comment_token1] = { .visible = false, .named = false, }, @@ -711,11 +711,11 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, - [sym_comment] = { + [sym_line_comment] = { .visible = true, .named = true, }, - [sym_marginalia] = { + [sym_block_comment] = { .visible = true, .named = true, }, @@ -1077,10 +1077,10 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead != '\'') ADVANCE(38); END_STATE(); case 24: - ACCEPT_TOKEN(aux_sym_comment_token1); + ACCEPT_TOKEN(aux_sym_line_comment_token1); END_STATE(); case 25: - ACCEPT_TOKEN(aux_sym_comment_token1); + ACCEPT_TOKEN(aux_sym_line_comment_token1); if (lookahead == '\n') ADVANCE(25); if (lookahead == '-') ADVANCE(3); if (lookahead == '/') ADVANCE(2); @@ -1114,7 +1114,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead != '\'') ADVANCE(38); END_STATE(); case 31: - ACCEPT_TOKEN(aux_sym_marginalia_token1); + ACCEPT_TOKEN(aux_sym_block_comment_token1); if (lookahead == '*') ADVANCE(31); if (lookahead != 0 && lookahead != '/') ADVANCE(7); @@ -2569,8 +2569,8 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { - [sym_comment] = STATE(0), - [sym_marginalia] = STATE(0), + [sym_line_comment] = STATE(0), + [sym_block_comment] = STATE(0), [ts_builtin_sym_end] = ACTIONS(1), [sym__identifier] = ACTIONS(1), [anon_sym_SEMI] = ACTIONS(1), @@ -2634,8 +2634,8 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym__ddl_statement] = STATE(108), [sym__create_statement] = STATE(107), [sym_create_table] = STATE(104), - [sym_comment] = STATE(1), - [sym_marginalia] = STATE(1), + [sym_line_comment] = STATE(1), + [sym_block_comment] = STATE(1), [aux_sym_source_file_repeat1] = STATE(10), [ts_builtin_sym_end] = ACTIONS(7), [anon_sym_SEMI] = ACTIONS(9), @@ -2682,8 +2682,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(20), 1, sym_keyword_char, STATE(2), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, STATE(49), 2, sym_char, sym_varchar, @@ -2723,8 +2723,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(3), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(43), 4, aux_sym_keyword_char_token2, sym_keyword_date, @@ -2762,8 +2762,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(4), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(47), 4, aux_sym_keyword_char_token2, sym_keyword_date, @@ -2809,8 +2809,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(44), 1, sym__with_time_zone, STATE(5), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(49), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -2828,8 +2828,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(53), 1, aux_sym__with_time_zone_token1, STATE(6), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, STATE(24), 2, sym__without_time_zone, sym__with_time_zone, @@ -2863,8 +2863,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, anon_sym_RPAREN, STATE(7), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [279] = 11, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -2888,8 +2888,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, anon_sym_RPAREN, STATE(8), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [315] = 10, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -2911,8 +2911,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, anon_sym_RPAREN, STATE(9), 3, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, aux_sym_column_definition_repeat1, [349] = 11, ACTIONS(3), 1, @@ -2936,8 +2936,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(108), 1, sym__ddl_statement, STATE(10), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [384] = 8, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -2952,8 +2952,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(43), 1, sym__expression, STATE(11), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(85), 4, sym_keyword_null, sym_keyword_true, @@ -2973,8 +2973,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(42), 1, sym_literal, STATE(12), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(85), 4, sym_keyword_null, sym_keyword_true, @@ -3000,8 +3000,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(108), 1, sym__ddl_statement, STATE(13), 3, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, aux_sym_source_file_repeat1, [475] = 4, ACTIONS(3), 1, @@ -3009,8 +3009,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(14), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(97), 7, anon_sym_LPAREN, anon_sym_COMMA, @@ -3025,8 +3025,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(15), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(99), 7, anon_sym_LPAREN, anon_sym_COMMA, @@ -3041,8 +3041,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(16), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(101), 7, anon_sym_LPAREN, anon_sym_COMMA, @@ -3059,8 +3059,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(104), 1, anon_sym_LPAREN, STATE(17), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(106), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3076,8 +3076,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(108), 1, anon_sym_LPAREN, STATE(18), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(110), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3093,8 +3093,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(112), 1, anon_sym_LPAREN, STATE(19), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(114), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3110,8 +3110,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(116), 1, anon_sym_LPAREN, STATE(20), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(118), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3125,8 +3125,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(21), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(120), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3140,8 +3140,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(22), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(122), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3155,8 +3155,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(23), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(124), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3170,8 +3170,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(24), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(126), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3185,8 +3185,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(25), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(128), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3212,16 +3212,16 @@ static const uint16_t ts_small_parse_table[] = { STATE(71), 1, sym_table_reference, STATE(26), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [747] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(27), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(136), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3235,8 +3235,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(28), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(138), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3250,8 +3250,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(29), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(140), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3265,8 +3265,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(30), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(142), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3280,8 +3280,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(31), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(144), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3295,8 +3295,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(32), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(146), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3310,8 +3310,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(33), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(148), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3325,8 +3325,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(34), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(150), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3340,8 +3340,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(35), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(152), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3355,8 +3355,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(36), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(154), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3370,8 +3370,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(37), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(156), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3385,8 +3385,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(38), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(158), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3400,8 +3400,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(39), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(160), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3415,8 +3415,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(40), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(162), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3430,8 +3430,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(41), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(164), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3445,8 +3445,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(42), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(166), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3460,8 +3460,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(43), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(168), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3475,8 +3475,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(44), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(170), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3490,8 +3490,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(45), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(172), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3505,8 +3505,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(46), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(174), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3532,16 +3532,16 @@ static const uint16_t ts_small_parse_table[] = { STATE(67), 1, sym_identifier, STATE(47), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1156] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(48), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(176), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3555,8 +3555,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(49), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(178), 6, anon_sym_COMMA, anon_sym_RPAREN, @@ -3580,8 +3580,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(99), 1, sym_keyword_temporary, STATE(50), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1220] = 8, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3598,8 +3598,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(59), 1, sym_column_definition, STATE(51), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1246] = 7, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3614,8 +3614,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(70), 1, sym_column_definition, STATE(52), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1269] = 7, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3630,8 +3630,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(71), 1, sym_table_reference, STATE(53), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1292] = 7, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3646,8 +3646,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(67), 1, sym_identifier, STATE(54), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1315] = 7, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3662,8 +3662,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(48), 1, sym__not_null, STATE(55), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1338] = 6, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3676,16 +3676,16 @@ static const uint16_t ts_small_parse_table[] = { STATE(62), 1, aux_sym_column_definitions_repeat1, STATE(56), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1358] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(57), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(200), 3, ts_builtin_sym_end, anon_sym_SEMI, @@ -3702,8 +3702,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(55), 1, sym_identifier, STATE(58), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1394] = 6, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3716,16 +3716,16 @@ static const uint16_t ts_small_parse_table[] = { STATE(56), 1, aux_sym_column_definitions_repeat1, STATE(59), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1414] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(60), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(204), 3, ts_builtin_sym_end, anon_sym_SEMI, @@ -3736,8 +3736,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(5), 1, anon_sym_SLASH_STAR, STATE(61), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, ACTIONS(206), 3, ts_builtin_sym_end, anon_sym_SEMI, @@ -3752,8 +3752,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(211), 1, anon_sym_RPAREN, STATE(62), 3, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, aux_sym_column_definitions_repeat1, [1464] = 6, ACTIONS(3), 1, @@ -3767,8 +3767,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(77), 1, sym_identifier, STATE(63), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1484] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3779,8 +3779,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(215), 1, anon_sym_RPAREN, STATE(64), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1501] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3791,8 +3791,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(87), 1, sym_column_definitions, STATE(65), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1518] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3803,8 +3803,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(86), 1, sym_column_definitions, STATE(66), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1535] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3815,8 +3815,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(221), 1, anon_sym_DOT, STATE(67), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1552] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3827,8 +3827,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(31), 1, sym__keyword_time_zone, STATE(68), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1569] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3839,8 +3839,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(30), 1, sym__keyword_time_zone, STATE(69), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1586] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3850,8 +3850,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, anon_sym_RPAREN, STATE(70), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1601] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3862,8 +3862,8 @@ static const uint16_t ts_small_parse_table[] = { STATE(78), 1, sym_column_definitions, STATE(71), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1618] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3873,8 +3873,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE, sym__identifier, STATE(72), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1633] = 5, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3885,8 +3885,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(229), 1, anon_sym_RPAREN, STATE(73), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1650] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3895,8 +3895,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(231), 1, anon_sym_DQUOTE, STATE(74), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1664] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3905,8 +3905,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(233), 1, anon_sym_RPAREN, STATE(75), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1678] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3915,8 +3915,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(235), 1, anon_sym_SEMI, STATE(76), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1692] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3925,8 +3925,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(237), 1, anon_sym_LPAREN, STATE(77), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1706] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3935,8 +3935,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(239), 1, anon_sym_SEMI, STATE(78), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1720] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3945,8 +3945,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(241), 1, sym__number, STATE(79), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1734] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3955,8 +3955,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(243), 1, sym__number, STATE(80), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1748] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3965,8 +3965,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(245), 1, sym__number, STATE(81), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1762] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3975,8 +3975,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(247), 1, anon_sym_SEMI, STATE(82), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1776] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3985,8 +3985,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(249), 1, aux_sym__keyword_time_zone_token1, STATE(83), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1790] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -3995,18 +3995,18 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(251), 1, sym_keyword_null, STATE(84), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1804] = 4, ACTIONS(253), 1, anon_sym_DASH_DASH, ACTIONS(255), 1, - aux_sym_comment_token1, + aux_sym_line_comment_token1, ACTIONS(257), 1, anon_sym_SLASH_STAR, STATE(85), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1818] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4015,8 +4015,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(259), 1, anon_sym_SEMI, STATE(86), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1832] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4025,8 +4025,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(261), 1, anon_sym_SEMI, STATE(87), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1846] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4035,8 +4035,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(263), 1, sym_keyword_exists, STATE(88), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1860] = 4, ACTIONS(253), 1, anon_sym_DASH_DASH, @@ -4045,8 +4045,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(265), 1, aux_sym__literal_string_token1, STATE(89), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1874] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4055,8 +4055,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(267), 1, anon_sym_SEMI, STATE(90), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1888] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4065,8 +4065,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(269), 1, sym__number, STATE(91), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1902] = 4, ACTIONS(253), 1, anon_sym_DASH_DASH, @@ -4075,8 +4075,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(271), 1, aux_sym_identifier_token1, STATE(92), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1916] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4085,8 +4085,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(273), 1, aux_sym_double_token2, STATE(93), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1930] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4095,8 +4095,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(275), 1, anon_sym_RPAREN, STATE(94), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1944] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4105,8 +4105,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(277), 1, sym__number, STATE(95), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1958] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4115,8 +4115,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(279), 1, sym_keyword_not, STATE(96), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1972] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4125,18 +4125,18 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(281), 1, sym__number, STATE(97), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [1986] = 4, ACTIONS(253), 1, anon_sym_DASH_DASH, ACTIONS(257), 1, anon_sym_SLASH_STAR, ACTIONS(283), 1, - aux_sym_marginalia_token1, + aux_sym_block_comment_token1, STATE(98), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2000] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4145,8 +4145,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(285), 1, sym_keyword_table, STATE(99), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2014] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4155,8 +4155,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(287), 1, sym_keyword_table, STATE(100), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2028] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4165,8 +4165,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(289), 1, anon_sym_SLASH, STATE(101), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2042] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4175,8 +4175,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(291), 1, anon_sym_SQUOTE, STATE(102), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2056] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4185,8 +4185,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(293), 1, ts_builtin_sym_end, STATE(103), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2070] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4195,8 +4195,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(295), 1, anon_sym_SEMI, STATE(104), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2084] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4205,8 +4205,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(297), 1, anon_sym_RPAREN, STATE(105), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2098] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4215,8 +4215,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(299), 1, anon_sym_RPAREN, STATE(106), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2112] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4225,8 +4225,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(301), 1, anon_sym_SEMI, STATE(107), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2126] = 4, ACTIONS(3), 1, anon_sym_DASH_DASH, @@ -4235,8 +4235,8 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(303), 1, anon_sym_SEMI, STATE(108), 2, - sym_comment, - sym_marginalia, + sym_line_comment, + sym_block_comment, [2140] = 1, ACTIONS(305), 1, ts_builtin_sym_end, @@ -4507,8 +4507,8 @@ static const TSParseActionEntry ts_parse_actions[] = { [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ddl_statement, 1), [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), - [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_marginalia, 3), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_comment, 2), + [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block_comment, 3), }; #ifdef __cplusplus diff --git a/tree-sitter-plpgsql.wasm b/tree-sitter-plpgsql.wasm index 6661301ef061ceddbf4e0bc6faf2b106c311f321..f56bd8a28e03d7d83e3b38db49730257fddccc3c 100755 GIT binary patch delta 2675 zcmY+`Z)jUp7zXeYWy3N=>A(*nQthhS5QkL7iA(~1@PqpxqJn~T>%!RjPuVC;kXxa3 z5ju?a4;|}V7%6lv*gzvoAZ#5AUF=euuB`^!+8R3A(nbOcqj8n`+&uR_YT@Oa^E>Z( z&$%bJX>U(>auc3PbLd2q$KdDT?MF^E9&2t$d{en)_1!kdtBtp?@A%6P7I^#i(+op^IVM6d17b4Dz8Ydyjal{?REW)A-38%ttXTb=^>wBDWlH-Cq zPH~*s>&&O^v4_Xcl>1(fGgV}2;CW|kAG_Kz-pk|eY1?fv-ak?<_zB_R7Db<%|Z zAt&f2EDQPw^MZcD=qx4DkNP)1bj3OZ_*qAbw{ek}`*SU)4U!jBc@?kW9N(gM_%QHAJ|os)K}(UYaoBPh~_1e$|Lh zTjj^QAc-+$NVk|ElBoqa0Gv!PCOEuaFS9K6S z;kxdulQ3`-_sJ+IBxL`6NAM>R-!x-_c7kdD^yBE~5aU>P(5?mRz+4mBUbMR~w}$n{(7uTH0P$vx zvCK!9Y((tE!u?pd6YZmDXOQp)7Q`_=fC#~w(fSb=5JQ+Np?DN=AN>Vb9yv>BvuJ10 zt|8t>e2$zvS`XqVayPNx9YhiTmYB}~2as?bF#tS=@f7+`-~d%@-U%U>|9b*6Fo<xZ{w!77Z7K-GmtrA}-Xs2{Dcby>Z+klsrgq9NFnE805IJ%N-AKyzGrr z9Oqwf=SS?ZkJY4|exuKwT3~A6C3n1Rk1f*}n)0e$WyZA$57r2M*F2~aZe91FbK1GS zf}oplQ{X2|33>?0NqY~=zViTOHS6u#OBl|15F&(BNSJV5wMPhj&aU>RF~VOzd3(eO zVSQZ!U?H=5)k_&<%J8@cLxlT+6ycnX86o5ZX~KZMcZ~3(YM&s?*vDGVqsvlG=$Jg= zXVqFH^eJPOa3=XVG~h_w=vXP4FYb;#2igMsyNPZw;ja1bjS!-OAwpS8QiPmJ9U-dmkR{v}+UuRxdI{Skz+*6EZqCLMZ90V}$Q?Zrsh# zk_6!g6*B06)p$z94>9F$rKAYo>zEP3744cP9M_UD!k;Q+g7BLlOX%XU_U~7ovZ76j zgi)P4OE|4k=Ljj?S&2~5oh=YH1Z8&*ZCbGb_n*a(M|Y6&`X$iHvQQCsSiU$%EE>#vIJP^bQQI@);*50?2e66;* zp(eTChtZZqvj2_Ay5#W#4V!9@G#xwK(%#h85*%vI1Vaax9+5N!I}Uxg`RFcV9t%z% z+GmBHGv>W#jd|jEV{YvK-|RxF^2&! zBH;p}ALz$8jeac(*ot-qu@}CGaRze-5Kp0BLi;A>P9eTRJcIES#3uB=#C$WN3;kn= wx8bMJzKVS+@D0SHu*_S4b#zVw-baET74Ac{BmVz4Z_gtyi<~aB4-iq