Patrick Thomson
5d0c1bfcdf
Loosen tree-sitter library bounds. ( #36 )
1 year ago
Clay
ec1c4cac1b
Add HEEx language injection for `~H` sigils ( #34 )
...
* Add HEEx language injection for `~H` sigils
* Update queries/injections.scm
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
1 year ago
the-mikedavis
1dabc1c790
Generate parser
1 year ago
Michael Davis
108cdd550f
allow only one stab clause without a right-hand-side
...
Only one stab clause in a multi-stab-clause expression may be empty.
Multiple is a syntax error.
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
1 year ago
Michael Davis
662426cd85
handle stab clauses without right-hand-sides
...
Currently a stab clause without a right-hand-side is parsed as an error:
```elixir
Enum.map(xs, fn x ->
end)
```
And the `end` token ends up not being highlighted as a keyword. The
compiler gives a warning about this syntax but it comes up pretty
often when editing (writing a `case` block for example).
Implementation-wise, this might be a bug in tree-sitter? `prec.right`
seems to fight with error recovery when the rightmost token(s) are
`optional`.
```elixir
fn ->
end
```
gets parsed as
```scm
(anonymous_function
(stab_clause
right: (body (identifier)))
(MISSING "end"))
```
although the `optional` should allow this case. I've seen this in
other grammars and it seems like the way around it is to replace
the `prec.right` with a conflict.
1 year ago
José Valim
c68c4ad72f
Update README.md
...
Closes #32 .
2 years ago
Vítor Luís dos Santos Trindade
60863fc6e2
Bump tree-sitter version to 0.20 ( #31 )
2 years ago
Michael Davis
c8d69759a7
update rust bindings to include scanner and queries ( #30 )
...
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2 years ago
the-mikedavis
b4027d7cfc
Generate parser
2 years ago
Michael Davis
6702d11ec4
add unit tests for tags.scm queries ( #27 )
2 years ago
jonatanklosko
1344bb095f
Generate parser
2 years ago
Jonatan Kłosko
8c8c14af1a
Ignore heredoc end delimiter unless in a new line ( #28 )
2 years ago
the-mikedavis
a11a686303
Generate parser
2 years ago
Michael Davis
08dbe8978c
parse nullary range operator ( #25 )
...
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2 years ago
Michael Davis
de20391afe
bump tree-sitter-cli version to v0.20.1 ( #23 )
2 years ago
Michael Davis
89bd108897
commit WASM binding to gh-pages branch ( #22 )
2 years ago
Michael Davis
15169596d1
add tags.scm queries ( #18 )
...
* add tags.scm queries
* mark defimpl modules as references to the interface
* mark modules as module references instead of calls
* define protocol modules as modules, remove interface references
2 years ago
Jonatan Kłosko
94d6471cc8
Fix multiline stab clause with trailing identifier ( #20 )
2 years ago
Jonatan Kłosko
1b3ecf7765
Rename module highlight token ( #16 )
...
* Rename module highlight token
* Fix CRLF in scanner lookahead
2 years ago
Jonatan Kłosko
de3ec57591
Add issue template
2 years ago
Jonatan Kłosko
c3b82ff916
Highlight 'not in' as keyword ( #11 )
2 years ago
jonatanklosko
f5d7bda543
Generate parser
2 years ago
Jonatan Kłosko
5d3f7edbc2
Make hidden scanned tokens visible as regular literals ( #10 )
2 years ago
Jonatan Kłosko
dda17b01c2
Make C++ source compatible with older standards ( #7 )
2 years ago
Michael Davis
24a9eaeaa9
highlight calls to erlang modules as types ( #5 )
...
* highlight calls to erlang modules as types
* Add test
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2 years ago
jonatanklosko
7ae20df181
Generate parser
2 years ago
Jonatan Kłosko
ab50f8bbda
Parse digits in sigil modifiers ( #3 )
2 years ago
Jonatan Kłosko
3817c5f986
Wording fixes
2 years ago
Jonatan Kłosko
d7f4f08a81
Add license
2 years ago
Jonatan Kłosko
fe4a3cff57
Add .gitattributes
2 years ago
Jonatan Kłosko
d9f0b7887a
Automate parser generation
2 years ago
Jonatan Kłosko
8f1f7bc427
Add test workflow
2 years ago
Jonatan Kłosko
e846449ef6
Add script for testing the parser against popular repositories
2 years ago
Jonatan Kłosko
01d428d3a6
Add docs on highlighting
2 years ago
Jonatan Kłosko
7357885bbc
Add highlighting tests
2 years ago
Jonatan Kłosko
30128092d4
Add highlight rules
2 years ago
Jonatan Kłosko
18f6c6cc5d
Use the same AST node for all identifiers
2 years ago
Jonatan Kłosko
3cf73a2529
Add field names to quoted delimiters
2 years ago
Jonatan Kłosko
e35f31122f
Fix stab clause ambiguities
2 years ago
Jonatan Kłosko
bb5f90516e
Add field names
2 years ago
Jonatan Kłosko
d229dddf66
Cleanup and documentation
2 years ago
Jonatan Kłosko
dad92d2b87
Initial parser implementation
2 years ago
Jonatan Kłosko
3f19b87c70
Add parser tests
2 years ago
Jonatan Kłosko
da75c9ee6b
Generate files
2 years ago
Jonatan Kłosko
769b9f184f
Initial commit
2 years ago