Skip to content

Commit 97ec5f5

Browse files
committed
Add annotation soft keyword as simple identifier
1 parent 55dfb91 commit 97ec5f5

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,8 @@ module.exports = grammar({
11081108
"actual",
11091109
"set",
11101110
"get",
1111-
"enum"
1111+
"enum",
1112+
"annotation",
11121113
// TODO: More soft keywords
11131114
),
11141115

test/corpus/expressions.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ when {
156156
hasEnum() -> enum.loc.filename
157157
}
158158

159+
annotations.filter { annotation -> true }
160+
159161
--------------------------------------------------------------------------------
160162

161163
(source_file
@@ -173,7 +175,20 @@ when {
173175
(navigation_suffix
174176
(simple_identifier)))
175177
(navigation_suffix
176-
(simple_identifier)))))))
178+
(simple_identifier))))))
179+
(call_expression
180+
(navigation_expression
181+
(simple_identifier)
182+
(navigation_suffix
183+
(simple_identifier)))
184+
(call_suffix
185+
(annotated_lambda
186+
(lambda_literal
187+
(lambda_parameters
188+
(variable_declaration
189+
(simple_identifier)))
190+
(statements
191+
(boolean_literal)))))))
177192

178193
================================================================================
179194
Value declaration with receiver type

0 commit comments

Comments
 (0)