Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module.exports = grammar({
],
[$._jsx_attribute_value, $.pipe_expression],
[$.function_type_parameters, $.function_type],
[$._reserved_identifier, $.module_unpack]
],

conflicts: $ => [
Expand Down Expand Up @@ -1495,7 +1496,8 @@ module.exports = grammar({
uncurry: $ => '.',

_reserved_identifier: $ => choice(
'async'
'async',
'unpack'
)
},
});
Expand Down
3 changes: 2 additions & 1 deletion queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@
"assert"
"await"
"with"
"unpack"
"lazy"
"constraint"
] @keyword

((function "async" @keyword))

(module_unpack "unpack" @keyword)

[
"if"
"else"
Expand Down
3 changes: 3 additions & 0 deletions test/corpus/let_bindings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let c = #foo
let list = 1
let a = list
let async = 1
let unpack = 2
export d = 5

---
Expand All @@ -25,6 +26,8 @@ export d = 5
(let_binding (value_identifier) (value_identifier)))
(let_declaration
(let_binding (value_identifier) (number)))
(let_declaration
(let_binding (value_identifier) (number)))
(let_declaration
(let_binding (value_identifier) (number))))

Expand Down