Skip to content

Commit 8ef3dfb

Browse files
committed
small fixes in syntax highlighting
1 parent 48f77f1 commit 8ef3dfb

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

Diff for: syntaxes/objectscript.tmLanguage.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scopeName": "source.objectscript",
55
"patterns": [
66
{
7-
"match": "^(ROUTINE)\\s(\\b[a-zA-Z0-9]+\\b)",
7+
"match": "^(ROUTINE)\\s(\\b[a-zA-Z0-9.]+\\b)",
88
"captures": {
99
"1": { "name": "keyword.control" },
1010
"2": { "name": "entity.name.class" }
@@ -98,19 +98,19 @@
9898
"commands": {
9999
"patterns": [
100100
{
101-
"match": "(?i)(?<=\\s)\\b(BREAK|B|SET|S|DO|D|KILL|K|GOTO|G|READ|R|WRITE|W|OPEN|O|USE|U|CLOSE|C|CONTINUE|FOR|F|HALT|H|HANG|JOB|J|MERGE|M|NEW|N|QUIT|Q|RETURN|RET|TSTART|TS|TCOMMIT|TC|TROLLBACK|TRO|THROW|VIEW|V|XECUTE|X|ZKILL|ZL|ZNSPACE|ZN|ZTRAP|ZWRITE|ZW|ZZDUMP|ZZWRITE)\\b(?=( (?![=+-]|\\&|\\|)|:|$))",
101+
"match": "(?i)(?<=\\s|\\.)\\b(BREAK|B|SET|S|DO|D|KILL|K|GOTO|G|READ|R|WRITE|W|OPEN|O|USE|U|CLOSE|C|CONTINUE|FOR|F|HALT|H|HANG|JOB|J|MERGE|M|NEW|N|QUIT|Q|RETURN|RET|TSTART|TS|TCOMMIT|TC|TROLLBACK|TRO|THROW|VIEW|V|XECUTE|X|ZKILL|ZL|ZNSPACE|ZN|ZTRAP|ZWRITE|ZW|ZZDUMP|ZZWRITE)\\b(?=( (?![=+-]|\\&|\\|)|:|$))",
102102
"captures": { "1": { "name": "keyword.control.objectscript" } }
103103
},
104104
{
105-
"match": "(?i)(?<=\\s)\\b(LOCK|L)\\b(?=( (?![=]|\\&|\\|)|:|$))",
105+
"match": "(?i)(?<=\\s|\\.)\\b(LOCK|L)\\b(?=( (?![=]|\\&|\\|)|:|$))",
106106
"captures": { "1": { "name": "keyword.control.objectscript" } }
107107
}
108108
]
109109
},
110110
"control-commands": {
111111
"patterns": [
112112
{
113-
"match": "(?i)(?<=\\s)\\b(IF|I|WHILE|FOR|F|TRY|CATCH|ELSE|E|ELSEIF)\\b(?=( (?![=+-]|\\&|\\|)|:|$))",
113+
"match": "(?i)(?<=\\s|\\.)\\b(IF|I|WHILE|FOR|F|TRY|CATCH|ELSE|E|ELSEIF)\\b(?=( (?![=+-]|\\&|\\|)|:|$))",
114114
"captures": { "1": { "name": "keyword.control.objectscript" } }
115115
}
116116
]
@@ -214,9 +214,13 @@
214214
"name": "variable.name.objectscrip"
215215
},
216216
{
217-
"match": "\\^%?[a-zA-Z0-9]+",
217+
"match": "\\^%?[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)*",
218218
"name": "variable.name.global.objectscrip"
219219
},
220+
{
221+
"match": "(?i)\\$system(.[a-zA-Z0-9]+)*",
222+
"name": "entity.name.function.system.objectscript"
223+
},
220224
{
221225
"match": "\\$[a-zA-Z0-9]+",
222226
"name": "entity.name.function.system.objectscript"

Diff for: test/extension.test.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import * as assert from "assert";
1+
// import * as assert from "assert";
22

33
// You can import and use all API from the 'vscode' module
44
// as well as import your extension to test it
55
// import * as vscode from 'vscode';
66
// import * as myExtension from '../extension';
77

88
// Defines a Mocha test suite to group tests of similar kind together
9-
suite("Extension Tests", () => {
10-
// Defines a Mocha unit test
11-
test("Something 1", () => {
12-
assert.equal(-1, [1, 2, 3].indexOf(5));
13-
assert.equal(-1, [1, 2, 3].indexOf(0));
14-
});
15-
});
9+
// suite("Extension Tests", () => {
10+
// // Defines a Mocha unit test
11+
// test("Something 1", () => {
12+
// assert.equal(-1, [1, 2, 3].indexOf(5));
13+
// assert.equal(-1, [1, 2, 3].indexOf(0));
14+
// });
15+
// });

Diff for: test/index.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
// to report the results back to the caller. When the tests are finished, return
1111
// a possible error to the callback or null if none.
1212

13-
import * as testRunner from "vscode/lib/testrunner";
13+
// import * as testRunner from "vscode/lib/testrunner";
1414

15-
// You can directly control Mocha options by configuring the test runner below
16-
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options
17-
// for more info
18-
testRunner.configure({
19-
ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.)
20-
useColors: true, // colored output from test results
21-
});
15+
// // You can directly control Mocha options by configuring the test runner below
16+
// // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options
17+
// // for more info
18+
// testRunner.configure({
19+
// ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.)
20+
// useColors: true, // colored output from test results
21+
// });
2222

23-
module.exports = testRunner;
23+
// module.exports = testRunner;

0 commit comments

Comments
 (0)