diff --git a/package.json b/package.json index 6bcd067..478d0fc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cod-sense", "displayName": "CoD-Sense", "description": "Syntax highlighting for Call of Duty scripts", - "version": "1.0.1", + "version": "1.0.2", "publisher": "se2dev", "icon": "images/cod-sense_logo_128x128.png", "homepage": "https://github.com/SE2Dev/CoD-Sense/blob/development/README.md", @@ -29,10 +29,13 @@ "id": "gsc", "aliases": [ "GSC", - "gsc" + "gsc", + "GSX", + "gsx" ], "extensions": [ ".gsc", + ".gsx", ".csc" ], "configuration": "./gsc.configuration.json" @@ -43,6 +46,11 @@ "language": "gsc", "scopeName": "source.gsc", "path": "./syntaxes/gsc.tmLanguage" + }, + { + "language": "gsx", + "scopeName": "source.gsx", + "path": "./syntaxes/gsx.tmLanguage" } ], "configuration": { @@ -73,5 +81,10 @@ "tslint": "^5.8.0", "@types/node": "^7.0.43", "@types/mocha": "^2.2.42" + }, + "__metadata": { + "id": "27c80a99-0ab4-4930-918b-9a3577605e9a", + "publisherId": "695ee91d-a52c-4964-8d62-4c14ba67a819", + "publisherDisplayName": "SE2Dev" } -} +} \ No newline at end of file diff --git a/syntaxes/gsx.tmLanguage b/syntaxes/gsx.tmLanguage new file mode 100644 index 0000000..362a5dc --- /dev/null +++ b/syntaxes/gsx.tmLanguage @@ -0,0 +1,313 @@ + + + + + fileTypes + + gsx + + + name + gsx + + scopeName + source.gsx + + foldingStartMarker + \{ + foldingStopMarker + \} + + patterns + + + + begin + ^\s*(#include\b)\s*([^;]*);? + beginCaptures + + 1 + + name + keyword.control.import.include + + + 2 + + name + string.filename.gsx + + + + end + \s + + + + + match + #using_animtree\b + + name + meta.preprocessor.c + + + + + match + //.* + + name + comment.line + + + + + begin + /\* + beginCaptures + + 0 + + name + comment.begin + + + end + \*/ + endCaptures + + 0 + + name + comment.end + + + name + comment.block.gsx + + + + + begin + /# + beginCaptures + + 0 + + name + comment.begin + + + end + #/ + endCaptures + + 0 + + name + comment.end + + + name + comment.block.developerscript.gsx + + + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.gsx + + + end + (?<!\\)["\n\r] + endCaptures + + 1 + + name + punctuation.definition.string.end.gsx + + + name + string.quoted.double.gsx + + + + + match + (?<![a-zA-Z]-)(?<![a-zA-Z])\b\d+\.?f? + name + constant.numeric.c + + + + match + (i*)\b(true|false)\b + name + constant.language.c + + + + + match + \b(if|else|switch|case|break|continue|for|while|return)\b + + name + keyword.control.c + + + + + match + \b(level|player|self)\b + + name + support.variable.gsx + + + + match + \bthread\b + + name + support.type.gsx + + + + + match + (_?[a-zA-Z\-_]\w*)(?=\s*\(.*\).*) + + captures + + 1 + + name + entity.name.function.c + + + + + + include + #block + + + + repository + + + block + + patterns + + + begin + \{ + beginCaptures + + 0 + + name + punctuation.section.block.begin.gsx + + + end + \} + endCaptures + + 0 + + name + punctuation.section.block.end.gsx + + + + name + meta.block.gsx + + patterns + + + include + #block_innards + + + + + include + $base + + + + + + + block_innards + + patterns + + + include + #function_call + + + + include + #function_ptr + + + + + include + #block + + + + + + function_call + + match + (_?[a-zA-Z\-_]\w*)(?=\s*\(.*\).*) + + captures + + 1 + + name + support.function.any-method.gsx + + + + + + + function_ptr + + match + ::\b(\w+)\b + + captures + + 1 + + name + support.function.any-method.gsx + + + + + +