Skip to content

Commit

Permalink
feat: support number tuples e.g. window-padding-{x,y}
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhermoso committed Jan 11, 2025
1 parent 8158cad commit b43b00a
Show file tree
Hide file tree
Showing 5 changed files with 2,282 additions and 2,139 deletions.
8 changes: 8 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ module.exports = grammar({
choice(
$.boolean,
$.number,
$.tuple,
$.adjustment,
$.color,
$.string,
)
),

// Used by window-padding-{x,y}. Tuples only supports numbers for now.
tuple: $ => seq(
field("first", $.number),
token.immediate(","),
field("second", $.number),
),

boolean: _ => choice("true", "false"),

number: _ => number,
Expand Down
32 changes: 32 additions & 0 deletions src/grammar.json

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

30 changes: 30 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

0 comments on commit b43b00a

Please sign in to comment.