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
9 changes: 9 additions & 0 deletions examples/cst.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
====================
Test with cst marker
:cst
====================
1
---
0:0 - 1:0 source_file
0:0 - 0:1 expression
0:0 - 0:1 number_literal `1`
3 changes: 2 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ module.exports = grammar({
),

attribute: $ => choice(
":skip",
field("cst", ":cst"),
":error",
":fail-fast",
$._language,
$._platform,
":skip",
),

_language: $ => seq(
Expand Down
3 changes: 2 additions & 1 deletion queries/test/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
(name) @markup.heading

[
":skip"
":cst"
":error"
":fail-fast"
":language"
":platform"
":skip"
] @attribute

(attribute
Expand Down
21 changes: 21 additions & 0 deletions queries/test/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,30 @@
(input) @injection.content)

((test
[
(header
(separator)
.
(name)
.
(separator))
(header
(attributes
.
(attribute
!cst)+ .))
]
(output) @injection.content)
(#set! injection.language "query"))

((test
(header
(attributes
(attribute
cst: _)))
(output) @injection.content)
(#set! injection.language "cst"))

; NOTE: custom dynamic injection
((test
(header
Expand Down
12 changes: 10 additions & 2 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading