Skip to content

Commit

Permalink
Add support for select statements
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywasishere committed Dec 8, 2024
1 parent d86c4c7 commit 2d0aa6f
Show file tree
Hide file tree
Showing 6 changed files with 445,576 additions and 437,769 deletions.
10 changes: 10 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ module.exports = grammar({
$.conditional,
$.case,
alias($.exhaustive_case, $.case),
$.select,
// TODO
// macro interpolation
// macro if
Expand Down Expand Up @@ -2165,6 +2166,15 @@ module.exports = grammar({
)
},

select: $ => {
return seq(
'select',
repeat($.when),
optional($.else),
'end'
)
},

in: $ => {
const cond = field('cond', choice(
$.generic_instance_type,
Expand Down
36 changes: 36 additions & 0 deletions src/grammar.json

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

Loading

0 comments on commit 2d0aa6f

Please sign in to comment.