Skip to content

Commit

Permalink
feat: support quarkus secret key expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Feb 23, 2024
1 parent 678c92f commit 277f247
Show file tree
Hide file tree
Showing 7 changed files with 1,104 additions and 862 deletions.
21 changes: 10 additions & 11 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,19 @@ module.exports = grammar({
$.key,
$.substitution
)),
optional($._default),
optional(choice(
$._default,
$._secret
)),
'}'
),

_default: $ => seq(
':',
field(
'default',
repeat1(choice(
$._char,
$.escape,
$.substitution
)),
)
_default: $ => seq(':', field('default', $._content)),

_secret: $ => seq('::', alias($._content, $.secret)),

_content: $ => repeat1(
choice($._char, $.escape, $.substitution)
),

_linebreak: $ => seq('\\', $._eol),
Expand Down
5 changes: 5 additions & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
((substitution (key) @constant)
(#match? @constant "^[A-Z0-9_]+"))

(substitution
(key) @function
"::" @punctuation.special
(secret) @embedded)

(property [ "=" ":" ] @operator)

[ "${" "}" ] @punctuation.special
Expand Down
71 changes: 51 additions & 20 deletions src/grammar.json

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

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

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

0 comments on commit 277f247

Please sign in to comment.