Skip to content

Commit 8ad71f5

Browse files
committed
feat: update coloration
1 parent 0baf073 commit 8ad71f5

File tree

9 files changed

+356
-200
lines changed

9 files changed

+356
-200
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
tags:
66
- "*"
77

8-
98
jobs:
109
deploy:
1110
runs-on: ubuntu-latest
@@ -17,4 +16,4 @@ jobs:
1716
uses: HaaLeo/publish-vscode-extension@v0
1817
with:
1918
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
20-
registryUrl: https://marketplace.visualstudio.com
19+
registryUrl: https://marketplace.visualstudio.com

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the "ark" extension will be documented in this file.
44

5+
## 0.9.0
6+
### Added
7+
-
8+
59
## 0.8.0
610
### Added
711
- support for the std functions and closures

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ The extension allows code coloration for the ArkScript programming language.
1010

1111
If you find any issue, please let me know on GitHub: https://github.com/ArkScript-lang/ArkScript-VSC.
1212

13-
Coloration of user functions doesn't work.
13+
Coloration of user functions doesn't work.

generation/builtins.json

Lines changed: 155 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,157 @@
11
{
2-
"functions": {
3-
"list": ["append", "append!", "concat", "concat!", "pop", "pop!", "list", "list:reverse", "list:find", "list:slice", "list:sort", "list:fill", "list:setAt"],
4-
"io": ["print", "puts", "input", "io:writeFile", "io:readFile", "io:fileExists\\?", "io:listFiles", "io:dir\\?", "io:makeDir", "io:removeFiles"],
5-
"time": ["time"],
6-
"system": ["sys:exec", "sys:sleep"],
7-
"string": ["str:format", "str:find", "str:removeAt"],
8-
"math": ["math:exp", "math:ln", "math:ceil", "math:floor", "math:round", "math:NaN\\?", "math:Inf\\?", "math:pi", "math:e",
9-
"math:tau", "math:Inf", "math:NaN", "math:cos", "math:sin", "math:tan", "math:arccos", "math:arcsin", "math:arctan"]
10-
},
11-
"arkdoc": ["brief", "details", "meta", "param", "author"]
2+
"functions": {
3+
"list": [
4+
"append",
5+
"append!",
6+
"concat",
7+
"concat!",
8+
"pop",
9+
"pop!",
10+
"list",
11+
"list:reverse",
12+
"list:find",
13+
"list:slice",
14+
"list:sort",
15+
"list:fill",
16+
"list:setAt",
17+
"@=",
18+
"@@=",
19+
"list:forEach",
20+
"list:product",
21+
"list:sum",
22+
"list:drop",
23+
"list:dropWhile",
24+
"list:filter",
25+
"list:map",
26+
"list:reduce",
27+
"list:flatten",
28+
"list:flatMap",
29+
"list:take",
30+
"list:takeWhile",
31+
"list:unzip",
32+
"list:zip",
33+
"list:zipWithIndex",
34+
"list:foldLeft",
35+
"list:forAll",
36+
"list:any",
37+
"list:countIf",
38+
"list:iterate",
39+
"list:iota",
40+
"list:chunkBy"
41+
],
42+
"io": [
43+
"print",
44+
"puts",
45+
"input",
46+
"io:writeFile",
47+
"io:appendToFile",
48+
"io:readFile",
49+
"io:fileExists\\?",
50+
"io:listFiles",
51+
"io:dir\\?",
52+
"io:makeDir",
53+
"io:removeFiles"
54+
],
55+
"time": [
56+
"time"
57+
],
58+
"system": [
59+
"sys:exec",
60+
"sys:sleep",
61+
"sys:exit"
62+
],
63+
"string": [
64+
"string:format",
65+
"string:find",
66+
"string:removeAt",
67+
"string:setAt",
68+
"string:chr",
69+
"string:ord",
70+
"string:toLower",
71+
"string:toUpper",
72+
"string:reverse",
73+
"string:slice",
74+
"string:split",
75+
"string:replace",
76+
"string:join"
77+
],
78+
"math": [
79+
"math:exp",
80+
"math:ln",
81+
"math:ceil",
82+
"math:floor",
83+
"math:round",
84+
"math:NaN\\?",
85+
"math:Inf\\?",
86+
"math:pi",
87+
"math:e",
88+
"math:tau",
89+
"math:Inf",
90+
"math:NaN",
91+
"math:cos",
92+
"math:sin",
93+
"math:tan",
94+
"math:arccos",
95+
"math:arcsin",
96+
"math:arctan",
97+
"math:abs",
98+
"math:even",
99+
"math:odd",
100+
"math:min",
101+
"math:max",
102+
"math:pow",
103+
"math:sqrt",
104+
"math:fibo",
105+
"math:divs",
106+
"math:log",
107+
"math:log2",
108+
"math:log10",
109+
"math:floordiv",
110+
"math:complex",
111+
"math:complex-add",
112+
"math:complex-sub",
113+
"math:complex-mul",
114+
"math:complex-conjugate",
115+
"math:complex-module",
116+
"math:complex-div"
117+
],
118+
"other": [
119+
"switch",
120+
"lazy:eval",
121+
"exceptions:throw",
122+
"exceptions:return",
123+
"exceptions:try",
124+
"range:range",
125+
"range:forEach",
126+
"range:filter",
127+
"range:map",
128+
"range:reduce",
129+
"os:home_dir",
130+
"test:case",
131+
"test:expect",
132+
"test:eq",
133+
"test:neq",
134+
"test:suite",
135+
"functional:compose",
136+
"functional:left",
137+
"functional:right",
138+
"functional:flip",
139+
"events:manager:make",
140+
"events:_check_valid",
141+
"events:on",
142+
"events:emitWith",
143+
"events:emit",
144+
"events:removeListenersOfType",
145+
"async",
146+
"await",
147+
"random"
148+
]
149+
},
150+
"arkdoc": [
151+
"brief",
152+
"details",
153+
"meta",
154+
"param",
155+
"author"
156+
]
12157
}

