Commit graph

56 commits

Author SHA1 Message Date
e6473f64ae Add integer select pattern
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-04-02 10:15:11 +00:00
2b7323eaf0 Test non-recursive comments
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-03-24 12:07:55 +00:00
4c2a1d0012 Test negative integer literal
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-03-12 21:33:34 +00:00
aeb1fc2bb5 Allow optional trailing comma in 'select'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2024-12-23 22:59:05 -05:00
1fd9b67dbe Add select binding 2024-07-01 13:54:40 +00:00
3e685cb691 Add 'any' highlighting 2024-07-01 13:50:43 +00:00
970241b323 Add 'any' select pattern 2024-07-01 13:50:30 +00:00
c5031e2c16 Add indentation queries for multi-value 'select'
Unfortunately, the indentation feature is still a work in progress, so
we have some expected failures in our tests...
2024-05-13 15:44:18 +00:00
5cbdf5e3ac Test more 'select' related indentation cases 2024-05-13 15:44:18 +00:00
ff40b39dcf Expose 'condition' node 2024-05-13 15:44:18 +00:00
d01bcf0f6d Add multi-valued select expression 2024-05-13 15:44:18 +00:00
6ca4592d84 Remove trailing commas in 'select_value' arguments 2024-05-13 15:44:18 +00:00
afdfbff7bc Add boolean-typed select values 2024-05-13 15:44:18 +00:00
f6bc0f887a Remove 'selection_type' alias 2024-05-13 15:44:18 +00:00
1c1387fee0 Simplify 'select_value' rule
Upstream has greatly simplified the parsing of `select` expressions, in
order to add multi-valued `select`.

To this end, we remove the hard-coded list of function names, and accept
an arbitrary number of arguments.
2024-05-13 15:44:17 +00:00
8137fd3e5b Relax ordering in 'select' cases
We shouldn't really care whether or not `default` *is* the last value...
2024-05-13 15:44:17 +00:00
6d6d9fc03b Add test for multiple arguments in selection type 2024-04-14 13:00:17 +01:00
e6a2757c51 Alias 'default_case' to 'select_case'
There's not much use in the node being a different name.
2024-04-13 18:23:06 +01:00
8db7b053f5 Add 'default' alias
This makes it appear in the tree as a named node.
2024-04-13 18:21:58 +01:00
d297f38e6a Fix typos in indentation test runner
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2024-04-13 18:17:22 +01:00
0ca28eb2e9 Add indentation tests 2024-04-13 17:07:43 +01:00
9ee889d7ad Make 'punctuation' highlight test more exhaustive 2024-04-13 17:07:29 +01:00
9889191245 Fix indentation in test files 2024-04-13 17:07:23 +01:00
9457caf3a2 Fix typo in a comment 2024-04-11 18:44:13 +01:00
b62fc19da9 Make comments a single node in the grammar
This looks to be a *strong* idiom in tree-sitter parsers.
2024-04-11 18:36:20 +01:00
aa8472e73f Add test for literals 2024-04-11 18:08:40 +01:00
f6e1266493 Consider module as function call for highlighting
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Their semantic is closer to a function call (like i.e: Bazel rules)
rather than a module/namespace.

Similarly for their properties, which are more like parameters than
members.
2024-04-10 15:21:07 +00:00
be1e3f07d3 Make 'line_comment' more explicit about newlines
Because of the way regular expressions work, they were already bounded
at newlines here, but explicit is better than implicit :-).
2024-04-10 15:20:29 +00:00
73b0797891 Add builtins highlighting 2024-04-10 15:20:29 +00:00
3475d713d5 Add 'select' highlighting 2024-04-09 12:28:28 +01:00
ddb4f693be Add test for 'select' as an identifier 2024-04-09 12:28:28 +01:00
ab6d235540 Add map properties highlighting 2024-04-09 12:28:28 +01:00
42bef1d592 Add punctuations highlighting 2024-04-09 12:28:28 +01:00
a9ec312792 Add modules highlighting
Still debating whether modules should be highlighted as namespaces or as
function calls.
2024-04-09 12:28:28 +01:00
7d6dce936a Account for '-' as an operator
For syntax purposes it's part of the number, but it looks better when
highlighted as an operator.
2024-04-09 12:28:28 +01:00
91e6f7841c Add operators highlighting 2024-04-09 12:28:28 +01:00
69e7f36f75 Add variables highlighting 2024-04-09 12:28:28 +01:00
b9fd34c084 Add literals highlighting 2024-04-08 20:48:15 +01:00
e2aa90e0f4 Add comments highlighting 2024-04-08 20:48:15 +01:00
384da2d065 Add test for multiple modules 2024-04-08 20:27:53 +01:00
eec21c84da Add block comments 2024-04-08 20:15:59 +01:00
6d3dd1c8cb Fix line comments syntax
Don't write parsers after midnight kids.

For the explanation: I mixed up the syntax bits between Blueprint and
textual protocol buffers...
2024-04-08 20:15:59 +01:00
3e46a9b762 Add 'operator' aliases 2024-04-08 20:15:59 +01:00
25924c3c5c Add binary expression 2024-04-08 20:15:59 +01:00
2549f6f0db Add 'property' alias
It makes the syntax tree more readable.
2024-04-08 20:15:59 +01:00
8bd249fc90 Add modules 2024-04-08 20:15:59 +01:00
a78ad8139f Add 'soong_config_variable' selection 2024-04-08 20:15:59 +01:00
12553c3bb8 Add 'select' expression
Except for 'soong_config_variable' which is not yet handled.
2024-04-08 20:15:59 +01:00
9dd109b90a Add boolean literals 2024-04-08 20:15:59 +01:00
db2e88a539 Add map expressions 2024-04-08 20:15:59 +01:00