From 2c9d061c0a93a550026a81ab5c4996726fd44df6 Mon Sep 17 00:00:00 2001 From: Seren Kwok Date: Tue, 12 Mar 2024 11:42:09 +0000 Subject: [PATCH] Revert "and nothing else" This reverts commit 666919fca4313c4d205ba0887587a1858c629e15. --- .../language-metavariables/tree-sitter-go/grammar.js | 10 +++++----- .../tree-sitter-go/src/grammar.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/language-metavariables/tree-sitter-go/grammar.js b/resources/language-metavariables/tree-sitter-go/grammar.js index e043a8d0c..b41713bc4 100644 --- a/resources/language-metavariables/tree-sitter-go/grammar.js +++ b/resources/language-metavariables/tree-sitter-go/grammar.js @@ -65,7 +65,7 @@ module.exports = grammar({ $._type, $._type_identifier, $.field_identifier, - $.package_identifier, + $._package_identifier, $._top_level_declaration, $._string_literal, ], @@ -114,7 +114,7 @@ module.exports = grammar({ package_clause: $ => seq( 'package', - field('package', $.package_identifier) + field('package', $._package_identifier) ), import_declaration: $ => seq( @@ -130,7 +130,7 @@ module.exports = grammar({ optional(field('name', choice( $.dot, $.blank_identifier, - $.package_identifier + $._package_identifier ))), field('path', $._string_literal) ), @@ -891,7 +891,7 @@ module.exports = grammar({ }, qualified_type: $ => seq( - field('package', $.package_identifier), + field('package', $._package_identifier), '.', field('name', $._type_identifier) ), @@ -905,7 +905,7 @@ module.exports = grammar({ _type_identifier: $ => alias($.identifier, $.type_identifier), field_identifier: $ => alias($.identifier, $.field_identifier), - package_identifier: $ => alias($.identifier, $.package_identifier), + _package_identifier: $ => alias($.identifier, $.package_identifier), _string_literal: $ => choice( $.raw_string_literal, diff --git a/resources/language-metavariables/tree-sitter-go/src/grammar.json b/resources/language-metavariables/tree-sitter-go/src/grammar.json index 7d19d0bb5..4ffb12854 100644 --- a/resources/language-metavariables/tree-sitter-go/src/grammar.json +++ b/resources/language-metavariables/tree-sitter-go/src/grammar.json @@ -99,7 +99,7 @@ "name": "package", "content": { "type": "SYMBOL", - "name": "package_identifier" + "name": "_package_identifier" } } ] @@ -156,7 +156,7 @@ }, { "type": "SYMBOL", - "name": "package_identifier" + "name": "_package_identifier" } ] } @@ -4703,7 +4703,7 @@ "name": "package", "content": { "type": "SYMBOL", - "name": "package_identifier" + "name": "_package_identifier" } }, { @@ -4797,7 +4797,7 @@ "named": true, "value": "field_identifier" }, - "package_identifier": { + "_package_identifier": { "type": "ALIAS", "content": { "type": "SYMBOL", @@ -7296,7 +7296,7 @@ "_type", "_type_identifier", "field_identifier", - "package_identifier", + "_package_identifier", "_top_level_declaration", "_string_literal" ],