feat: add Forth

This commit is contained in:
Amaan Qureshi 2023-08-21 04:29:38 -04:00
parent 620b60b5ba
commit 7c935d6bd5
8 changed files with 42 additions and 0 deletions

1
queries/forth/folds.scm Normal file
View file

@ -0,0 +1 @@
(word_definition) @fold

View file

@ -0,0 +1,21 @@
(core) @function
(operator) @operator
(word) @variable
((word) @constant
(#lua-match? @constant "^[A-Z_]+$"))
(number) @number
(string) @string
[
(start_definition)
(end_definition)
] @punctuation.delimiter
(comment) @comment
(ERROR) @error

View file

@ -0,0 +1,3 @@
(word_definition) @indent.begin
(end_definition) @indent.end @indent.branch

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))

3
queries/forth/locals.scm Normal file
View file

@ -0,0 +1,3 @@
(word) @reference
(word_definition) @scope