Skip to content

Commit 0a0e761

Browse files
committed
TextMate Grammar: Add support from re-exports
1 parent fece71e commit 0a0e761

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

editors/vscode/slint.tmLanguage.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,17 @@
160160
"include": "#comment"
161161
}
162162
]
163+
},
164+
{
165+
"match": "\\s*(from)\\s*(\"[^\"]*\")\\s*;",
166+
"captures": {
167+
"1": {
168+
"name": "keyword.other.from.slint"
169+
},
170+
"2": {
171+
"name": "string.quoted.double.export-path.slint"
172+
}
173+
}
163174
}
164175
]
165176
},

editors/vscode/tests/grammar/basic.slint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
// ^^ keyword.other.as.slint
6363
// ^^^^^^^^ entity.name.type.export-list.slint
6464
// ^^^^^^^^^^ entity.name.type.export-list.slint
65+
export { Foo } from "bar.slint";
66+
//^^^^^^ keyword.other.export.slint
67+
// ^^^ entity.name.type.export-list.slint
68+
// ^^^^ keyword.other.from.slint
69+
// ^^^^^^^^^^^ string.quoted.double.export-path.slint
6570
struct Foobar { }
6671
//^^^^^^ keyword.declaration.struct.slint
6772
// ^^^^^^ entity.name.type.struct.slint

0 commit comments

Comments
 (0)