Skip to content

Commit

Permalink
Highlighting support for LOC and GLO prefixes
Browse files Browse the repository at this point in the history
also removed some trailing spaces from files.
  • Loading branch information
fushnisoft committed Dec 6, 2013
1 parent c164b25 commit 3e0cd8c
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 19 deletions.
14 changes: 14 additions & 0 deletions Messages/1.0.5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SublimeText package for Clarion
===============================

v1.0.5 installed!

Updates:
--------

ADDED: Highligting - support for LOC: and GLO: prefixes. Highligting scope "variable.parameter"

Support:
--------

https://github.com/fushnisoft/SublimeClarion/issues
2 changes: 1 addition & 1 deletion Messages/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Thanks for installing the SublimeText package for Clarion!
Support:
--------

https://github.com/fushnisoft/SublimeClarion/issues
https://github.com/fushnisoft/SublimeClarion/issues
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ and add the following, where you alter give the absolute path to YOUR .sln
"build_systems":
[
{
"name": "Clarion",
"name": "Clarion",

//name your sublime-project the same as your .sln
"cmd": [
"${packages}\\Clarion\\CompileCW.cmd",
"cmd": [
"${packages}\\Clarion\\CompileCW.cmd",

// What to build, convention is the same folder and basename as this sublime-project file, but with a .sln instead
"${project/\\.sublime-project/\\.sln/}",
//or hard code the absolute path to the sln, for example; // "c:\\HG\\TSI\\CW\\Est\\B47.sln",

// Build Configuration typcially Debug|Release
// Build Configuration typcially Debug|Release
"Debug",
// "Release",

//CWRoot
"C:\\SV\\Clarion8",
//CWRoot
"C:\\SV\\Clarion8",

//(Optional) CW_Ver, such as "8.0.9579" will default to current
""
""
],

//Appropriate for MSBuild in general
//uses perl style regex: (maybe this) http://www.cs.tut.fi/~jkorpela/perl/regexp.html
"file_regex": "^\\s*(.*)\\(([0-9]*),([0-9]*)"
"file_regex": "^\\s*(.*)\\(([0-9]*),([0-9]*)"

//"working_dir": "${project_path}:${folder}}",
//"shell" : true,

//Documentation on build systems: see http://docs.sublimetext.info/en/latest/reference/build_systems.html
//Documentation on build systems: see http://docs.sublimetext.info/en/latest/reference/build_systems.html
}
]

Expand Down
18 changes: 12 additions & 6 deletions Support/Clarion.JSON-tmLanguage
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ "name": "Clarion",
"scopeName": "source.clarion",
"scopeName": "source.clarion",
"fileTypes": ["clw", "equ", "inc", "int", "txa", "txd", "tpl", "tpw"],
"patterns": [
{ "include": "#comments" },
Expand All @@ -8,6 +8,7 @@
{ "include": "#langConstants" },
{ "include": "#langProps" },
{ "include": "#langFunctions" },
{ "include": "#userVars" },
{ "include": "#implicits" },
{ "include": "#hardReservedKeywords" },
{ "include": "#softReservedKeywords" },
Expand All @@ -17,14 +18,14 @@
{ "include": "#strings" },
{ "include": "#attributes" },
{ "include": "#operators" },
{ "include": "#currencyInPicture" },
{ "include": "#currencyInPicture" },
{ "include": "#numericConstants" }
],

"repository": {

"comments": {
"match": "(\\!|\\|).*",
"match": "(\\!|\\|).*",
"name": "comment.line.clarion",
"comment": "Comments"
},
Expand All @@ -46,7 +47,7 @@
"hardReservedKeywords": {
"match": "\\b(?i:ACCEPT|BREAK|BY|CASE|CHOOSE|CYCLE|DO|ELSE|ELSIF|END|EXECUTE|EXIT|FUNCTION|GOTO|IF|LOOP|MEMBER|NEW|OF|OROF|PARENT|PROCEDURE|PROGRAM|RETURN|ROUTINE|SELF|THEN|TIMES|TO|UNTIL|WHILE)\\b",
"name": "keyword.clarion"
},
},

"softReservedKeywords": {
"match": "\\b(?i:APPLICATION|CLASS|CODE|DATA|DETAIL|ENUM|FILE|FOOTER|FORM|GROUP|HEADER|INLINE|ITEM|JOIN|MAP|MENU|MENUBAR|MODULE|OLECONTROL|OPTION|QUEUE|RECORD|REPORT|ROW|SHEET|STRUCT|TAB|TABLE|TOOLBAR|VIEW|WINDOW|PROPERTY|INDEXER)\\b",
Expand Down Expand Up @@ -88,6 +89,11 @@
"name": "support.constant.clarion"
},

"userVars": {
"match": "\\b(?i:LOC|GLO):\\w*\\b",
"name": "variable.parameter.clarion"
},

"implicits": {
"match": "([A-Za-z][A-Za-z0-9_]+)(\\$|#|\")",
"name": "keyword.implicit.clarion",
Expand All @@ -112,11 +118,11 @@
"name": "constant.numeric.clarion"
},

"strings": {
"strings": {
"name": "string.quoted.single.clarion",
"begin": "\\'",
"end": "\\'"
}
}

},

Expand Down
11 changes: 11 additions & 0 deletions Support/Clarion.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<key>include</key>
<string>#langFunctions</string>
</dict>
<dict>
<key>include</key>
<string>#userVars</string>
</dict>
<dict>
<key>include</key>
<string>#implicits</string>
Expand Down Expand Up @@ -231,6 +235,13 @@
<key>name</key>
<string>string.quoted.single.clarion</string>
</dict>
<key>userVars</key>
<dict>
<key>match</key>
<string>\b(?i:LOC|GLO):\w*\b</string>
<key>name</key>
<string>variable.parameter.clarion</string>
</dict>
</dict>
<key>scopeName</key>
<string>source.clarion</string>
Expand Down
Binary file added Support/Clarion.tmLanguage.cache
Binary file not shown.
Binary file added Support/ClarionSymbols.tmPreferences.cache
Binary file not shown.
Binary file added Support/Comments.tmPreferences.cache
Binary file not shown.
5 changes: 3 additions & 2 deletions messages.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"install": "Messages/install.txt",
"1.0.4": "Messages/1.0.4.txt"
"install": "Messages/install.txt",
"1.0.4": "Messages/1.0.4.txt",
"1.0.5": "Messages/1.0.5.txt"
}

0 comments on commit 3e0cd8c

Please sign in to comment.