From 8cde20641bf553bf0a851b07d36e443a293ae087 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sun, 21 Apr 2024 03:01:13 -0700 Subject: [PATCH] working on new grammar --- experiments/tree-sitter-test/grammar.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 + ) + + + } });