Skip to content

Commit 477915e

Browse files
author
Monte Goulding
committed
Fixed grammar issues so colorisation works along with command and function now coping with private before and after and constant name not changed from iRev. In theory iRev should be able to include this grammar with include: 'source.livecodescript' where appropriate rather than duplicate.
1 parent e6c746f commit 477915e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

grammars/livecodescript.cson

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66
'fileTypes': [
77
'livecodescript'
88
]
9+
'patterns': [
10+
{
11+
include: "#language"
12+
}
13+
]
914
repository:
1015
constants:
1116
patterns: [
1217
{
1318
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"
14-
name: "constant.language.iRev"
19+
name: "constant.language.livecodescript"
1520
}
1621
]
17-
"function-call":
18-
match: "[A-Za-z_][A-Za-z_0-9]*(?=\\s*\\()"
19-
name: "meta.function-call.livecodescript"
2022
language:
2123
patterns: [
2224
{
@@ -71,7 +73,7 @@ repository:
7173
name: "entity.name.function.livecodescript"
7274
"3":
7375
name: "variable.parameter.livecodescript"
74-
match: "(?:^\\s*)((?i)function)\\s+([A-Za-z_0-9-]+)(\\s+[A-Za-z_0-9-]+,*?\\s+.*)*"
76+
match: "((?i)function)\\s+([A-Za-z_0-9-]+)(\\s+[A-Za-z_0-9-]+,*?\\s+.*)*"
7577
name: "meta.function.livecodescript"
7678
}
7779
{
@@ -91,7 +93,7 @@ repository:
9193
name: "entity.name.command.livecodescript"
9294
"3":
9395
name: "variable.parameter.livecodescript"
94-
match: "(?:^\\s*)((?i)command|on)\\s+([A-Za-z_0-9-]+)(\\s+[A-Za-z_0-9-]+,*?\\s+.*)*"
96+
match: "((?i)before|after|command|on)\\s+([A-Za-z_0-9-]+)(\\s+[A-Za-z_0-9-]+,*?\\s+.*)*"
9597
name: "meta.command.livecodescript"
9698
}
9799
{

0 commit comments

Comments
 (0)