Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc3c07c

Browse filesBrowse files
committed
Merge pull request #20 from montegoulding/bugfix/version0.6issues
Fixes for LiveCode Script support * Support for `if...then...else` * Autocomplete local symbols * Avoid clobbering autocomplete settings * Better support for `switch` indentation * Improved variable & constant capturing Closes #16 Closes #18
2 parents 8ce3c13 + 39b76c4 commit fc3c07c
Copy full SHA for fc3c07c

File tree

3 files changed

+30886
-30523
lines changed
Filter options

3 files changed

+30886
-30523
lines changed

‎grammars/livecodescript.cson

Copy file name to clipboardExpand all lines: grammars/livecodescript.cson
+12-20Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ repository:
1919
match: "(?i)\\b(SIX|TEN|FORMFEED|NINE|ZERO|NONE|SPACE|FOUR|FALSE|COLON|CRLF|PI|COMMA|ENDOFFILE|EOF|EIGHT|FIVE|QUOTE|EMPTY|ONE|TRUE|((?<=\\w\\s)RETURN)|CR|LINEFEED|RIGHT|BACKSLASH|NULL|SEVEN|TAB|THREE|TWO)\\b"
2020
name: "constant.language.livecodescript"
2121
}
22+
{
23+
match: "\\bk[A-Z]{1}.*?\\b"
24+
name: "constant.language.livecodescript"
25+
}
2226
]
2327
language:
2428
patterns: [
@@ -55,7 +59,7 @@ repository:
5559
'name': 'comment.line.livecodescript'
5660
}
5761
{
58-
match: "\\b(after|byte(s)*|codepoint(s)*|codeunit(s)*|english|segment(s)*|sentence(s)*|paragraph|the|trueWord(s)*|until|word(s)*|http|forever|descending|using|line|real8|with|seventh|for|stdout|finally|element|word|fourth|before|black|ninth|sixth|characters|chars|stderr|uInt(1|1s|2|2s)|stdin|string|lines|relative|rel|any|fifth|items|from|middle|mid|at|else|of|catch|then|third|it|file|milli(seconds|second|secs|sec)|int(1|1s|4|4s|ernet|2|2s)|normal|text|item|last|long|detailed|effective|uInt4|uInt4s|se(conds|cond|cs|c)|repeat|end\\s+repeat|URL|in|end\\s+try|into|switch|end\\s+switch|to|words|https|token|binfile|each|tenth|as|ticks|tick|system|real4|by|dateItems|without|cha(r|racter)|ascending|eighth|whole|dateTime|numeric|short|first|ftp|integer|abbreviated|abb(r|rev)|private|case|while|if|end\\s+if)\\b"
62+
match: "\\b(after|byte(s)*|codepoint(s)*|codeunit(s)*|english|segment(s)*|sentence(s)*|paragraph|the|trueWord(s)*|until|word(s)*|http|forever|descending|using|line|real8|with|seventh|for|stdout|finally|element|word|fourth|before|black|ninth|sixth|characters|chars|stderr|uInt(1|1s|2|2s)|stdin|string|lines|relative|rel|any|fifth|items|from|middle|mid|at|else|of|catch|then|third|it|file|milli(seconds|second|secs|sec)|int(1|1s|4|4s|ernet|2|2s)|normal|text|item|last|long|detailed|effective|uInt4|uInt4s|se(conds|cond|cs|c)|repeat|end\\s+repeat|URL|in|end\\s+try|into|switch|end\\s+switch|to|words|https|token|binfile|each|tenth|as|ticks|tick|system|real4|by|dateItems|without|cha(r|racter)|ascending|eighth|whole|dateTime|numeric|short|first|ftp|integer|abbreviated|abb(r|rev)|private|case|default|while|if|end\\s+if)\\b"
5963
name: "keyword.control.livecodescript"
6064
}
6165
{
@@ -165,29 +169,17 @@ repository:
165169
}
166170
]
167171
var_global:
168-
captures:
169-
"1":
170-
name: "punctuation.definition.variable.livecodescript"
171-
match: "\\b(g)[A-Z]{1}.*?\\b"
172+
match: "\\bg[A-Z]{1}.*?\\b"
172173
name: "variable.other.global.livecodescript"
173174
var_local:
174-
captures:
175-
"1":
176-
name: "punctuation.definition.variable.livecodescript"
177-
match: "\\b(t|the)[A-Z]{1}.*?\\b"
178-
name: "variable.other.global.livecodescript"
175+
match: "\\bt[he]*[A-Z]{1}.*?\\b"
176+
name: "variable.other.local.livecodescript"
179177
var_parameter:
180-
captures:
181-
"1":
182-
name: "punctuation.definition.variable.livecodescript"
183-
match: "\\b(p)[A-Z]{1}.*?\\b"
184-
name: "variable.parameter.livecodescript"
178+
match: "\\bp[A-Z]{1}.*?\\b"
179+
name: "variable.other.param.livecodescript"
185180
var_scriptLocal:
186-
captures:
187-
"1":
188-
name: "punctuation.definition.variable.livecodescript"
189-
match: "\\b(s)[A-Z]{1}.*?\\b"
190-
name: "variable.other.global.livecodescript"
181+
match: "\\bs[A-Z]{1}.*?\\b"
182+
name: "variable.other.scriptlocal.livecodescript"
191183
var_server:
192184
match: "\\$_[A-Z]+"
193185
name: "variable.other.server.livecodescript"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.