Skip to content

Commit ab50f8b

Browse files
Parse digits in sigil modifiers (#3)
1 parent 3817c5f commit ab50f8b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

grammar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ module.exports = grammar({
344344
)
345345
)
346346
),
347-
optional(alias(token.immediate(/[a-zA-Z]+/), $.sigil_modifiers))
347+
optional(alias(token.immediate(/[a-zA-Z0-9]+/), $.sigil_modifiers))
348348
),
349349

350350
keywords: ($) =>

test/corpus/expression/sigil.txt

+10
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,20 @@ modifiers
219219

220220
~r/left|right/i
221221
~r/left|right/iUx
222+
~r/left|right/0
223+
~r/left|right/u8
222224

223225
---
224226

225227
(source
228+
(sigil
229+
(sigil_name)
230+
(quoted_content)
231+
(sigil_modifiers))
232+
(sigil
233+
(sigil_name)
234+
(quoted_content)
235+
(sigil_modifiers))
226236
(sigil
227237
(sigil_name)
228238
(quoted_content)

0 commit comments

Comments
 (0)