Bruno BELANYI
3b2796d9ad
Add class indent tests
2022-06-13 10:45:56 +02:00
Bruno BELANYI
f6c2b4c65e
Add indent tests
...
I made use of the 'nvim-treesitter' test runner for these.
2022-06-13 10:45:56 +02:00
Bruno BELANYI
c9efe870ab
Add class tags
2022-06-04 21:50:45 +02:00
Bruno BELANYI
746c8d27b8
Add method tags
2022-06-04 21:45:54 +02:00
Bruno BELANYI
b1c2da4cb4
Add 'self' built-in variable high-lighting
2022-06-04 21:45:54 +02:00
Bruno BELANYI
acb5765591
Make 'method' keyword more specific
2022-06-04 21:45:54 +02:00
Bruno BELANYI
065ad5f760
Make 'new' constructor keyword
2022-06-04 21:45:54 +02:00
Bruno BELANYI
9c51cbc93f
Add 'Object' built-in type
2022-06-04 21:45:54 +02:00
Bruno BELANYI
425890a6fc
Add methods high-lighting
2022-06-04 21:45:54 +02:00
Bruno BELANYI
555e10c736
Add object-oriented keywords high-lighting
2022-06-04 21:45:54 +02:00
Bruno BELANYI
60804f0ff0
Add object-oriented constructs
...
Another EPITA extension, although this is mentionned in the book.
2022-06-04 21:45:47 +02:00
Bruno BELANYI
21172e21e7
Fix assignment priority
...
The assignment operator is lower priority than any other binary
operator.
Otherwise the following:
```tiger
a := b | c
```
Would be parsed as:
```tiger
(a := b) | c
```
Instead of the expected:
```tiger
a := (b | c)
```
2022-06-04 21:45:40 +02:00
Bruno BELANYI
869b0bf79a
Add meta-variable keywords high-lighting
2022-06-04 21:45:40 +02:00
Bruno BELANYI
572dab6f4b
Add meta-variables
...
This is an EPITA extension of the language, used mostly by internal
compiler machinery.
2022-06-04 21:45:33 +02:00
Bruno BELANYI
184d3b9953
Add function tags
2022-06-04 10:43:35 +02:00
Bruno BELANYI
3e1068a336
Add built-in types
...
Not sure why it seems like the 'is-not? local' is not working.
Will investigate later
2022-06-03 22:04:30 +02:00
Bruno BELANYI
2d89ec8b20
Add built-in functions
...
continuous-integration/drone/push Build is passing
This is a good proxy test to ensure that scope queries work correctly.
2022-06-03 21:09:11 +02:00
Bruno BELANYI
64ff9dd944
Add import path high-lighting
...
I don't think this group is supported by neovim, but 'tree-sitter-nix'
makes use of it, and I think it makes sense to add it.
2022-06-03 20:35:53 +02:00
Bruno BELANYI
aff11eefce
More specific loop keyword high-lighting
2022-06-03 20:28:28 +02:00
Bruno BELANYI
b22ca8cd67
More specific function keyword high-lighting
...
I learnt about this group by reading the nvim-treesitter source [1].
[1]: see 'lua/nvim-treesitter/highlight.lua'
2022-06-03 20:15:09 +02:00
Bruno BELANYI
62a601469e
Add functions high-lighting
2022-06-03 19:59:56 +02:00
Bruno BELANYI
c48624c0f3
Add string escape high-lighting
2022-06-03 12:58:34 +02:00
Bruno BELANYI
558e45aeed
Add ':' as delimiter
2022-06-03 11:43:43 +02:00
Bruno BELANYI
0b17386cad
Add ':=' to 'operator'
2022-06-03 11:42:57 +02:00
Bruno BELANYI
0b549493a2
Add identifiers high-lighting
...
We now make use of the more specific '_type_identifier' and
'_field_identifier' rules!
2022-06-03 10:44:10 +02:00
Bruno BELANYI
da494122ea
Replace '_typed_field' by more specific grammar
...
Instead of re-using a common rule, inline its definition and use
'_field_identifier' where appropriate.
This is useful for more accurate high-lighting.
2022-06-03 10:40:14 +02:00
Bruno BELANYI
5d37bf7bd1
Use 'type_identifier' in array type declaration
2022-06-03 10:35:53 +02:00
Bruno BELANYI
0827093fe7
Add 'field_identifier' alias
...
This will be useful for high-lighting.
2022-06-03 10:31:30 +02:00
Bruno BELANYI
2be5056793
Add 'type_identifier' alias
...
This is more appropriate, and actually closer to the specified grammar.
2022-06-03 10:15:40 +02:00
Bruno BELANYI
6e40691a35
Add operators highlighting
2022-06-03 10:08:58 +02:00
Bruno BELANYI
d83fa3acb7
Add keywords highlighting
2022-06-02 22:27:58 +02:00
Bruno BELANYI
751929a058
Fix whitespace skipping in scanner
...
Once again, implicit fall-through is the devil.
2022-06-02 22:27:13 +02:00
Bruno BELANYI
61f03a116c
Add additional test for comments
2022-06-02 22:20:37 +02:00
Bruno BELANYI
b836117a21
Add literals highlighting
2022-06-02 22:20:37 +02:00
Bruno BELANYI
b9376ccd35
Add comment syntax highlighting
2022-06-02 22:20:37 +02:00
Bruno BELANYI
50a0eaa071
Add support for nested comments
...
Unfortunately, the 'extras' array expects single tokens only, so one
can't really use a recursive parsing rule to express nesting comments...
2022-06-02 22:20:37 +02:00
Bruno BELANYI
75bb2c7009
Add comments
...
For now it only supports non-nested comments. It seems like I *will*
need to write an external lexer to account for nesting properly.
2022-06-02 17:07:30 +02:00
Bruno BELANYI
e5e958cac9
Add tests for sequence expressions
2022-06-02 17:07:30 +02:00
Bruno BELANYI
76b558a982
Add return type to function declarations
2022-06-02 17:07:30 +02:00
Bruno BELANYI
1e5f7cd5d5
Add array types
2022-06-02 17:07:30 +02:00
Bruno BELANYI
dd0af53fa0
Add record types
2022-06-02 17:07:30 +02:00
Bruno BELANYI
506fab8896
Add type declarations
...
For now, simplified to type aliases only.
2022-06-02 17:07:30 +02:00
Bruno BELANYI
e898312c95
Add function declarations
2022-06-02 17:07:30 +02:00
Bruno BELANYI
3eb6b0a0d0
Add variable declarations
2022-06-02 17:07:30 +02:00
Bruno BELANYI
3cf701dbb1
Add top-level declarations
2022-06-02 17:07:30 +02:00
Bruno BELANYI
1449aa939f
Add let expressions
2022-06-02 17:07:30 +02:00
Bruno BELANYI
d32fd4fd6c
Add break expressions
2022-06-02 17:07:30 +02:00
Bruno BELANYI
bb6875a11d
Add for expressions
2022-06-02 17:07:30 +02:00
Bruno BELANYI
26999482a3
Add while expressions
2022-06-02 17:07:30 +02:00
Bruno BELANYI
19c1f11414
Add if expressions
2022-06-02 17:07:30 +02:00