Skip to content

Commit 554c0d4

Browse files
committed
add integer literal syntax to textmate
1 parent 8685878 commit 554c0d4

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

generated/syntax/slua.tmLanguage

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,19 +488,19 @@
488488
<key>name</key>
489489
<string>constant.numeric.hex.luau</string>
490490
<key>match</key>
491-
<string>\b0_*[xX]_*[\da-fA-F_]*(?:[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
491+
<string>\b0_*[xX]_*[\da-fA-F_]*(?:i|[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
492492
</dict>
493493
<dict>
494494
<key>name</key>
495495
<string>constant.numeric.binary.luau</string>
496496
<key>match</key>
497-
<string>\b0_*[bB][01_]+(?:[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
497+
<string>\b0_*[bB][01_]+(?:i|[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
498498
</dict>
499499
<dict>
500500
<key>name</key>
501501
<string>constant.numeric.decimal.luau</string>
502502
<key>match</key>
503-
<string>(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
503+
<string>(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:i|[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
504504
</dict>
505505
</array>
506506
</dict>

generated/syntax/slua.tmLanguage.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@
275275
"patterns": [
276276
{
277277
"name": "constant.numeric.hex.luau",
278-
"match": "\\b0_*[xX]_*[\\da-fA-F_]*(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
278+
"match": "\\b0_*[xX]_*[\\da-fA-F_]*(?:i|[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
279279
},
280280
{
281281
"name": "constant.numeric.binary.luau",
282-
"match": "\\b0_*[bB][01_]+(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
282+
"match": "\\b0_*[bB][01_]+(?:i|[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
283283
},
284284
{
285285
"name": "constant.numeric.decimal.luau",
286-
"match": "(?:\\d[\\d_]*(?:\\.[\\d_]*)?|\\.\\d[\\d_]*)(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
286+
"match": "(?:\\d[\\d_]*(?:\\.[\\d_]*)?|\\.\\d[\\d_]*)(?:i|[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
287287
}
288288
]
289289
},

templates/syntax/slua.tmLanguage

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,19 +488,19 @@
488488
<key>name</key>
489489
<string>constant.numeric.hex.luau</string>
490490
<key>match</key>
491-
<string>\b0_*[xX]_*[\da-fA-F_]*(?:[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
491+
<string>\b0_*[xX]_*[\da-fA-F_]*(?:i|[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
492492
</dict>
493493
<dict>
494494
<key>name</key>
495495
<string>constant.numeric.binary.luau</string>
496496
<key>match</key>
497-
<string>\b0_*[bB][01_]+(?:[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
497+
<string>\b0_*[bB][01_]+(?:i|[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
498498
</dict>
499499
<dict>
500500
<key>name</key>
501501
<string>constant.numeric.decimal.luau</string>
502502
<key>match</key>
503-
<string>(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
503+
<string>(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:i|[eE][\+\-]?_*\d[\d_]*(?:\.[\d_]*)?)?</string>
504504
</dict>
505505
</array>
506506
</dict>

templates/syntax/slua.tmLanguage.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@
275275
"patterns": [
276276
{
277277
"name": "constant.numeric.hex.luau",
278-
"match": "\\b0_*[xX]_*[\\da-fA-F_]*(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
278+
"match": "\\b0_*[xX]_*[\\da-fA-F_]*(?:i|[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
279279
},
280280
{
281281
"name": "constant.numeric.binary.luau",
282-
"match": "\\b0_*[bB][01_]+(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
282+
"match": "\\b0_*[bB][01_]+(?:i|[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
283283
},
284284
{
285285
"name": "constant.numeric.decimal.luau",
286-
"match": "(?:\\d[\\d_]*(?:\\.[\\d_]*)?|\\.\\d[\\d_]*)(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
286+
"match": "(?:\\d[\\d_]*(?:\\.[\\d_]*)?|\\.\\d[\\d_]*)(?:i|[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"
287287
}
288288
]
289289
},

0 commit comments

Comments
 (0)