Skip to content

Commit ab0d11d

Browse files
committed
Add support for lua script.
1 parent 4f33eca commit ab0d11d

File tree

4 files changed

+57
-3
lines changed

4 files changed

+57
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Version 0.0.3: 22 October 2019
2+
- Add support for lua script
3+
14
## Version 0.0.2: 16 May 2019
25
- Add support for [asprin](https://github.com/potassco/asprin)
36

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "asp-syntax-highlight",
33
"displayName": "Answer Set Programming syntax highlighter",
44
"description": "Syntax highlighting for Answer Set Programming",
5-
"version": "0.0.2",
5+
"version": "0.0.3",
66
"publisher": "abelcour",
77
"engines": {
88
"vscode": "^1.18.0"

syntaxes/asp.tmLanguage

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</dict>
102102
<dict>
103103
<key>comment</key>
104-
<string>Gringo script</string>
104+
<string>Gringo script python</string>
105105
<key>begin</key>
106106
<string>#script\s*\(\s*python\s*\)</string>
107107
<key>beginCaptures</key>
@@ -130,6 +130,37 @@
130130
</dict>
131131
</array>
132132
</dict>
133+
<dict>
134+
<key>comment</key>
135+
<string>Gringo script lua</string>
136+
<key>begin</key>
137+
<string>#script\s*\(\s*lua\s*\)</string>
138+
<key>beginCaptures</key>
139+
<dict>
140+
<key>0</key>
141+
<dict>
142+
<key>name</key>
143+
<string>support.function.asp</string>
144+
</dict>
145+
</dict>
146+
<key>end</key>
147+
<string>#end</string>
148+
<key>endCaptures</key>
149+
<dict>
150+
<key>0</key>
151+
<dict>
152+
<key>name</key>
153+
<string>support.function.asp</string>
154+
</dict>
155+
</dict>
156+
<key>patterns</key>
157+
<array>
158+
<dict>
159+
<key>include</key>
160+
<string>source.lua</string>
161+
</dict>
162+
</array>
163+
</dict>
133164
<dict>
134165
<key>name</key>
135166
<string>entity.name.tag.asp</string>

syntaxes/asp.tmLanguage.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"match": "#(maximize|minimize|show|hide|showsig|sup|inf|true|false|forget|external|cumulative|disjoint|const|base|include|program)\\b"
6464
},
6565
{
66-
"comment": "Gringo script",
66+
"comment": "Gringo script python",
6767
"begin": "#script\\s*\\(\\s*python\\s*\\)",
6868
"beginCaptures": {
6969
"0": {
@@ -82,6 +82,26 @@
8282
}
8383
]
8484
},
85+
{
86+
"comment": "Gringo script lua",
87+
"begin": "#script\\s*\\(\\s*lua\\s*\\)",
88+
"beginCaptures": {
89+
"0": {
90+
"name": "support.function.asp"
91+
}
92+
},
93+
"end": "#end",
94+
"endCaptures": {
95+
"0": {
96+
"name": "support.function.asp"
97+
}
98+
},
99+
"patterns":[
100+
{
101+
"include": "source.lua"
102+
}
103+
]
104+
},
85105
{
86106
"name": "entity.name.tag.asp",
87107
"match": "[a-z][A-Za-z0-9_]*"

0 commit comments

Comments
 (0)