diff --git a/experiments/tree-sitter-test/grammar.js b/experiments/tree-sitter-test/grammar.js index f86112b..0af49df 100644 --- a/experiments/tree-sitter-test/grammar.js +++ b/experiments/tree-sitter-test/grammar.js @@ -1,6 +1,14 @@ module.exports = grammar({ name: "TestLang", rules: { - source_file: $ => "hello" + source_file: $ => repeat($._definition), + + _definition: $ => choice( + $.function_definition + //TODO others + ) + + + } });