naider 1.24.5 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -112
- package/SPEC.naide +8 -6
- package/bin/naide.js +509 -124
- package/bin/postinstall.js +5 -15
- package/examples/model.naide +1 -1
- package/lsp/server.js +210 -101
- package/mcp/server.js +247 -22
- package/package.json +8 -5
- package/src/gen.js +853 -324
- package/src/generator-c.js +34 -14
- package/src/generator-go.js +26 -0
- package/src/generator.js +5 -1
- package/src/index.js +34 -14
- package/src/parser.js +15 -14
- package/src/project-tools.js +785 -0
- package/src/typechecker.js +147 -18
- package/vscode-naide/README.md +4 -6
- package/vscode-naide/extension.js +1 -2
- package/vscode-naide/package-lock.json +2 -2
- package/vscode-naide/package.json +3 -15
- package/SPEC-X.nx +0 -276
- package/assets/nx.ico +0 -0
- package/assets/nx_check.png +0 -0
- package/examples/ai-app.nx +0 -21
- package/examples/async.nx +0 -40
- package/examples/crud.nx +0 -64
- package/examples/fullapp.nx +0 -74
- package/examples/hello.nx +0 -29
- package/examples/server.nx +0 -27
- package/examples/sql-app.nx +0 -23
- package/examples/todo-api.nx +0 -31
- package/src/preprocess.js +0 -308
- package/vscode-naide/language-configuration-nx.json +0 -32
- package/vscode-naide/naide-lang-1.1.0.vsix +0 -0
- package/vscode-naide/syntaxes/naidex.tmLanguage.json +0 -287
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
-
"name": "NAIDE-X",
|
|
4
|
-
"scopeName": "source.naidex",
|
|
5
|
-
"patterns": [
|
|
6
|
-
{ "include": "#comments" },
|
|
7
|
-
{ "include": "#strings" },
|
|
8
|
-
{ "include": "#numbers" },
|
|
9
|
-
{ "include": "#constants" },
|
|
10
|
-
{ "include": "#storage" },
|
|
11
|
-
{ "include": "#types-short" },
|
|
12
|
-
{ "include": "#types" },
|
|
13
|
-
{ "include": "#nx-prefixes" },
|
|
14
|
-
{ "include": "#keywords-control" },
|
|
15
|
-
{ "include": "#keywords-server" },
|
|
16
|
-
{ "include": "#keywords-declaration" },
|
|
17
|
-
{ "include": "#keywords-operator" },
|
|
18
|
-
{ "include": "#schema-modifiers" },
|
|
19
|
-
{ "include": "#builtins" },
|
|
20
|
-
{ "include": "#function-def" },
|
|
21
|
-
{ "include": "#operators" },
|
|
22
|
-
{ "include": "#punctuation" }
|
|
23
|
-
],
|
|
24
|
-
"repository": {
|
|
25
|
-
"comments": {
|
|
26
|
-
"match": "--.*$",
|
|
27
|
-
"name": "comment.line.double-dash.naidex"
|
|
28
|
-
},
|
|
29
|
-
"strings": {
|
|
30
|
-
"patterns": [
|
|
31
|
-
{
|
|
32
|
-
"name": "string.quoted.double.naidex",
|
|
33
|
-
"begin": "\"",
|
|
34
|
-
"end": "\"",
|
|
35
|
-
"patterns": [
|
|
36
|
-
{
|
|
37
|
-
"name": "constant.character.escape.naidex",
|
|
38
|
-
"match": "\\\\."
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "meta.embedded.expression.naidex",
|
|
42
|
-
"begin": "\\{",
|
|
43
|
-
"end": "\\}",
|
|
44
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.interpolation.begin.naidex" } },
|
|
45
|
-
"endCaptures": { "0": { "name": "punctuation.definition.interpolation.end.naidex" } },
|
|
46
|
-
"patterns": [
|
|
47
|
-
{ "include": "#numbers" },
|
|
48
|
-
{ "include": "#constants" },
|
|
49
|
-
{
|
|
50
|
-
"name": "variable.other.naidex",
|
|
51
|
-
"match": "[a-zA-Z_][a-zA-Z0-9_.]*"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "string.quoted.single.naidex",
|
|
59
|
-
"begin": "'",
|
|
60
|
-
"end": "'",
|
|
61
|
-
"patterns": [
|
|
62
|
-
{
|
|
63
|
-
"name": "constant.character.escape.naidex",
|
|
64
|
-
"match": "\\\\."
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
"numbers": {
|
|
71
|
-
"match": "\\b\\d+(\\.\\d+)?\\b",
|
|
72
|
-
"name": "constant.numeric.naidex"
|
|
73
|
-
},
|
|
74
|
-
"constants": {
|
|
75
|
-
"match": "\\b(true|false|null|self)\\b",
|
|
76
|
-
"name": "constant.language.naidex"
|
|
77
|
-
},
|
|
78
|
-
"storage": {
|
|
79
|
-
"match": "\\b(mut|pub)\\b|(?<=^\\s*)~(?=[a-z]:)",
|
|
80
|
-
"name": "storage.modifier.naidex"
|
|
81
|
-
},
|
|
82
|
-
"types-short": {
|
|
83
|
-
"match": "(?<=^\\s*~?)([sinblma])(?=:)",
|
|
84
|
-
"name": "support.type.naidex"
|
|
85
|
-
},
|
|
86
|
-
"types": {
|
|
87
|
-
"match": "\\b(str|int|num|bool|list|map|any|json|void)\\b",
|
|
88
|
-
"name": "support.type.naidex"
|
|
89
|
-
},
|
|
90
|
-
"nx-prefixes": {
|
|
91
|
-
"patterns": [
|
|
92
|
-
{
|
|
93
|
-
"match": "^\\s*>",
|
|
94
|
-
"name": "keyword.control.return.naidex"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"match": "^\\s*\\?(?!\\.)",
|
|
98
|
-
"name": "keyword.control.if.naidex"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"match": "^\\s*\\|(?!>)",
|
|
102
|
-
"name": "keyword.control.elif.naidex"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"match": "^\\s*:(?!=)",
|
|
106
|
-
"name": "keyword.control.else.naidex"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"match": "^\\s*@",
|
|
110
|
-
"name": "keyword.control.loop.naidex"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"match": "^\\s*\\*",
|
|
114
|
-
"name": "keyword.control.while.naidex"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"match": "^\\s*!!!",
|
|
118
|
-
"name": "keyword.control.ensure.naidex"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"match": "^\\s*!!",
|
|
122
|
-
"name": "keyword.control.catch.naidex"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"match": "^\\s*!(?!!)",
|
|
126
|
-
"name": "keyword.control.try.naidex"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"match": "^\\s*\\$",
|
|
130
|
-
"name": "keyword.other.server.naidex"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"match": "^\\s*\\^",
|
|
134
|
-
"name": "keyword.declaration.model.naidex"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"match": "^\\s*<",
|
|
138
|
-
"name": "keyword.declaration.import.naidex"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"match": "^\\s*%",
|
|
142
|
-
"name": "keyword.control.match.naidex"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"match": "^\\s*\\+",
|
|
146
|
-
"name": "storage.modifier.export.naidex"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"match": "^\\s*~f\\b",
|
|
150
|
-
"name": "keyword.declaration.async-function.naidex"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"match": "^\\s*f\\b",
|
|
154
|
-
"name": "keyword.declaration.function.naidex"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"match": "^\\s*G(?=\")",
|
|
158
|
-
"name": "keyword.other.get.naidex"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"match": "^\\s*P(?=\")",
|
|
162
|
-
"name": "keyword.other.post.naidex"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"match": "^\\s*U(?=\")",
|
|
166
|
-
"name": "keyword.other.put.naidex"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"match": "^\\s*D(?=\")",
|
|
170
|
-
"name": "keyword.other.delete.naidex"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"match": "^\\s*X(?=\")",
|
|
174
|
-
"name": "keyword.other.patch.naidex"
|
|
175
|
-
}
|
|
176
|
-
]
|
|
177
|
-
},
|
|
178
|
-
"keywords-control": {
|
|
179
|
-
"match": "\\b(if|elif|else|each|for|while|in|match|try|fail|ensure|ret|break|continue|throw|then|not|and|or|typeof|instanceof)\\b",
|
|
180
|
-
"name": "keyword.control.naidex"
|
|
181
|
-
},
|
|
182
|
-
"keywords-server": {
|
|
183
|
-
"match": "\\b(server|get|post|put|del|patch|mid|cors|limit|auth|crud|static|ws|sse|group|upload|cookie|session|view|cache|validate|openapi|error|on)\\b",
|
|
184
|
-
"name": "keyword.other.naidex"
|
|
185
|
-
},
|
|
186
|
-
"keywords-declaration": {
|
|
187
|
-
"match": "\\b(fn|fn\\.async|use|from|as|model|extends|schema|env|db|every|watch|test|assert|queue|job|new)\\b",
|
|
188
|
-
"name": "keyword.declaration.naidex"
|
|
189
|
-
},
|
|
190
|
-
"keywords-operator": {
|
|
191
|
-
"match": "\\b(await|await\\.all)\\b|~~|~(?=[a-zA-Z(])",
|
|
192
|
-
"name": "keyword.operator.naidex"
|
|
193
|
-
},
|
|
194
|
-
"schema-modifiers": {
|
|
195
|
-
"match": "\\b(required|optional|unique|auto|timestamp)\\b",
|
|
196
|
-
"name": "support.other.naidex"
|
|
197
|
-
},
|
|
198
|
-
"builtins": {
|
|
199
|
-
"patterns": [
|
|
200
|
-
{
|
|
201
|
-
"match": "\\b(log|log\\.e|log\\.w|log\\.i|log\\.d|log\\.error|log\\.warn|log\\.info|log\\.debug)\\b",
|
|
202
|
-
"name": "support.function.naidex"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"match": "\\b(uuid|hash|verify|sign)\\b(?=\\s*\\()",
|
|
206
|
-
"name": "support.function.naidex"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"match": "\\b(api)\\.(get|post|put|del|raw)\\b",
|
|
210
|
-
"name": "support.function.naidex"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"match": ">\\.([shrtvdf])\\b",
|
|
214
|
-
"name": "keyword.control.naidex"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"match": "\\b(min|max|default|email|url|enum)\\b(?=\\s*\\()",
|
|
218
|
-
"name": "support.function.naidex"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"match": "\\b(send|broadcast|next)\\b(?=\\s*\\()",
|
|
222
|
-
"name": "support.function.naidex"
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
},
|
|
226
|
-
"function-def": {
|
|
227
|
-
"match": "(?<=\\bf\\s|\\bfn\\s|\\bfn\\.async\\s|~f\\s)([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=\\()",
|
|
228
|
-
"captures": {
|
|
229
|
-
"1": { "name": "entity.name.function.naidex" }
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
"operators": {
|
|
233
|
-
"patterns": [
|
|
234
|
-
{
|
|
235
|
-
"match": "\\|>",
|
|
236
|
-
"name": "keyword.operator.pipe.naidex"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"match": "=>",
|
|
240
|
-
"name": "keyword.operator.arrow.naidex"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"match": "->",
|
|
244
|
-
"name": "keyword.operator.return-type.naidex"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"match": "\\?\\.|\\.\\.",
|
|
248
|
-
"name": "keyword.operator.naidex"
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
"match": "\\?\\?",
|
|
252
|
-
"name": "keyword.operator.nullish.naidex"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"match": "\\.\\.\\.",
|
|
256
|
-
"name": "keyword.operator.spread.naidex"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"match": "==|!=|>=|<=|>|<",
|
|
260
|
-
"name": "keyword.operator.comparison.naidex"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"match": "\\+=|-=",
|
|
264
|
-
"name": "keyword.operator.assignment.compound.naidex"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
"match": "=",
|
|
268
|
-
"name": "keyword.operator.assignment.naidex"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"match": "[+\\-*/%]",
|
|
272
|
-
"name": "keyword.operator.arithmetic.naidex"
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
"punctuation": {
|
|
277
|
-
"patterns": [
|
|
278
|
-
{ "match": ":", "name": "punctuation.separator.naidex" },
|
|
279
|
-
{ "match": ",", "name": "punctuation.separator.comma.naidex" },
|
|
280
|
-
{ "match": "\\.", "name": "punctuation.accessor.naidex" },
|
|
281
|
-
{ "match": "[\\(\\)]", "name": "punctuation.paren.naidex" },
|
|
282
|
-
{ "match": "[\\[\\]]", "name": "punctuation.bracket.naidex" },
|
|
283
|
-
{ "match": "[\\{\\}]", "name": "punctuation.brace.naidex" }
|
|
284
|
-
]
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|