diff --git a/packages/tree-sitter-twig/corpus/expressions.txt b/packages/tree-sitter-twig/corpus/expressions.txt index 6916318..94cf783 100644 --- a/packages/tree-sitter-twig/corpus/expressions.txt +++ b/packages/tree-sitter-twig/corpus/expressions.txt @@ -1,5 +1,5 @@ ================== -Identifier +Variable ================== {{ user }} --- @@ -184,10 +184,10 @@ Object property keys as names (output (object (pair - (variable) + (identifier) (string)) (pair - (variable) + (identifier) (string))))) ================== diff --git a/packages/tree-sitter-twig/corpus/statements.txt b/packages/tree-sitter-twig/corpus/statements.txt index 014cc46..a277bf4 100644 --- a/packages/tree-sitter-twig/corpus/statements.txt +++ b/packages/tree-sitter-twig/corpus/statements.txt @@ -710,7 +710,7 @@ With variables (with (object (pair - (variable) + (identifier) (number))) (source_elements (content)))) @@ -726,7 +726,7 @@ With variables only (with (object (pair - (variable) + (identifier) (number))) (source_elements (content)))) diff --git a/packages/tree-sitter-twig/grammar.js b/packages/tree-sitter-twig/grammar.js index 16eac6f..8b91230 100644 --- a/packages/tree-sitter-twig/grammar.js +++ b/packages/tree-sitter-twig/grammar.js @@ -215,7 +215,7 @@ module.exports = grammar({ choice( $.string, $.number, - alias($.identifier, $.variable), + $.identifier, $.computed_property_name, ),