Skip to content

Commit 0d3924b

Browse files
committed
Add mod tests
1 parent 4b3ae73 commit 0d3924b

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Syntax/Just.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ contexts:
210210
2: meta.generic-name.just
211211

212212
modules:
213-
- match: ^(mod)(\??)(\s+\w+)
213+
- match: ^(mod)(\??)\s+({{valid_name}})
214214
scope: meta.statement.mod.just
215215
captures:
216216
1: keyword.control.import.just

Syntax/tests/syntax_test_just.include.just

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,12 @@ mod foo2 'somewhere/else' # comment
2020
# ^ string.quoted.single.just punctuation.definition.string.begin.just
2121
# ^^^^^^^^^^^^^^^ string.quoted.single.just
2222

23+
mod foo3 f'fail{{}}'
24+
# ^^ invalid.illegal.just
25+
26+
mod? foo4 """testme"""
27+
# ^^^^ meta.statement.mod.just meta.generic-name.just
28+
# ^^^^^^^^^^^^ string.quoted.double.block.just
29+
2330
mod a `yes`
2431
# ^ invalid.illegal.just

0 commit comments

Comments
 (0)