generation/language.structure.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"patterns": [
2626
{
2727
"name": "keyword.arkscript",
28-
"match": "\\b(if|while|begin|fun|let|import|set|mut|del|quote) "
28+
"match": "\\b(if|while|begin|fun|let|import|set|mut|del) "
2929
}
3030
]
3131
},
3232
"builtins": {
3333
"patterns": [
3434
{
3535
"name": "keyword.operator.ark",
36-
"match": "(<=|>=|!=|[-+*/<>=@]|len|empty\\?|firstOf|tailOf|headOf|nil\\?|assert|toNumber|toString|and|or|mod|type|hasField)"
36+
"match": "(<=|>=|!=|[-+*/<>=@]|len|empty\\?|head|tail|nil\\?|assert|toNumber|toString|and|or|mod|type|hasField)"
3737
}
3838
]
3939
},

generation/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ def main(std, language):
7676

7777
args = parser.parse_args()
7878

79-
main(args.std_path, args.langfile)
79+
main(args.std_path, args.langfile)

generation/test.ark

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# * Dark+ (doesnt highlight operators)
44
# * Tokyo Night (doesnt highlight language constants)
55

6-
if while begin fun let import set mut del quote # keyword
6+
if while begin fun let import set mut del # keyword
77

8-
len empty? firstOf tailOf headOf nil? assert toNumber toString and or mod type hasField # operator
8+
len empty? head tail nil? assert toNumber toString and or mod type hasField # operator
99
"quoted" # string quoted double
1010
12345 # constant numeric
1111
true false nil # constants language
@@ -15,7 +15,7 @@ list:reverse list:find list:slice list:sort list:fill list:setAt # list builtins
1515
print puts input io:writeFile io:readFile io:fileExists? io:listFiles io:dir? io:makeDir io:removeFiles # io builtins
1616
time # time builtins
1717
sys:exec sys:sleep # sys builtins
18-
str:format str:find str:removeAt # str builtins
18+
string:format string:find string:removeAt # str builtins
1919
math:exp math:ln math:ceil math:floor math:round math:NaN? math:Inf? math:pi math:e math:tau math:Inf math:NaN math:cos math:sin math:tan math:arccos math:arcsin math:arctan # math builtins
2020

2121
throw return try # Exception std
@@ -24,7 +24,7 @@ list:filter list:map list:reduce list:flatten list:flatMap list:take list:unzip
2424
math:abs math:even math:odd math:min math:max math:pow math:sqrt math:fibo math:divs # Math std
2525
os:home_dir # os std
2626
range range:forEach range:filter range:map range:reduce # Range std
27-
str:toLower str:toUpper str:reverse str:slice str:split str:replace str:join # String std
27+
string:toLower string:toUpper string:reverse string:slice string:split string:replace string:join # String std
2828
switch # Switch std
2929

3030
# @brief
@@ -33,4 +33,4 @@ switch # Switch std
3333
# ---
3434
# @param
3535
# @author
36-
# test
36+
# test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "ArkScript",
44
"description": "ArkScript programming language syntax highlighting extension",
55
"icon": "images/logo.png",
6-
"version": "0.8.0",
6+
"version": "0.9.0",
77
"publisher": "ArkScript-lang",
88
"repository": {
99
"type": "git",

0 commit comments

Comments
 (0)