@exercism/codemirror-lang-sml 0.0.0-stage → 1.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/LICENSE +21 -0
- package/README.md +81 -2
- package/dist/index.cjs +609 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +601 -0
- package/package.json +51 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
import { ExternalTokenizer, LRParser } from '@lezer/lr';
|
|
2
|
+
import { syntaxTree, indentService, LRLanguage, foldNodeProp, LanguageSupport } from '@codemirror/language';
|
|
3
|
+
import { styleTags, tags } from '@lezer/highlight';
|
|
4
|
+
import { snippetCompletion, completeFromList, ifNotIn } from '@codemirror/autocomplete';
|
|
5
|
+
|
|
6
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
7
|
+
const BlockComment = 1;
|
|
8
|
+
|
|
9
|
+
const parenL = 40, parenR = 41, star = 42;
|
|
10
|
+
// SML comments nest, so `(* a (* b *) c *)` is one comment. A Lezer token
|
|
11
|
+
// can't count, so this tokenizer does. An unclosed comment runs to the end of
|
|
12
|
+
// the file, which is what the compiler does too.
|
|
13
|
+
const comments = new ExternalTokenizer((input) => {
|
|
14
|
+
if (input.next != parenL || input.peek(1) != star)
|
|
15
|
+
return;
|
|
16
|
+
input.advance(2);
|
|
17
|
+
let depth = 1;
|
|
18
|
+
for (let next = input.next; next >= 0; next = input.next) {
|
|
19
|
+
if (next == parenL && input.peek(1) == star) {
|
|
20
|
+
input.advance(2);
|
|
21
|
+
depth++;
|
|
22
|
+
}
|
|
23
|
+
else if (next == star && input.peek(1) == parenR) {
|
|
24
|
+
input.advance(2);
|
|
25
|
+
if (--depth == 0)
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
input.advance();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
input.acceptToken(BlockComment);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
36
|
+
const spec_identifier = {__proto__:null,true:24, false:26, op:34, div:42, mod:44, o:46, before:48, let:86, val:90, rec:94, as:136, and:148, fun:152, type:164, datatype:170, of:176, withtype:180, abstype:184, with:186, end:188, exception:192, local:198, in:200, open:204, infix:208, infixr:210, nonfix:214, andalso:226, orelse:230, handle:234, raise:242, if:246, then:248, else:250, while:254, do:256, case:260, fn:264, structure:268, sig:276, eqtype:284, include:294, sharing:298, where:304, struct:308, signature:318, functor:324};
|
|
37
|
+
const spec_symbol = {__proto__:null,"!":30, "~":32, "=":38, "*":40, "#":52, ":":116, "->":134, "|":154, "=>":238, ":>":272};
|
|
38
|
+
const parser = LRParser.deserialize({
|
|
39
|
+
version: 14,
|
|
40
|
+
states: "!8[OYQROOO#lQRO'#C`O'ZQRO'#FwO'`QRO'#CaOOQP'#Gt'#GtO(xQRO'#CzO)PQRO'#DPO)PQRO'#DRO)WQRO'#DUOOQP'#Gq'#GqO)cQRO'#EmO,}QRO'#ElO.sQRO'#C_OOQP'#Gp'#GpO.zQRO'#FvO/PQRO'#GoQ0VQROOOOQP'#Cj'#CjO1WQRO'#CuO1`QRO'#DWO2ZQRO'#GqO'hQRO'#ExO'hQRO'#EzO'hQRO'#FOO'hQRO'#FRO2uQRO'#FTOOQP,5<c,5<cOOQP-E9u-E9uOOQP'#Cd'#CdOOQP,58{,58{OOQP,59f,59fO3mQRO,59fO3zQRO'#GuO4UQRO,59kO4ZQRO,59mOOQP'#Cw'#CwO4`QRO'#GvO4hQRO,59pO4mQRO'#DVOOQP'#G_'#G_O4rQRO,5;WOOQP'#HX'#HXO'hQRO,5;YO7aQRO,5;ZO'hQRO,5;[O'hQRO,5;^O2uQRO,5;`OOQP,5<b,5<bOOQP-E9t-E9tOOQP'#Gx'#GxOOQP'#HZ'#HZOOQP'#Ga'#GaOYQRO'#GaQ0VQROOO8aQRO'#DYO8nQRO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y$n${$}%Q%i%k%m%o%q%s%x&r&v'c'j*gQqURrVRuWQ!hcQ$Y!^Q(S&WQ(]&_Q)l(QR*q)mS!T`!V^!fc!^!g&W&_(Q)mX)x(g(h)v)yQ#n!WQ#y!XU#}!Y%}&SW$Q!Z![&R(rS*V(q+SR+e*sY!xi!O!|$n%Q[#k!W#m#n%i%k'cU$q!r!s#jQ&{${Q&}$}Q)P&rQ)R&vR+`*gv!yi!O!W!r!s!|#j#m#n$n${$}%Q%i%k&r&v'c*gY#s!X#w#y%q%xS$z!v!wY%l#p#r%m%s'jR'g%oS$r!r#jR$s!sR$w!tQ#b{Q%b#aQ&|$|Q'Z%dQ'[%eQ'l%uQ'q%zQ(T&YQ)S&wQ)X'VQ)Y'XQ)c'rQ)p(XQ*j)dQ+a*kQ+k+OQ+l+PQ+s+XQ,Q+mQ,Y+yQ,^,SQ,c,ZR,g,dR%`#`Q#x!XQ%y#yR'o%xZ#v!X#w#y%q%xQ$O!YQ't%}R(P&SQ$R!ZQ$T![Q(O&RR*Y(rQ$X!]R([&^Q(W&ZQ)q(YQ*^(vQ+]*_R+v+[S$[!_$]c(f&f(i)v*a*x*{+j,W,b{z[op!l!m!n!o#d#e%U%X%]&n&o&p'O'`'k*c*f*iQ!}iQ#f!OR&q$nS!T`!VX)x(g(h)v)yQ$d!bR(k&iQ&g$cb)w(e)|*t+_+g+i+},a,fQ*b(xQ*|*QR,X+xQ(c&eQ(l&jQ*](uQ+^*`Q+t+YQ+|+hR,h,eX(n&k(b(o)sQ*W(qR+o+SQ(e&fQ)|(iQ*t)vQ+_*aQ+g*xQ+i*{Q+}+jQ,a,WR,f,bQ)z(gQ){(hR*u)vQ$i!dR(z&m",
|
|
43
|
+
nodeNames: "⚠ BlockComment Program TopExpression VariableName QualifiedName StructureName . Operator Number String Char true false PrefixOperator ! ~ op OperatorName = * div mod o before Selector # FieldName ) ( ParenthesizedExpression , ; ] [ ListExpression #[ VectorExpression } { RecordExpression Field LetExpression let ValueDeclaration val TypeVariable rec ValueBinding Wildcard PatternVariable QualifiedConstructor ConstructorName PatternVariable TuplePattern ListPattern RecordPattern FieldPattern : TypeName RecordType FieldType ParenthesizedType TypeApplication TypeApplication TupleType FunctionType -> as ... ConstructorPattern InfixPattern TypedPattern LayeredPattern and FunctionDeclaration fun | FunctionClause FunctionName InfixFunctionName TypeDeclaration type TypeDefinition DatatypeDeclaration datatype Constructor ConstructorDefinition of WithType withtype AbstypeDeclaration abstype with end ExceptionDeclaration exception ExceptionDefinition LocalDeclaration local in OpenDeclaration open FixityDeclaration infix infixr FixityName nonfix Application Callee BinaryExpression TypedExpression AndalsoExpression andalso OrelseExpression orelse HandleExpression handle Rule => RaiseExpression raise IfExpression if then else WhileExpression while do CaseExpression case FnExpression fn StructureDeclaration structure StructureDefinition :> Signature sig ValueSpecification SpecName TypeSpecification eqtype DatatypeSpecification ExceptionSpecification StructureSpecification IncludeSpecification include SharingSpecification sharing SignatureName WhereType where Structure struct FunctorApplication LetStructure ConstrainedStructure SignatureDeclaration signature SignatureDefinition FunctorDeclaration functor FunctorDefinition",
|
|
44
|
+
maxTerm: 237,
|
|
45
|
+
nodeProps: [
|
|
46
|
+
["openedBy", 28,"(",33,"[ #[",38,"{"],
|
|
47
|
+
["closedBy", 29,")",-2,34,36,"]",39,"}"]
|
|
48
|
+
],
|
|
49
|
+
skippedNodes: [0,1],
|
|
50
|
+
repeatNodeCount: 36,
|
|
51
|
+
tokenData: "?j~R!OX^$Rpq$Rqr$vrs&Zst.otu$vuv$vvw$vwx8sxy9Xyz9^z{$v{|$v|}9c}!O$v!O!P9h!P!Q$v!Q!R9{!R![;a![!]$v!]!^<g!^!_$v!_!`$v!`!a$v!a!b$v!b!c$v!c!}<l!}#O=Q#O#P$v#P#Q=V#Q#R$v#R#S=[#S#T$v#T#o<l#o#p=a#p#q$v#q#r=f#r#s=k#y#z$R$f$g$R#BY#BZ$R$IS$I_$R$I|$JO$R$JT$JU$R$KV$KW$R&FU&FV$R~$WY%b~X^$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!}8s#R#S8s#T#o8s~9^Om~~9cOl~~9hOo~R9mPVP!O!P9pQ9sP!O!P9vQ9{O!gQ~:QUX~!O!P:d!Q![;a!g!h:x#X#Y:x#k#l;r#l#m;{~:gP!Q![:j~:oRX~!Q![:j!g!h:x#X#Y:x~:{Q!Q![;R#r#s;Z~;WPX~!Q![;R~;^P!Q![;R~;fSX~!O!P:d!Q![;a!g!h:x#X#Y:x~;uQ!Q![;R#l#m;{~<OR!Q![<X!c!i<X#T#Z<X~<^RX~!Q![<X!c!i<X#T#Z<X~<lOp~~<qT%f~wx<l!Q![<l!c!}<l#R#S<l#T#o<l~=VOr~~=[Oq~~=aO!R~~=fOw~~=kOv~~=pf%g~qr$vst$vtu$vuv$vvw$vz{$v{|$v}!O$v!P!Q$v!Q!R?U!R![;a![!]$v!^!_$v!_!`$v!`!a$v!a!b$v!b!c$v#O#P$v#Q#R$v#S#T$v#p#q$v#r#s$v~?ZTX~!O!P:d!Q![;a!g!h:x#X#Y:x#l#m;{",
|
|
52
|
+
tokenizers: [comments, 0, 1],
|
|
53
|
+
topRules: {"Program":[0,2]},
|
|
54
|
+
specialized: [{term: 206, get: (value) => spec_identifier[value] || -1},{term: 207, get: (value) => spec_symbol[value] || -1}],
|
|
55
|
+
tokenPrec: 9715
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// The parts of the Standard ML Basis Library that the editor offers. The lists
|
|
59
|
+
// follow the Basis Library specification at https://smlfamily.github.io/Basis/.
|
|
60
|
+
const words = (text) => text.split(/\s+/).filter(Boolean);
|
|
61
|
+
const integer = {
|
|
62
|
+
values: words(`
|
|
63
|
+
toLarge fromLarge toInt fromInt precision minInt maxInt + - * div mod quot rem
|
|
64
|
+
compare < <= > >= ~ abs min max sign sameSign fmt toString scan fromString`),
|
|
65
|
+
types: ["int"],
|
|
66
|
+
};
|
|
67
|
+
const word = {
|
|
68
|
+
values: words(`
|
|
69
|
+
wordSize toLarge toLargeX fromLarge toInt toIntX fromInt toLargeInt
|
|
70
|
+
toLargeIntX fromLargeInt andb orb xorb notb << >> ~>> + - * div mod compare
|
|
71
|
+
< <= > >= ~ min max fmt toString scan fromString`),
|
|
72
|
+
types: ["word"],
|
|
73
|
+
};
|
|
74
|
+
const real = {
|
|
75
|
+
values: words(`
|
|
76
|
+
radix precision maxFinite minPos minNormalPos posInf negInf + - * / rem *+
|
|
77
|
+
*- ~ abs min max sign signBit sameSign copySign compare compareReal < <= >
|
|
78
|
+
>= == != ?= unordered isFinite isNan isNormal class toManExp fromManExp
|
|
79
|
+
split realMod nextAfter checkFloat realFloor realCeil realTrunc realRound
|
|
80
|
+
floor ceil trunc round toInt toLargeInt fromInt fromLargeInt toLarge
|
|
81
|
+
fromLarge fmt toString scan fromString toDecimal fromDecimal`),
|
|
82
|
+
types: ["real"],
|
|
83
|
+
};
|
|
84
|
+
const structures = {
|
|
85
|
+
List: {
|
|
86
|
+
values: words(`
|
|
87
|
+
null length @ hd tl last getItem nth take drop rev concat revAppend app
|
|
88
|
+
map mapPartial find filter partition foldl foldr exists all tabulate
|
|
89
|
+
collate`),
|
|
90
|
+
types: ["list"],
|
|
91
|
+
constructors: ["nil"],
|
|
92
|
+
exceptions: ["Empty"],
|
|
93
|
+
},
|
|
94
|
+
ListPair: {
|
|
95
|
+
values: words(`
|
|
96
|
+
zip zipEq unzip app appEq map mapEq foldl foldr foldlEq foldrEq all exists
|
|
97
|
+
allEq`),
|
|
98
|
+
exceptions: ["UnequalLengths"],
|
|
99
|
+
},
|
|
100
|
+
String: {
|
|
101
|
+
values: words(`
|
|
102
|
+
maxSize size sub extract substring ^ concat concatWith str implode explode
|
|
103
|
+
map translate tokens fields isPrefix isSubstring isSuffix compare collate
|
|
104
|
+
< <= > >= toString scan fromString toCString fromCString`),
|
|
105
|
+
types: ["string", "char"],
|
|
106
|
+
},
|
|
107
|
+
Char: {
|
|
108
|
+
values: words(`
|
|
109
|
+
minChar maxChar maxOrd ord chr succ pred compare < <= > >= contains
|
|
110
|
+
notContains isAscii toLower toUpper isAlpha isAlphaNum isCntrl isDigit
|
|
111
|
+
isGraph isHexDigit isLower isPrint isSpace isPunct isUpper toString scan
|
|
112
|
+
fromString toCString fromCString`),
|
|
113
|
+
types: ["char"],
|
|
114
|
+
},
|
|
115
|
+
Substring: {
|
|
116
|
+
values: words(`
|
|
117
|
+
sub size base string substring extract full isEmpty getc first triml
|
|
118
|
+
trimr slice concat concatWith explode isPrefix isSubstring isSuffix
|
|
119
|
+
compare collate splitl splitr splitAt dropl dropr takel taker position
|
|
120
|
+
span translate tokens fields app foldl foldr`),
|
|
121
|
+
types: ["substring"],
|
|
122
|
+
},
|
|
123
|
+
StringCvt: {
|
|
124
|
+
values: words(`padLeft padRight splitl takel dropl skipWS scanString`),
|
|
125
|
+
types: ["radix", "realfmt", "reader", "cs"],
|
|
126
|
+
constructors: words(`BIN OCT DEC HEX SCI FIX GEN EXACT`),
|
|
127
|
+
},
|
|
128
|
+
Int: integer,
|
|
129
|
+
Int32: integer,
|
|
130
|
+
Int64: integer,
|
|
131
|
+
IntInf: {
|
|
132
|
+
values: [...integer.values, ...words(`divMod quotRem pow log2 orb xorb andb notb << ~>>`)],
|
|
133
|
+
types: ["int"],
|
|
134
|
+
},
|
|
135
|
+
LargeInt: integer,
|
|
136
|
+
Position: integer,
|
|
137
|
+
Word: word,
|
|
138
|
+
Word8: word,
|
|
139
|
+
Word32: word,
|
|
140
|
+
Word64: word,
|
|
141
|
+
LargeWord: word,
|
|
142
|
+
Real: real,
|
|
143
|
+
LargeReal: real,
|
|
144
|
+
Math: {
|
|
145
|
+
values: words(`
|
|
146
|
+
pi e sqrt sin cos tan asin acos atan atan2 exp pow ln log10 sinh cosh
|
|
147
|
+
tanh`),
|
|
148
|
+
},
|
|
149
|
+
Bool: {
|
|
150
|
+
values: words(`not toString scan fromString`),
|
|
151
|
+
types: ["bool"],
|
|
152
|
+
constructors: ["true", "false"],
|
|
153
|
+
},
|
|
154
|
+
Option: {
|
|
155
|
+
values: words(`getOpt isSome valOf filter join app map mapPartial compose composePartial`),
|
|
156
|
+
types: ["option"],
|
|
157
|
+
constructors: ["SOME", "NONE"],
|
|
158
|
+
exceptions: ["Option"],
|
|
159
|
+
},
|
|
160
|
+
General: {
|
|
161
|
+
values: words(`exnName exnMessage ! := o before ignore`),
|
|
162
|
+
types: words(`unit exn order`),
|
|
163
|
+
constructors: words(`LESS EQUAL GREATER`),
|
|
164
|
+
exceptions: words(`Bind Match Chr Div Domain Fail Overflow Size Span Subscript`),
|
|
165
|
+
},
|
|
166
|
+
Array: {
|
|
167
|
+
values: words(`
|
|
168
|
+
maxLen array fromList tabulate length sub update vector copy copyVec
|
|
169
|
+
appi app modifyi modify foldli foldri foldl foldr findi find exists all
|
|
170
|
+
collate`),
|
|
171
|
+
types: ["array"],
|
|
172
|
+
},
|
|
173
|
+
Array2: {
|
|
174
|
+
values: words(`
|
|
175
|
+
array fromList tabulate sub update dimensions nRows nCols row column
|
|
176
|
+
copy appi app modifyi modify foldi fold`),
|
|
177
|
+
types: ["array", "region", "traversal"],
|
|
178
|
+
constructors: ["RowMajor", "ColMajor"],
|
|
179
|
+
},
|
|
180
|
+
ArraySlice: {
|
|
181
|
+
values: words(`
|
|
182
|
+
length sub update full slice subslice base vector copy copyVec isEmpty
|
|
183
|
+
getItem appi app modifyi modify foldli foldri foldl foldr findi find
|
|
184
|
+
exists all collate`),
|
|
185
|
+
types: ["slice"],
|
|
186
|
+
},
|
|
187
|
+
Vector: {
|
|
188
|
+
values: words(`
|
|
189
|
+
maxLen fromList tabulate length sub update concat appi app mapi map
|
|
190
|
+
foldli foldri foldl foldr findi find exists all collate`),
|
|
191
|
+
types: ["vector"],
|
|
192
|
+
},
|
|
193
|
+
VectorSlice: {
|
|
194
|
+
values: words(`
|
|
195
|
+
length sub full slice subslice base vector concat isEmpty getItem appi
|
|
196
|
+
app mapi map foldli foldri foldl foldr findi find exists all collate`),
|
|
197
|
+
types: ["slice"],
|
|
198
|
+
},
|
|
199
|
+
TextIO: {
|
|
200
|
+
values: words(`
|
|
201
|
+
print input input1 inputN inputAll inputLine endOfStream output output1
|
|
202
|
+
flushOut openIn openOut openAppend closeIn closeOut stdIn stdOut stdErr`),
|
|
203
|
+
types: ["instream", "outstream"],
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
/// The values, types, constructors and exceptions that every SML program can
|
|
207
|
+
/// use without naming a structure.
|
|
208
|
+
const topLevel = {
|
|
209
|
+
values: words(`
|
|
210
|
+
map app foldl foldr rev length hd tl null nth print ord chr size str
|
|
211
|
+
explode implode concat substring not abs floor ceil round trunc real ref
|
|
212
|
+
ignore valOf isSome getOpt exnName exnMessage vector use`),
|
|
213
|
+
types: words(`
|
|
214
|
+
int real string char bool list option unit exn ref array vector word order
|
|
215
|
+
substring`),
|
|
216
|
+
constructors: words(`SOME NONE nil true false LESS EQUAL GREATER ref`),
|
|
217
|
+
exceptions: words(`
|
|
218
|
+
Bind Match Chr Div Domain Empty Fail Option Overflow Size Span Subscript`),
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/// Snippets for the constructs people write most often in Standard ML.
|
|
222
|
+
const snippets = [
|
|
223
|
+
snippetCompletion("fun ${name} ${arg} =\n\t${}", { label: "fun", detail: "function", type: "keyword" }),
|
|
224
|
+
snippetCompletion("val ${name} = ${}", { label: "val", detail: "value", type: "keyword" }),
|
|
225
|
+
snippetCompletion("let\n\tval ${name} = ${value}\nin\n\t${}\nend", {
|
|
226
|
+
label: "let",
|
|
227
|
+
detail: "in end",
|
|
228
|
+
type: "keyword",
|
|
229
|
+
}),
|
|
230
|
+
snippetCompletion("case ${expression} of\n\t${pattern} => ${}\n| ${pattern} => ${}", {
|
|
231
|
+
label: "case",
|
|
232
|
+
detail: "of",
|
|
233
|
+
type: "keyword",
|
|
234
|
+
}),
|
|
235
|
+
snippetCompletion("if ${condition}\nthen ${}\nelse ${}", { label: "if", detail: "then else", type: "keyword" }),
|
|
236
|
+
snippetCompletion("fn ${x} => ${}", { label: "fn", detail: "anonymous function", type: "keyword" }),
|
|
237
|
+
snippetCompletion("datatype ${name} =\n\t${First}\n| ${Second} of ${type}", {
|
|
238
|
+
label: "datatype",
|
|
239
|
+
detail: "constructors",
|
|
240
|
+
type: "keyword",
|
|
241
|
+
}),
|
|
242
|
+
snippetCompletion("structure ${Name} =\nstruct\n\t${}\nend", {
|
|
243
|
+
label: "structure",
|
|
244
|
+
detail: "struct end",
|
|
245
|
+
type: "keyword",
|
|
246
|
+
}),
|
|
247
|
+
snippetCompletion("signature ${NAME} =\nsig\n\t${}\nend", {
|
|
248
|
+
label: "signature",
|
|
249
|
+
detail: "sig end",
|
|
250
|
+
type: "keyword",
|
|
251
|
+
}),
|
|
252
|
+
snippetCompletion("local\n\t${}\nin\n\t${}\nend", { label: "local", detail: "in end", type: "keyword" }),
|
|
253
|
+
];
|
|
254
|
+
const keywords = `
|
|
255
|
+
abstype and andalso as case datatype do else end eqtype exception fn fun
|
|
256
|
+
functor handle if in include infix infixr let local nonfix of op open orelse
|
|
257
|
+
raise rec sharing sig signature struct structure then type val where while
|
|
258
|
+
with withtype div mod`
|
|
259
|
+
.split(/\s+/)
|
|
260
|
+
.filter(Boolean)
|
|
261
|
+
.map((label) => ({ label, type: "keyword" }));
|
|
262
|
+
// Symbolic names such as `@` or `<=` are members too, but nobody completes them.
|
|
263
|
+
const isWord = (name) => /^[A-Za-z]/.test(name);
|
|
264
|
+
function membersToCompletions(members) {
|
|
265
|
+
var _a, _b, _c;
|
|
266
|
+
return [
|
|
267
|
+
...members.values.filter(isWord).map((label) => ({ label, type: "function" })),
|
|
268
|
+
...((_a = members.types) !== null && _a !== void 0 ? _a : []).map((label) => ({ label, type: "type" })),
|
|
269
|
+
...((_b = members.constructors) !== null && _b !== void 0 ? _b : []).map((label) => ({ label, type: "enum" })),
|
|
270
|
+
...((_c = members.exceptions) !== null && _c !== void 0 ? _c : []).map((label) => ({ label, type: "class" })),
|
|
271
|
+
];
|
|
272
|
+
}
|
|
273
|
+
const structureNames = Object.keys(structures).map((label) => ({ label, type: "namespace" }));
|
|
274
|
+
const dontComplete = ["String", "Char", "BlockComment"];
|
|
275
|
+
const Identifier = /^[\w']*$/;
|
|
276
|
+
// A word straight after a dot names a member of a structure, and the sources
|
|
277
|
+
// for bare names have nothing useful to say there.
|
|
278
|
+
function afterDot(context) {
|
|
279
|
+
const word = context.matchBefore(/[\w']*/);
|
|
280
|
+
const from = word ? word.from : context.pos;
|
|
281
|
+
return from > 0 && context.state.sliceDoc(from - 1, from) == ".";
|
|
282
|
+
}
|
|
283
|
+
const fixedNames = completeFromList([
|
|
284
|
+
...snippets,
|
|
285
|
+
...keywords,
|
|
286
|
+
...membersToCompletions(topLevel),
|
|
287
|
+
...structureNames,
|
|
288
|
+
]);
|
|
289
|
+
/// Keywords, snippets, the top-level Basis Library names and the names of the
|
|
290
|
+
/// Basis structures. It offers nothing inside strings and comments, or after a
|
|
291
|
+
/// dot.
|
|
292
|
+
const smlCompletion = ifNotIn(dontComplete, (context) => afterDot(context) ? null : fixedNames(context));
|
|
293
|
+
const text = (state, node) => state.sliceDoc(node.from, node.to);
|
|
294
|
+
// Every name a pattern binds. A pattern holds no expressions, so the search
|
|
295
|
+
// can go all the way down.
|
|
296
|
+
function patternVariables(state, node, add) {
|
|
297
|
+
const cursor = node.cursor();
|
|
298
|
+
const end = node.to;
|
|
299
|
+
do {
|
|
300
|
+
if (cursor.from >= end)
|
|
301
|
+
break;
|
|
302
|
+
if (cursor.name == "PatternVariable")
|
|
303
|
+
add(text(state, cursor.node), "variable");
|
|
304
|
+
} while (cursor.next());
|
|
305
|
+
}
|
|
306
|
+
// The names that a declaration brings into the scope around it.
|
|
307
|
+
function declared(state, decl, add) {
|
|
308
|
+
var _a;
|
|
309
|
+
switch (decl.name) {
|
|
310
|
+
case "ValueDeclaration":
|
|
311
|
+
for (const binding of decl.getChildren("ValueBinding")) {
|
|
312
|
+
const pattern = binding.firstChild;
|
|
313
|
+
if (pattern)
|
|
314
|
+
patternVariables(state, pattern, add);
|
|
315
|
+
}
|
|
316
|
+
break;
|
|
317
|
+
case "FunctionDeclaration":
|
|
318
|
+
for (const clause of decl.getChildren("FunctionClause")) {
|
|
319
|
+
const name = (_a = clause.getChild("FunctionName")) !== null && _a !== void 0 ? _a : clause.getChild("InfixFunctionName");
|
|
320
|
+
if (name)
|
|
321
|
+
add(text(state, name), "function");
|
|
322
|
+
}
|
|
323
|
+
break;
|
|
324
|
+
case "DatatypeDeclaration":
|
|
325
|
+
case "AbstypeDeclaration":
|
|
326
|
+
for (const name of decl.getChildren("TypeDefinition"))
|
|
327
|
+
add(text(state, name), "type");
|
|
328
|
+
for (const con of decl.getChildren("Constructor")) {
|
|
329
|
+
const name = con.getChild("ConstructorDefinition");
|
|
330
|
+
if (name)
|
|
331
|
+
add(text(state, name), "enum");
|
|
332
|
+
}
|
|
333
|
+
if (decl.name == "AbstypeDeclaration")
|
|
334
|
+
declaredIn(state, decl, add);
|
|
335
|
+
break;
|
|
336
|
+
case "TypeDeclaration":
|
|
337
|
+
for (const name of decl.getChildren("TypeDefinition"))
|
|
338
|
+
add(text(state, name), "type");
|
|
339
|
+
break;
|
|
340
|
+
case "ExceptionDeclaration":
|
|
341
|
+
for (const name of decl.getChildren("ExceptionDefinition"))
|
|
342
|
+
add(text(state, name), "class");
|
|
343
|
+
break;
|
|
344
|
+
case "LocalDeclaration": {
|
|
345
|
+
// What follows `in` is visible after the `local`, and what comes before
|
|
346
|
+
// it is visible only inside.
|
|
347
|
+
const inKeyword = decl.getChild("in");
|
|
348
|
+
for (let child = decl.firstChild; child; child = child.nextSibling)
|
|
349
|
+
if (inKeyword && child.from > inKeyword.from)
|
|
350
|
+
declared(state, child, add);
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
case "OpenDeclaration":
|
|
354
|
+
for (const name of decl.getChildren("StructureName")) {
|
|
355
|
+
const members = structures[text(state, name)];
|
|
356
|
+
if (members)
|
|
357
|
+
for (const option of membersToCompletions(members))
|
|
358
|
+
add(option.label, option.type);
|
|
359
|
+
const own = structureBody(state, text(state, name));
|
|
360
|
+
if (own)
|
|
361
|
+
declaredIn(state, own, add);
|
|
362
|
+
}
|
|
363
|
+
break;
|
|
364
|
+
case "StructureDeclaration":
|
|
365
|
+
for (const name of decl.getChildren("StructureDefinition"))
|
|
366
|
+
add(text(state, name), "namespace");
|
|
367
|
+
break;
|
|
368
|
+
case "SignatureDeclaration":
|
|
369
|
+
for (const name of decl.getChildren("SignatureDefinition"))
|
|
370
|
+
add(text(state, name), "namespace");
|
|
371
|
+
break;
|
|
372
|
+
case "FunctorDeclaration":
|
|
373
|
+
for (const name of decl.getChildren("FunctorDefinition"))
|
|
374
|
+
add(text(state, name), "namespace");
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function declaredIn(state, block, add) {
|
|
379
|
+
for (let child = block.firstChild; child; child = child.nextSibling)
|
|
380
|
+
declared(state, child, add);
|
|
381
|
+
}
|
|
382
|
+
// The `struct ... end` of a structure declared in the file, by its name.
|
|
383
|
+
function structureBody(state, name) {
|
|
384
|
+
for (const decl of syntaxTree(state).topNode.getChildren("StructureDeclaration")) {
|
|
385
|
+
const def = decl.getChild("StructureDefinition");
|
|
386
|
+
if (def && text(state, def) == name)
|
|
387
|
+
return decl.getChild("Structure");
|
|
388
|
+
}
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
// The names a node binds for the code inside it.
|
|
392
|
+
function ownBindings(state, node, add) {
|
|
393
|
+
switch (node.name) {
|
|
394
|
+
case "FunctionClause":
|
|
395
|
+
// The parameters are the patterns before the `=`.
|
|
396
|
+
for (let child = node.firstChild; child && child.name != "="; child = child.nextSibling)
|
|
397
|
+
if (child.name != "FunctionName" && child.name != "InfixFunctionName")
|
|
398
|
+
patternVariables(state, child, add);
|
|
399
|
+
break;
|
|
400
|
+
case "Rule": {
|
|
401
|
+
const pattern = node.firstChild;
|
|
402
|
+
if (pattern)
|
|
403
|
+
patternVariables(state, pattern, add);
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
case "ValueDeclaration":
|
|
407
|
+
// `val rec f = fn ...` can call itself.
|
|
408
|
+
if (node.getChild("rec"))
|
|
409
|
+
declared(state, node, add);
|
|
410
|
+
break;
|
|
411
|
+
case "Program":
|
|
412
|
+
case "Structure":
|
|
413
|
+
case "LetExpression":
|
|
414
|
+
case "LetStructure":
|
|
415
|
+
case "LocalDeclaration":
|
|
416
|
+
case "AbstypeDeclaration":
|
|
417
|
+
// Inside a `local`, this takes in the declarations on both sides of `in`.
|
|
418
|
+
for (let child = node.firstChild; child; child = child.nextSibling)
|
|
419
|
+
declared(state, child, add);
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
// Constructors share the syntax of variables in a pattern, so `NONE` in
|
|
424
|
+
// `case x of NONE => ...` reads as a variable. A name that is a known
|
|
425
|
+
// constructor is left out.
|
|
426
|
+
function constructorsIn(state) {
|
|
427
|
+
const names = new Set(topLevel.constructors);
|
|
428
|
+
syntaxTree(state).iterate({
|
|
429
|
+
enter: (node) => {
|
|
430
|
+
if (node.name == "ConstructorDefinition" || node.name == "ExceptionDefinition")
|
|
431
|
+
names.add(text(state, node.node));
|
|
432
|
+
},
|
|
433
|
+
});
|
|
434
|
+
return names;
|
|
435
|
+
}
|
|
436
|
+
/// The names declared in the file that are in scope at the cursor: functions,
|
|
437
|
+
/// values, parameters, the variables bound by patterns, datatypes and their
|
|
438
|
+
/// constructors, exceptions, and structures.
|
|
439
|
+
const localCompletionSource = (context) => {
|
|
440
|
+
const inner = syntaxTree(context.state).resolveInner(context.pos, -1);
|
|
441
|
+
if (dontComplete.includes(inner.name) || afterDot(context))
|
|
442
|
+
return null;
|
|
443
|
+
const word = context.matchBefore(/[A-Za-z][\w']*/);
|
|
444
|
+
if (!word && !context.explicit)
|
|
445
|
+
return null;
|
|
446
|
+
const state = context.state;
|
|
447
|
+
const constructors = constructorsIn(state);
|
|
448
|
+
const seen = new Set();
|
|
449
|
+
const options = [];
|
|
450
|
+
const add = (label, type) => {
|
|
451
|
+
if (seen.has(label) || label == (word === null || word === void 0 ? void 0 : word.text))
|
|
452
|
+
return;
|
|
453
|
+
if (type == "variable" && constructors.has(label))
|
|
454
|
+
return;
|
|
455
|
+
seen.add(label);
|
|
456
|
+
options.push({ label, type });
|
|
457
|
+
};
|
|
458
|
+
for (let node = inner; node; node = node.parent)
|
|
459
|
+
ownBindings(state, node, add);
|
|
460
|
+
return { from: word ? word.from : context.pos, options, validFor: Identifier };
|
|
461
|
+
};
|
|
462
|
+
/// The members of a structure after its name and a dot: `List.` offers `map`
|
|
463
|
+
/// and `foldl`. A structure declared in the file offers what it declares.
|
|
464
|
+
const structureCompletionSource = (context) => {
|
|
465
|
+
const inner = syntaxTree(context.state).resolveInner(context.pos, -1);
|
|
466
|
+
if (dontComplete.includes(inner.name))
|
|
467
|
+
return null;
|
|
468
|
+
const match = context.matchBefore(/(?:[A-Za-z][\w']*\.)+[\w']*/);
|
|
469
|
+
if (!match)
|
|
470
|
+
return null;
|
|
471
|
+
const lastDot = match.text.lastIndexOf(".");
|
|
472
|
+
const path = match.text.slice(0, lastDot).split(".");
|
|
473
|
+
const name = path[path.length - 1];
|
|
474
|
+
const from = match.from + lastDot + 1;
|
|
475
|
+
const options = [];
|
|
476
|
+
const members = structures[name];
|
|
477
|
+
if (members)
|
|
478
|
+
options.push(...membersToCompletions(members));
|
|
479
|
+
const own = structureBody(context.state, name);
|
|
480
|
+
if (own) {
|
|
481
|
+
const seen = new Set(options.map((o) => o.label));
|
|
482
|
+
declaredIn(context.state, own, (label, type) => {
|
|
483
|
+
if (!seen.has(label)) {
|
|
484
|
+
seen.add(label);
|
|
485
|
+
options.push({ label, type });
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
return options.length ? { from, options, validFor: Identifier } : null;
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
// A fold keeps the first line in view, which says what was folded away. A
|
|
493
|
+
// block that closes with `end` keeps the `end` in view too.
|
|
494
|
+
function foldBody(node, state) {
|
|
495
|
+
const line = state.doc.lineAt(node.from);
|
|
496
|
+
const last = node.lastChild;
|
|
497
|
+
const to = last && last.name == "end" ? last.from : node.to;
|
|
498
|
+
return to > line.to ? { from: line.to, to } : null;
|
|
499
|
+
}
|
|
500
|
+
// SML has no layout rule, so the line above decides how far a new line is
|
|
501
|
+
// indented. A line that ends by opening something is followed by one indented
|
|
502
|
+
// under it, and any other line keeps its indentation.
|
|
503
|
+
const opensBlock = /(=|=>|\bof|\blet|\bin|\bthen|\belse|\blocal|\bstruct|\bsig|\bdo|\bhandle|\(|\[|\{)$/;
|
|
504
|
+
// A line that starts by closing a block lines up with the line that opened it.
|
|
505
|
+
const closers = {
|
|
506
|
+
end: ["LetExpression", "LocalDeclaration", "Structure", "Signature", "LetStructure", "AbstypeDeclaration"],
|
|
507
|
+
in: ["LetExpression", "LocalDeclaration", "LetStructure"],
|
|
508
|
+
else: ["IfExpression"],
|
|
509
|
+
")": ["ParenthesizedExpression", "TuplePattern", "ParenthesizedType"],
|
|
510
|
+
"]": ["ListExpression", "ListPattern"],
|
|
511
|
+
"}": ["RecordExpression", "RecordPattern", "RecordType"],
|
|
512
|
+
};
|
|
513
|
+
const indentSml = indentService.of((context, pos) => {
|
|
514
|
+
const state = context.state;
|
|
515
|
+
const tree = syntaxTree(state);
|
|
516
|
+
const inside = tree.resolveInner(pos, -1).name;
|
|
517
|
+
if (inside == "BlockComment" || inside == "String")
|
|
518
|
+
return null;
|
|
519
|
+
const after = /^\s*(end|in|else|\)|\]|\})/.exec(state.doc.sliceString(pos, pos + 10));
|
|
520
|
+
if (after) {
|
|
521
|
+
const kinds = closers[after[1]];
|
|
522
|
+
for (let node = tree.resolveInner(pos, 1); node; node = node.parent)
|
|
523
|
+
if (kinds.includes(node.name) && node.from < pos)
|
|
524
|
+
return context.lineIndent(state.doc.lineAt(node.from).from);
|
|
525
|
+
}
|
|
526
|
+
let line = context.lineAt(pos, -1);
|
|
527
|
+
while (!/\S/.test(line.text) && line.from > 0)
|
|
528
|
+
line = context.lineAt(line.from - 1, -1);
|
|
529
|
+
if (!/\S/.test(line.text))
|
|
530
|
+
return 0;
|
|
531
|
+
const code = line.text.replace(/\(\*.*?\*\)/g, "").trimEnd();
|
|
532
|
+
const base = context.lineIndent(line.from);
|
|
533
|
+
return opensBlock.test(code) ? base + context.unit : base;
|
|
534
|
+
});
|
|
535
|
+
const smlLanguage = LRLanguage.define({
|
|
536
|
+
name: "sml",
|
|
537
|
+
parser: parser.configure({
|
|
538
|
+
props: [
|
|
539
|
+
foldNodeProp.add({
|
|
540
|
+
"FunctionDeclaration ValueDeclaration DatatypeDeclaration": foldBody,
|
|
541
|
+
"LetExpression LocalDeclaration CaseExpression Structure Signature": foldBody,
|
|
542
|
+
"ListExpression RecordExpression ParenthesizedExpression RecordType": foldBody,
|
|
543
|
+
BlockComment: foldBody,
|
|
544
|
+
}),
|
|
545
|
+
styleTags({
|
|
546
|
+
"val fun and rec type datatype abstype withtype exception eqtype": tags.definitionKeyword,
|
|
547
|
+
"infix infixr nonfix op": tags.definitionKeyword,
|
|
548
|
+
"structure signature functor struct sig open include sharing where with": tags.moduleKeyword,
|
|
549
|
+
"let in end local": tags.keyword,
|
|
550
|
+
"if then else case of fn raise handle while do": tags.controlKeyword,
|
|
551
|
+
as: tags.keyword,
|
|
552
|
+
"andalso orelse": tags.logicOperator,
|
|
553
|
+
"div mod o before": tags.arithmeticOperator,
|
|
554
|
+
"true false": tags.bool,
|
|
555
|
+
Number: tags.number,
|
|
556
|
+
String: tags.string,
|
|
557
|
+
Char: tags.character,
|
|
558
|
+
BlockComment: tags.blockComment,
|
|
559
|
+
Wildcard: tags.special(tags.variableName),
|
|
560
|
+
"FunctionName InfixFunctionName": tags.definition(tags.function(tags.variableName)),
|
|
561
|
+
"PatternVariable SpecName": tags.definition(tags.variableName),
|
|
562
|
+
"Callee/VariableName Callee/QualifiedName/VariableName": tags.function(tags.variableName),
|
|
563
|
+
VariableName: tags.variableName,
|
|
564
|
+
"StructureName SignatureName": tags.namespace,
|
|
565
|
+
"StructureDefinition SignatureDefinition FunctorDefinition": tags.definition(tags.namespace),
|
|
566
|
+
TypeName: tags.typeName,
|
|
567
|
+
TypeDefinition: tags.definition(tags.typeName),
|
|
568
|
+
TypeVariable: tags.special(tags.typeName),
|
|
569
|
+
ConstructorName: tags.className,
|
|
570
|
+
"ConstructorDefinition ExceptionDefinition": tags.definition(tags.className),
|
|
571
|
+
FieldName: tags.propertyName,
|
|
572
|
+
"Operator PrefixOperator FixityName": tags.operator,
|
|
573
|
+
'"#" "=" "|" "*"': tags.operator,
|
|
574
|
+
'"=>" "->"': tags.punctuation,
|
|
575
|
+
'":" ":>"': tags.typeOperator,
|
|
576
|
+
", ;": tags.separator,
|
|
577
|
+
'. "..."': tags.derefOperator,
|
|
578
|
+
"( )": tags.paren,
|
|
579
|
+
'[ ] "#["': tags.squareBracket,
|
|
580
|
+
"{ }": tags.brace,
|
|
581
|
+
}),
|
|
582
|
+
],
|
|
583
|
+
}),
|
|
584
|
+
languageData: {
|
|
585
|
+
commentTokens: { block: { open: "(*", close: "*)" } },
|
|
586
|
+
closeBrackets: { brackets: ["(", "[", "{", '"'] },
|
|
587
|
+
indentOnInput: /^\s*(end|in|else|\)|\]|\})$/,
|
|
588
|
+
},
|
|
589
|
+
});
|
|
590
|
+
/// Standard ML language support, with completion for keywords, snippets, the
|
|
591
|
+
/// Basis Library and the names declared in the file.
|
|
592
|
+
function sml() {
|
|
593
|
+
return new LanguageSupport(smlLanguage, [
|
|
594
|
+
indentSml,
|
|
595
|
+
smlLanguage.data.of({ autocomplete: smlCompletion }),
|
|
596
|
+
smlLanguage.data.of({ autocomplete: structureCompletionSource }),
|
|
597
|
+
smlLanguage.data.of({ autocomplete: localCompletionSource }),
|
|
598
|
+
]);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export { localCompletionSource, parser, sml, smlCompletion, smlLanguage, snippets, structureCompletionSource };
|