Skip to content

Commit

Permalink
Parse digits in sigil modifiers (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko authored Oct 4, 2021
1 parent 3817c5f commit ab50f8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ module.exports = grammar({
)
)
),
optional(alias(token.immediate(/[a-zA-Z]+/), $.sigil_modifiers))
optional(alias(token.immediate(/[a-zA-Z0-9]+/), $.sigil_modifiers))
),

keywords: ($) =>
Expand Down
10 changes: 10 additions & 0 deletions test/corpus/expression/sigil.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,20 @@ modifiers

~r/left|right/i
~r/left|right/iUx
~r/left|right/0
~r/left|right/u8

---

(source
(sigil
(sigil_name)
(quoted_content)
(sigil_modifiers))
(sigil
(sigil_name)
(quoted_content)
(sigil_modifiers))
(sigil
(sigil_name)
(quoted_content)
Expand Down

0 comments on commit ab50f8b

Please sign in to comment.