@lokascript/language-server 2.9.3 → 2.9.4
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/dist/server.js +92 -8
- package/package.json +6 -6
package/dist/server.js
CHANGED
|
@@ -57,6 +57,70 @@ var HYPERSCRIPT_COMMANDS = [
|
|
|
57
57
|
"trigger",
|
|
58
58
|
"wait",
|
|
59
59
|
"while",
|
|
60
|
+
// Upstream commands this list omitted until Arc A step 4.1. Each was probed
|
|
61
|
+
// on hyperscript.org@0.9.93 in the form shown and produced the command node
|
|
62
|
+
// named beside it; none of them is a LokaScript invention.
|
|
63
|
+
"blur",
|
|
64
|
+
// `blur #a` → BlurCommand
|
|
65
|
+
"break",
|
|
66
|
+
// `repeat 3 times break end` → controlflow.js BreakCommand
|
|
67
|
+
"breakpoint",
|
|
68
|
+
// `breakpoint` → BreakpointCommand (core debug.js)
|
|
69
|
+
"clear",
|
|
70
|
+
// `clear #a` → EmptyCommand — upstream spells the
|
|
71
|
+
"empty",
|
|
72
|
+
// `empty #a` pair as ONE command with two keywords
|
|
73
|
+
"close",
|
|
74
|
+
// `close #a` → CloseCommand
|
|
75
|
+
"continue",
|
|
76
|
+
// `repeat 3 times continue end` → controlflow.js ContinueCommand
|
|
77
|
+
"focus",
|
|
78
|
+
// `focus #a` → FocusCommand
|
|
79
|
+
"open",
|
|
80
|
+
// `open #a` → OpenCommand
|
|
81
|
+
"pick",
|
|
82
|
+
// `pick items 1 to 3 from "hello"` → PickCommand
|
|
83
|
+
"render",
|
|
84
|
+
// `render #tpl` → RenderCommand
|
|
85
|
+
"reset",
|
|
86
|
+
// `reset #a` → ResetCommand
|
|
87
|
+
"scroll",
|
|
88
|
+
// `scroll to #a` → ScrollCommand
|
|
89
|
+
"select",
|
|
90
|
+
// `select #a` → SelectCommand
|
|
91
|
+
"start",
|
|
92
|
+
// `start view transition end` → ViewTransitionCommand
|
|
93
|
+
"swap",
|
|
94
|
+
// `swap $a with $b` → SwapCommand. The htmx-style
|
|
95
|
+
// `swap <content> into <target>` form is an EXTENSION of this same
|
|
96
|
+
// command, not a different one — `commands/dom/swap.ts` implements the
|
|
97
|
+
// upstream value-swap variant explicitly, under a `variant` discriminator.
|
|
98
|
+
// Never written by a user: `pseudo-command` is the internal registry name for
|
|
99
|
+
// method-call-as-command (`foo() on #a`), and `-` is not an identifier
|
|
100
|
+
// character, so no source text can contain the token. Listed so the
|
|
101
|
+
// partition is total. The mechanism is upstream — the probe above yields
|
|
102
|
+
// PseudoCommand from `parsetree/commands/pseudoCommand.js`, which the core
|
|
103
|
+
// `_hyperscript.js` bundle registers.
|
|
104
|
+
"pseudo-command",
|
|
105
|
+
// Moved OUT of LOKASCRIPT_ONLY_COMMANDS by the same 4.1 oracle run. Each was
|
|
106
|
+
// asserted to be a LokaScript extension and each parses on stock
|
|
107
|
+
// hyperscript.org@0.9.93, so the LSP was raising a spurious *error*
|
|
108
|
+
// diagnostic on portable code — the same defect as the omissions above, with
|
|
109
|
+
// the sign flipped.
|
|
110
|
+
"make",
|
|
111
|
+
// `make a <div/>` → MakeCommand (basic.js)
|
|
112
|
+
"measure",
|
|
113
|
+
// `measure #a` → MeasureCommand (dom.js)
|
|
114
|
+
"morph",
|
|
115
|
+
// `morph #a to "<p>x</p>"` → MorphCommand (dom.js)
|
|
116
|
+
"settle",
|
|
117
|
+
// `settle` → SettleCommand (animations.js)
|
|
118
|
+
// `install` is upstream at the position it is actually written — `_="install
|
|
119
|
+
// Foo"` parses as InstallFeature. It is a FEATURE upstream and a registered
|
|
120
|
+
// command here, so `on click install Foo` works only in LokaScript. The
|
|
121
|
+
// lists are keyed by name and cannot express "upstream in feature position
|
|
122
|
+
// only"; classified by the canonical usage, which is portable.
|
|
123
|
+
"install",
|
|
60
124
|
// Definitions
|
|
61
125
|
"behavior",
|
|
62
126
|
"def",
|
|
@@ -67,14 +131,34 @@ var HYPERSCRIPT_COMMANDS = [
|
|
|
67
131
|
"worker"
|
|
68
132
|
];
|
|
69
133
|
var LOKASCRIPT_ONLY_COMMANDS = [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
"
|
|
134
|
+
// Upstream _hyperscript has no `prepend`; it offers only
|
|
135
|
+
// `put <content> at the start of <target>`.
|
|
136
|
+
"prepend",
|
|
137
|
+
// `prepend "x" to #a` → Unexpected Token : prepend
|
|
138
|
+
"process",
|
|
139
|
+
// `process "<p>x</p>"` → Unexpected Token : process
|
|
140
|
+
// Added by Arc A step 4.1 — the omissions that produced NO diagnostic.
|
|
141
|
+
"async",
|
|
142
|
+
// `async do log "x" end` → Unexpected Token : async
|
|
143
|
+
"copy",
|
|
144
|
+
// `copy "x"` → Unexpected Token : copy
|
|
145
|
+
"push",
|
|
146
|
+
// `push url "/x"` → Unexpected Token : push
|
|
147
|
+
"replace",
|
|
148
|
+
// `replace url "/x"` → Unexpected Token : replace
|
|
149
|
+
// Upstream spells this command `beep!`, with the bang as part of the token:
|
|
150
|
+
// `beep! me` parses (BeepCommand), `beep me` does not. hyperfixi registers it
|
|
151
|
+
// as `beep` and accepts both spellings, so the portable spelling is `beep!`
|
|
152
|
+
// and the bare one is the extension. Classified by the registered name,
|
|
153
|
+
// which is what these lists key on.
|
|
154
|
+
"beep",
|
|
155
|
+
// `beep me` → Unexpected Token : beep
|
|
156
|
+
// Upstream has `unless` only as a TRAILING statement modifier
|
|
157
|
+
// (`log "x" unless true` → UnlessStatementModifier, kernel.js
|
|
158
|
+
// parseIndirectStatement). The registered `unless` COMMAND — the leading
|
|
159
|
+
// block form, an alias of `if` — is the LokaScript addition.
|
|
160
|
+
"unless"
|
|
161
|
+
// `unless true log "x" end` → Unexpected Token : unless
|
|
78
162
|
];
|
|
79
163
|
var ALL_COMMANDS = [...HYPERSCRIPT_COMMANDS, ...LOKASCRIPT_ONLY_COMMANDS];
|
|
80
164
|
var LOKASCRIPT_SYNTAX_PATTERNS = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokascript/language-server",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4",
|
|
4
4
|
"description": "Language Server Protocol implementation for LokaScript/hyperscript with 21 language support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"vscode-languageserver-textdocument": "^1.0.11"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@hyperfixi/core": "^2.9.
|
|
35
|
-
"@lokascript/semantic": "^2.9.
|
|
34
|
+
"@hyperfixi/core": "^2.9.4",
|
|
35
|
+
"@lokascript/semantic": "^2.9.4"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"@lokascript/semantic": {
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@hyperfixi/core": "^2.9.
|
|
47
|
-
"@lokascript/semantic": "^2.9.
|
|
48
|
-
"@types/node": "^
|
|
46
|
+
"@hyperfixi/core": "^2.9.4",
|
|
47
|
+
"@lokascript/semantic": "^2.9.4",
|
|
48
|
+
"@types/node": "^26.1.2",
|
|
49
49
|
"@vitest/coverage-v8": "^4.0.0",
|
|
50
50
|
"tsup": "^8.0.0",
|
|
51
51
|
"tsx": "^4.23.1",
|