Commit Graph

18 Commits (4e48fb94bfb75c3ae016d24c223157adecc9987f)

Author SHA1 Message Date
GearsDatapacks 4e48fb94bf Add bool `assert` syntax 2025-04-19 15:42:49 +07:00
Giacomo Cavalieri 9a66875ae1
Tests for label shorthands 2024-07-25 15:48:57 +07:00
Jonathan Arnett 3c20676cdf Add highlight test for `let assert` 2023-03-03 16:30:06 +07:00
Jonathan Arnett aed23b28dd
Differentiate data constructor names from type names (#28) 2022-05-24 14:37:32 +07:00
Jonathan Arnett 17ed183fc8
Fix for comment-in-string bug (#27)
Nodes defined in `extras` can be expected before an node. Thus, `comment` could be expected before `escape_sequence` or `quoted_content`; aka inside of a string. Naturally, this makes no sense.

I tried wrapping `escape_sequence` and `quoted_content` in `token.immediate` to resolve the issue, but it had no effect (maybe is specific to whitespace?). Instead, I found success in largely copying [`tree-sitter-rust`'s solution of using an external scanner for string content](9a6d980afb/src/scanner.c (L27-L40)).
2022-05-23 00:17:07 +07:00
Michael Davis ec0286fd84
use `function` node as a scope rather than `function_body` (#26) 2022-05-17 16:43:45 +07:00
Jonathan Arnett b249843e44
Add support for v0.21.0 (aka add bang negation) (#24) 2022-05-04 14:37:31 +07:00
Jonathan Arnett de9b2a0ae3
Consider the "field" of field accesses to be a function wherever the "record" is a module (#10) 2022-01-23 17:39:54 +07:00
Michael Davis 3ffbfeb43a
make locals.scm queries more granular (#8)
* make locals.scm queries more granular

* split out (label) nodes from (identifier)

* run formatter

* use (label) for labeled params nodes

* capture all (label)s as properties
2022-01-15 20:13:55 +07:00
Michael Davis d68eab58cf
use fields for left,operator,right of binary expressions (#9) 2022-01-15 15:56:34 +07:00
Michael Davis 60df8383e9
highlight '$.discard' as 'comment.unused' (#6)
* highlight '$.discard' as 'comment.unused'

* trigger ci run
2022-01-15 14:53:15 +07:00
Michael Davis 5f1b1c6569
fix typo in punctuation.delimiter highlight capture (#4) 2022-01-15 10:28:57 +07:00
Jonathan Arnett 8a48cd6581 If the funcall identifier isn't a local, it's a module function 2022-01-13 23:40:44 +07:00
Jonathan Arnett 9434a8c86c If the record is a module, the field is a fucntion 2022-01-13 23:40:01 +07:00
Michael Davis e254d08b7c
highlight modules (#2)
* highlight modules
* highlight remote type modules as modules
* make string replace variable parameter example less ambiguous
2022-01-13 23:14:02 +07:00
Jonathan Arnett 5b9ac0c6a7 Add missing record pattern label highlight 2022-01-06 01:20:30 +07:00
Jonathan Arnett 524b120893 Consistify style 2022-01-04 03:42:10 +07:00
Jonathan Arnett 7fb4cbbfdb Add syntax highlighting queries! 2022-01-03 00:26:47 +07:00