Skip to content

Commit e0333a4

Browse files
committed
clientmethods recognizes as javascript
1 parent 2f51003 commit e0333a4

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

syntaxes/objectscript-class.tmLanguage.json

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,32 @@
283283
}
284284
},
285285
{
286-
"begin": "(?i)^(\\b(?:Client)?(?:Class)?Method\\b)(\\s+)((?:%|%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)|(?:\"[^\".]+\"))",
286+
"begin": "(?i)^(\\bClient(?:Class)?Method\\b)(\\s+)((?:%|%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)|(?:\"[^\".]+\"))",
287+
"beginCaptures": {
288+
"1": {
289+
"name": "keyword.objectscript_class"
290+
},
291+
"2": {
292+
"name": "whitespace.objectscript_class"
293+
},
294+
"3": {
295+
"name": "entity.name.function.objectscript_class"
296+
}
297+
},
298+
"patterns": [
299+
{
300+
"include": "#jsmethod"
301+
}
302+
],
303+
"end": "^(})$",
304+
"endCaptures": {
305+
"1": {
306+
"name": "punctuation.objectscript_class"
307+
}
308+
}
309+
},
310+
{
311+
"begin": "(?i)^(\\b(?:Class)?Method\\b)(\\s+)((?:%|%?[a-zA-Z][0-9a-zA-Z]*(?:_[0-9a-zA-Z]+)*)|(?:\"[^\".]+\"))",
287312
"beginCaptures": {
288313
"1": {
289314
"name": "keyword.objectscript_class"
@@ -460,6 +485,26 @@
460485
}
461486
]
462487
},
488+
"jscode": {
489+
"patterns": [
490+
{
491+
"begin": "^({)",
492+
"beginCaptures": {
493+
"1": {
494+
"name": "punctuation.objectscript_class"
495+
}
496+
},
497+
"patterns": [
498+
{
499+
"include": "source.js"
500+
}
501+
],
502+
"contentName": "text.js",
503+
"end": "^(?=})",
504+
"endCaptures": []
505+
}
506+
]
507+
},
463508
"comments": {
464509
"patterns": [
465510
{
@@ -601,6 +646,22 @@
601646
}
602647
]
603648
},
649+
"jsmethod": {
650+
"patterns": [
651+
{
652+
"include": "#formal_spec"
653+
},
654+
{
655+
"include": "#as"
656+
},
657+
{
658+
"include": "#params"
659+
},
660+
{
661+
"include": "#jscode"
662+
}
663+
]
664+
},
604665
"params": {
605666
"patterns": [
606667
{

0 commit comments

Comments
 (0)