Update README

pull/70/head
Stephan Seitz 2021-04-05 16:53:36 +07:00
parent f252c1823b
commit d4f054a358
5 changed files with 27110 additions and 28621 deletions

@ -1,6 +1,7 @@
# tree-sitter-commonlisp # tree-sitter-commonlisp
WIP. Goal is to have a better syntax highlighting and some semantic refactoring https://github.com/nvim-treesitter/nvim-treesitter-refactor/. WIP. Goal is to have a better syntax highlighting for Neovim
and some semantic refactoring https://github.com/nvim-treesitter/nvim-treesitter-refactor/.
All praise goes to https://github.com/sogaiu/tree-sitter-clojure which is extended by this grammar. All praise goes to https://github.com/sogaiu/tree-sitter-clojure which is extended by this grammar.
@ -8,3 +9,8 @@ TODOs:
- support lisp packages: `foo.bar:symbol` - support lisp packages: `foo.bar:symbol`
- support number literatls that are different from clojure (e.g. `.9`) - support number literatls that are different from clojure (e.g. `.9`)
Macros with special respresentation in syntax tree (when written with lowercase letters):
- defun and friends (e.g. defmethod)
- loop macro

@ -116,8 +116,7 @@ module.exports = grammar(clojure, {
loop_macro: $ => loop_macro: $ =>
seq(field('open', "("), seq(field('open', "("),
optional($._gap), optional($._gap),
optional('cl:'), choice('loop', 'cl:loop'),
'loop',
repeat(choice($.loop_clause, $._gap)), repeat(choice($.loop_clause, $._gap)),
field('close', ")")), field('close', ")")),

@ -2345,17 +2345,14 @@
"members": [ "members": [
{ {
"type": "STRING", "type": "STRING",
"value": "cl:" "value": "loop"
}, },
{ {
"type": "BLANK" "type": "STRING",
"value": "cl:loop"
} }
] ]
}, },
{
"type": "STRING",
"value": "loop"
},
{ {
"type": "REPEAT", "type": "REPEAT",
"content": { "content": {

@ -3880,7 +3880,7 @@
"named": true "named": true
}, },
{ {
"type": "cl:", "type": "cl:loop",
"named": false "named": false
}, },
{ {

File diff suppressed because it is too large Load Diff