Skip to content

Commit 061abbb

Browse files
Support digits in uppercase sigils (#68)
1 parent de690fa commit 061abbb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ module.exports = grammar({
334334
)
335335
),
336336
seq(
337-
alias(token.immediate(/[A-Z]+/), $.sigil_name),
337+
alias(token.immediate(/[A-Z][A-Z0-9]*/), $.sigil_name),
338338
choice(
339339
$._quoted_double,
340340
$._quoted_single,

test/corpus/expression/sigil.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,18 @@ upper sigil / multiple characters
194194
=====================================
195195

196196
~MAT"1 2"
197+
~I18N"text"
198+
~A1B2"text"
197199

198200
---
199201

200202
(source
203+
(sigil
204+
(sigil_name)
205+
(quoted_content))
206+
(sigil
207+
(sigil_name)
208+
(quoted_content))
201209
(sigil
202210
(sigil_name)
203211
(quoted_content)))

0 commit comments

Comments
 (0)