Skip to content

Commit

Permalink
small fixes in syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Aug 12, 2019
1 parent 48f77f1 commit 8ef3dfb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
14 changes: 9 additions & 5 deletions syntaxes/objectscript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scopeName": "source.objectscript",
"patterns": [
{
"match": "^(ROUTINE)\\s(\\b[a-zA-Z0-9]+\\b)",
"match": "^(ROUTINE)\\s(\\b[a-zA-Z0-9.]+\\b)",
"captures": {
"1": { "name": "keyword.control" },
"2": { "name": "entity.name.class" }
Expand Down Expand Up @@ -98,19 +98,19 @@
"commands": {
"patterns": [
{
"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(?=( (?![=+-]|\\&|\\|)|:|$))",
"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(?=( (?![=+-]|\\&|\\|)|:|$))",
"captures": { "1": { "name": "keyword.control.objectscript" } }
},
{
"match": "(?i)(?<=\\s)\\b(LOCK|L)\\b(?=( (?![=]|\\&|\\|)|:|$))",
"match": "(?i)(?<=\\s|\\.)\\b(LOCK|L)\\b(?=( (?![=]|\\&|\\|)|:|$))",
"captures": { "1": { "name": "keyword.control.objectscript" } }
}
]
},
"control-commands": {
"patterns": [
{
"match": "(?i)(?<=\\s)\\b(IF|I|WHILE|FOR|F|TRY|CATCH|ELSE|E|ELSEIF)\\b(?=( (?![=+-]|\\&|\\|)|:|$))",
"match": "(?i)(?<=\\s|\\.)\\b(IF|I|WHILE|FOR|F|TRY|CATCH|ELSE|E|ELSEIF)\\b(?=( (?![=+-]|\\&|\\|)|:|$))",
"captures": { "1": { "name": "keyword.control.objectscript" } }
}
]
Expand Down Expand Up @@ -214,9 +214,13 @@
"name": "variable.name.objectscrip"
},
{
"match": "\\^%?[a-zA-Z0-9]+",
"match": "\\^%?[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)*",
"name": "variable.name.global.objectscrip"
},
{
"match": "(?i)\\$system(.[a-zA-Z0-9]+)*",
"name": "entity.name.function.system.objectscript"
},
{
"match": "\\$[a-zA-Z0-9]+",
"name": "entity.name.function.system.objectscript"
Expand Down
16 changes: 8 additions & 8 deletions test/extension.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as assert from "assert";
// import * as assert from "assert";

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

// Defines a Mocha test suite to group tests of similar kind together
suite("Extension Tests", () => {
// Defines a Mocha unit test
test("Something 1", () => {
assert.equal(-1, [1, 2, 3].indexOf(5));
assert.equal(-1, [1, 2, 3].indexOf(0));
});
});
// suite("Extension Tests", () => {
// // Defines a Mocha unit test
// test("Something 1", () => {
// assert.equal(-1, [1, 2, 3].indexOf(5));
// assert.equal(-1, [1, 2, 3].indexOf(0));
// });
// });
18 changes: 9 additions & 9 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

import * as testRunner from "vscode/lib/testrunner";
// import * as testRunner from "vscode/lib/testrunner";

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

module.exports = testRunner;
// module.exports = testRunner;

0 comments on commit 8ef3dfb

Please sign in to comment.