@exercism/codemirror-lang-julia 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/dist/index.cjs ADDED
@@ -0,0 +1,2116 @@
1
+ 'use strict';
2
+
3
+ var common = require('@lezer/common');
4
+ var lezerJulia = require('@exercism/lezer-julia');
5
+ var language = require('@codemirror/language');
6
+ var autocomplete = require('@codemirror/autocomplete');
7
+
8
+ function _interopNamespaceDefault(e) {
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var autocomplete__namespace = /*#__PURE__*/_interopNamespaceDefault(autocomplete);
26
+
27
+ const baseNames = [
28
+ ["AbstractArray", "type", "AbstractArray{T,N}"],
29
+ ["AbstractChar", "type", ""],
30
+ ["AbstractFloat", "type", ""],
31
+ ["AbstractString", "type", ""],
32
+ ["Any", "type", ""],
33
+ ["ArgumentError", "type", "ArgumentError(msg)"],
34
+ ["Array", "type", "Array{T}(missing, dims)"],
35
+ ["AssertionError", "type", "AssertionError([msg])"],
36
+ ["AtomicMemory", "type", "AtomicMemory{T} == GenericMemory{:atomic, T, Core.CPU}"],
37
+ ["AtomicMemoryRef", "type", ""],
38
+ ["Bool", "type", ""],
39
+ ["BoundsError", "type", "BoundsError([a],[i])"],
40
+ ["Char", "type", "Char(c::Union{Number,AbstractChar})"],
41
+ ["ConcurrencyViolationError", "type", "ConcurrencyViolationError(msg) <: Exception"],
42
+ ["Cvoid", "type", ""],
43
+ ["DataType", "type", ""],
44
+ ["DenseArray", "type", "DenseArray{T, N} <: AbstractArray{T,N}"],
45
+ ["DivideError", "type", "DivideError()"],
46
+ ["DomainError", "type", "DomainError(val)"],
47
+ ["ErrorException", "type", "ErrorException(msg)"],
48
+ ["Exception", "type", ""],
49
+ ["Expr", "type", "Expr(head::Symbol, args...)"],
50
+ ["FieldError", "type", "FieldError(type::DataType, field::Symbol)"],
51
+ ["Float16", "type", ""],
52
+ ["Float32", "type", "Float32(x [, mode::RoundingMode])"],
53
+ ["Float64", "type", "Float64(x [, mode::RoundingMode])"],
54
+ ["Function", "type", ""],
55
+ ["GenericMemory", "type", "GenericMemory{kind::Symbol, T, addrspace=Core.CPU} <: DenseVector{T}"],
56
+ ["GenericMemoryRef", "type", "GenericMemoryRef{isatomic, T, addrspace} <: Ref{T} <: Any"],
57
+ ["GlobalRef", "type", ""],
58
+ ["IO", "type", ""],
59
+ ["InexactError", "type", "InexactError(name::Symbol, T, val)"],
60
+ ["InitError", "type", "InitError(mod::Symbol, error)"],
61
+ ["Int", "type", ""],
62
+ ["Int128", "type", ""],
63
+ ["Int16", "type", ""],
64
+ ["Int32", "type", ""],
65
+ ["Int64", "type", ""],
66
+ ["Int8", "type", ""],
67
+ ["Integer", "type", ""],
68
+ ["InterruptException", "type", "InterruptException()"],
69
+ ["LineNumberNode", "type", ""],
70
+ ["LoadError", "type", "LoadError(file::AbstractString, line::Int, error)"],
71
+ ["Main", "namespace", ""],
72
+ ["Memory", "type", "Memory{T}(undef, n)"],
73
+ ["MemoryRef", "type", ""],
74
+ ["Method", "type", ""],
75
+ ["MethodError", "type", "MethodError(f, args)"],
76
+ ["Module", "type", "Module(name::Symbol=:anonymous, std_imports=true, default_names=true)"],
77
+ ["NTuple", "type", "NTuple{N, T}"],
78
+ ["NamedTuple", "type", "NamedTuple(itr)"],
79
+ ["Nothing", "type", ""],
80
+ ["Number", "type", ""],
81
+ ["OutOfMemoryError", "type", "OutOfMemoryError()"],
82
+ ["OverflowError", "type", "OverflowError(msg)"],
83
+ ["Pair", "type", "Pair(x, y)"],
84
+ ["Ptr", "type", "Ptr{T}()"],
85
+ ["QuoteNode", "type", ""],
86
+ ["ReadOnlyMemoryError", "type", "ReadOnlyMemoryError()"],
87
+ ["Real", "type", ""],
88
+ ["Ref", "type", "Ref{T}"],
89
+ ["SegmentationFault", "type", ""],
90
+ ["Signed", "type", ""],
91
+ ["StackOverflowError", "type", "StackOverflowError()"],
92
+ ["String", "type", "String(s::AbstractString)"],
93
+ ["Symbol", "type", "Symbol(x...)::Symbol"],
94
+ ["Task", "type", "Task(func[, reserved_stack::Int])"],
95
+ ["Tuple", "type", "Tuple{Types...}"],
96
+ ["Type", "type", ""],
97
+ ["TypeError", "type", "TypeError(func::Symbol, context::AbstractString, expected::Type, got)"],
98
+ ["TypeVar", "type", ""],
99
+ ["UInt", "type", ""],
100
+ ["UInt128", "type", ""],
101
+ ["UInt16", "type", ""],
102
+ ["UInt32", "type", ""],
103
+ ["UInt64", "type", ""],
104
+ ["UInt8", "type", ""],
105
+ ["UndefInitializer", "type", ""],
106
+ ["UndefKeywordError", "type", "UndefKeywordError(var::Symbol)"],
107
+ ["UndefRefError", "type", "UndefRefError()"],
108
+ ["UndefVarError", "type", "UndefVarError(var::Symbol, [scope])"],
109
+ ["Union", "type", "Union{Types...}"],
110
+ ["UnionAll", "type", ""],
111
+ ["Unsigned", "type", ""],
112
+ ["Vararg", "constant", ""],
113
+ ["VecElement", "type", "VecElement{T}"],
114
+ ["WeakRef", "type", "WeakRef(x)"],
115
+ ["applicable", "function", "applicable(f, args...)::Bool"],
116
+ ["arrayref", "function", ""],
117
+ ["arrayset", "function", ""],
118
+ ["arraysize", "function", ""],
119
+ ["const_arrayref", "function", ""],
120
+ ["fieldtype", "function", "fieldtype(T, name::Symbol | index::Int)"],
121
+ ["getfield", "function", "getfield(value, name::Symbol, [order::Symbol], [boundscheck::Bool=true])"],
122
+ ["getglobal", "function", "getglobal(module::Module, name::Symbol, [order::Symbol=:monotonic])"],
123
+ ["invoke", "function", "invoke(f, argtypes::Type, args...; kwargs...)"],
124
+ ["isa", "function", "isa(x, type)::Bool"],
125
+ ["isdefined", "function", "isdefined(m::Module, s::Symbol, [order::Symbol])"],
126
+ ["isdefinedglobal", "function", "isdefinedglobal(m::Module, s::Symbol, [allow_import::Bool=true, [order::Symbol=:unordered]])"],
127
+ ["modifyfield!", "function", "modifyfield!(value, name::Symbol, op, x, [order::Symbol])::Pair"],
128
+ ["modifyglobal!", "function", "modifyglobal!(module::Module, name::Symbol, op, x, [order::Symbol=:monotonic])::Pair"],
129
+ ["nfields", "function", "nfields(x)::Int"],
130
+ ["nothing", "constant", ""],
131
+ ["replacefield!", "function", "replacefield!(value, name::Symbol, expected, desired,"],
132
+ ["replaceglobal!", "function", "replaceglobal!(module::Module, name::Symbol, expected, desired,"],
133
+ ["setfield!", "function", "setfield!(value, name::Symbol, x, [order::Symbol])"],
134
+ ["setfieldonce!", "function", "setfieldonce!(value, name::Union{Int,Symbol}, desired,"],
135
+ ["setglobal!", "function", "setglobal!(module::Module, name::Symbol, x, [order::Symbol=:monotonic])"],
136
+ ["setglobalonce!", "function", "setglobalonce!(module::Module, name::Symbol, value,"],
137
+ ["swapfield!", "function", "swapfield!(value, name::Symbol, x, [order::Symbol])"],
138
+ ["swapglobal!", "function", "swapglobal!(module::Module, name::Symbol, x, [order::Symbol=:monotonic])"],
139
+ ["throw", "function", "throw(e)"],
140
+ ["tuple", "function", "tuple(xs...)"],
141
+ ["typeassert", "function", "typeassert(x, type)"],
142
+ ["typeof", "function", "typeof(x)"],
143
+ ["undef", "constant", ""],
144
+ ["@Kwargs", "macro", "@Kwargs{key1::Type1, key2::Type2, ...}"],
145
+ ["@MIME_str", "macro", ""],
146
+ ["@NamedTuple", "macro", "@NamedTuple{key1::Type1, key2::Type2, ...}"],
147
+ ["@__DIR__", "macro", "@__DIR__ -> String"],
148
+ ["@__FILE__", "macro", "@__FILE__ -> String"],
149
+ ["@__FUNCTION__", "macro", ""],
150
+ ["@__LINE__", "macro", "@__LINE__ -> Int"],
151
+ ["@__MODULE__", "macro", "@__MODULE__ -> Module"],
152
+ ["@__dot__", "macro", ""],
153
+ ["@acquire", "macro", ""],
154
+ ["@allocated", "macro", ""],
155
+ ["@allocations", "macro", ""],
156
+ ["@assert", "macro", "@assert cond [text]"],
157
+ ["@assume_effects", "macro", ""],
158
+ ["@async", "macro", ""],
159
+ ["@atomic", "macro", "@atomic var"],
160
+ ["@atomiconce", "macro", "@atomiconce a.b.x = value"],
161
+ ["@atomicreplace", "macro", "@atomicreplace a.b.x expected => desired"],
162
+ ["@atomicswap", "macro", "@atomicswap a.b.x = new"],
163
+ ["@b_str", "macro", ""],
164
+ ["@big_str", "macro", "@big_str str"],
165
+ ["@boundscheck", "macro", "@boundscheck(blk)"],
166
+ ["@ccall", "macro", "@ccall library.function_name(argvalue1::argtype1, ...)::returntype"],
167
+ ["@cfunction", "macro", "@cfunction(callable, ReturnType, (ArgumentTypes...,)) -> Ptr{Cvoid}"],
168
+ ["@cmd", "macro", "@cmd str"],
169
+ ["@coalesce", "macro", "@coalesce(x...)"],
170
+ ["@constprop", "macro", ""],
171
+ ["@debug", "macro", "@debug message [key=value | value ...]"],
172
+ ["@deprecate", "macro", "@deprecate old new [export_old=true]"],
173
+ ["@doc", "macro", "@doc \"blah\""],
174
+ ["@elapsed", "macro", ""],
175
+ ["@enum", "macro", "@enum EnumName[::BaseType] value1[=x] value2[=y]"],
176
+ ["@error", "macro", "@error message [key=value | value ...]"],
177
+ ["@eval", "macro", "@eval [mod,] ex"],
178
+ ["@evalpoly", "macro", "@evalpoly(z, c...)"],
179
+ ["@fastmath", "macro", "@fastmath expr"],
180
+ ["@generated", "macro", "@generated f"],
181
+ ["@gensym", "macro", ""],
182
+ ["@goto", "macro", "@goto name"],
183
+ ["@html_str", "macro", "@html_str -> Docs.HTML"],
184
+ ["@inbounds", "macro", "@inbounds(blk)"],
185
+ ["@info", "macro", "@info message [key=value | value ...]"],
186
+ ["@inline", "macro", "@inline function longdef(x)"],
187
+ ["@int128_str", "macro", "@int128_str str"],
188
+ ["@invoke", "macro", "@invoke f(arg::T, ...; kwargs...)"],
189
+ ["@invokelatest", "macro", "@invokelatest f(args...; kwargs...)"],
190
+ ["@isdefined", "macro", "@isdefined(s)::Bool"],
191
+ ["@kwdef", "macro", "@kwdef typedef"],
192
+ ["@label", "macro", "@label name"],
193
+ ["@lazy_str", "macro", ""],
194
+ ["@locals", "macro", "@locals()"],
195
+ ["@lock", "macro", "@lock l expr"],
196
+ ["@lock_conflicts", "macro", ""],
197
+ ["@macroexpand", "macro", "@macroexpand [mod,] ex"],
198
+ ["@macroexpand1", "macro", "@macroexpand1 [mod,] ex"],
199
+ ["@main", "macro", "@main(args) = println(\"Hello World\")"],
200
+ ["@noinline", "macro", "@noinline function longdef(x)"],
201
+ ["@nospecialize", "macro", "@nospecialize x y"],
202
+ ["@polly", "macro", ""],
203
+ ["@propagate_inbounds", "macro", ""],
204
+ ["@r_str", "macro", "@r_str -> Regex"],
205
+ ["@raw_str", "macro", "@raw_str -> String"],
206
+ ["@s_str", "macro", "@s_str -> SubstitutionString"],
207
+ ["@show", "macro", "@show exs..."],
208
+ ["@showtime", "macro", "@showtime expr"],
209
+ ["@simd", "macro", ""],
210
+ ["@something", "macro", "@something(x...)"],
211
+ ["@specialize", "macro", ""],
212
+ ["@static", "macro", ""],
213
+ ["@sync", "macro", ""],
214
+ ["@task", "macro", ""],
215
+ ["@text_str", "macro", "@text_str -> Docs.Text"],
216
+ ["@threadcall", "macro", "@threadcall((cfunc, clib), rettype, (argtypes...), argvals...)"],
217
+ ["@time", "macro", "@time expr"],
218
+ ["@timed", "macro", ""],
219
+ ["@timev", "macro", "@timev expr"],
220
+ ["@uint128_str", "macro", "@uint128_str str"],
221
+ ["@v_str", "macro", ""],
222
+ ["@view", "macro", "@view A[inds...]"],
223
+ ["@views", "macro", "@views expression"],
224
+ ["@warn", "macro", "@warn message [key=value | value ...]"],
225
+ ["@world", "macro", "@world(sym, world)"],
226
+ ["ARGS", "constant", ""],
227
+ ["AbstractChannel", "type", "AbstractChannel{T}"],
228
+ ["AbstractDict", "type", "AbstractDict{K, V}"],
229
+ ["AbstractDisplay", "type", ""],
230
+ ["AbstractIrrational", "type", ""],
231
+ ["AbstractLock", "type", ""],
232
+ ["AbstractMatch", "type", ""],
233
+ ["AbstractMatrix", "type", "AbstractMatrix{T}"],
234
+ ["AbstractOneTo", "type", ""],
235
+ ["AbstractPattern", "type", ""],
236
+ ["AbstractPipe", "type", ""],
237
+ ["AbstractRange", "type", "AbstractRange{T} <: AbstractVector{T}"],
238
+ ["AbstractSet", "type", "AbstractSet{T}"],
239
+ ["AbstractSlices", "type", "AbstractSlices{S,N} <: AbstractArray{S,N}"],
240
+ ["AbstractUnitRange", "type", "AbstractUnitRange{T} <: OrdinalRange{T, T}"],
241
+ ["AbstractVecOrMat", "type", "AbstractVecOrMat{T}"],
242
+ ["AbstractVector", "type", "AbstractVector{T}"],
243
+ ["AsyncCondition", "type", "AsyncCondition(callback::Function)"],
244
+ ["Base", "namespace", ""],
245
+ ["BigFloat", "type", ""],
246
+ ["BigInt", "type", "BigInt(x)"],
247
+ ["BitArray", "type", "BitArray(itr)"],
248
+ ["BitMatrix", "type", ""],
249
+ ["BitSet", "type", "BitSet([itr])"],
250
+ ["BitVector", "type", "BitVector(nt::Tuple{Vararg{Bool}})"],
251
+ ["Broadcast", "namespace", ""],
252
+ ["BufferStream", "type", ""],
253
+ ["C_NULL", "constant", ""],
254
+ ["CanonicalIndexError", "type", ""],
255
+ ["CapturedException", "type", ""],
256
+ ["CartesianIndex", "type", "CartesianIndex(i, j, k...) -> I"],
257
+ ["CartesianIndices", "type", "CartesianIndices(sz::Dims) -> R"],
258
+ ["Cchar", "type", ""],
259
+ ["Cdouble", "type", ""],
260
+ ["Cfloat", "type", ""],
261
+ ["Channel", "type", "Channel{T=Any}(func::Function, size=0; taskref=nothing, spawn=false, threadpool=nothing)"],
262
+ ["Checked", "namespace", ""],
263
+ ["Cint", "type", ""],
264
+ ["Cintmax_t", "type", ""],
265
+ ["Clong", "type", ""],
266
+ ["Clonglong", "type", ""],
267
+ ["Cmd", "type", "Cmd(cmd::Cmd; ignorestatus, detach, windows_verbatim, windows_hide, env, dir, uid, gid)"],
268
+ ["CodeUnits", "type", "CodeUnits(s::AbstractString)"],
269
+ ["Colon", "type", "Colon()"],
270
+ ["ColumnSlices", "type", "ColumnSlices{M,AX,S}"],
271
+ ["Complex", "type", "Complex{T<:Real} <: Number"],
272
+ ["ComplexF16", "type", ""],
273
+ ["ComplexF32", "type", ""],
274
+ ["ComplexF64", "type", ""],
275
+ ["ComposedFunction", "type", "ComposedFunction{Outer,Inner} <: Function"],
276
+ ["CompositeException", "type", ""],
277
+ ["Condition", "type", "Condition()"],
278
+ ["Core", "namespace", ""],
279
+ ["Cptrdiff_t", "type", ""],
280
+ ["Cshort", "type", ""],
281
+ ["Csize_t", "type", ""],
282
+ ["Cssize_t", "type", ""],
283
+ ["Cstring", "type", ""],
284
+ ["Cuchar", "type", ""],
285
+ ["Cuint", "type", ""],
286
+ ["Cuintmax_t", "type", ""],
287
+ ["Culong", "type", ""],
288
+ ["Culonglong", "type", ""],
289
+ ["Cushort", "type", ""],
290
+ ["Cwchar_t", "type", ""],
291
+ ["Cwstring", "type", ""],
292
+ ["DEPOT_PATH", "constant", ""],
293
+ ["DL_LOAD_PATH", "constant", ""],
294
+ ["DenseMatrix", "type", "DenseMatrix{T}"],
295
+ ["DenseVecOrMat", "type", "DenseVecOrMat{T}"],
296
+ ["DenseVector", "type", "DenseVector{T}"],
297
+ ["Dict", "type", "Dict([itr])"],
298
+ ["DimensionMismatch", "type", "DimensionMismatch([msg])"],
299
+ ["Dims", "type", "Dims{N}"],
300
+ ["Docs", "namespace", ""],
301
+ ["ENDIAN_BOM", "constant", ""],
302
+ ["ENV", "constant", ""],
303
+ ["EOFError", "type", "EOFError()"],
304
+ ["Enum", "type", "Enum{T<:Integer}"],
305
+ ["Event", "type", "Event([autoreset=false])"],
306
+ ["ExponentialBackOff", "type", "ExponentialBackOff(; n=1, first_delay=0.05, max_delay=10.0, factor=5.0, jitter=0.1)"],
307
+ ["Filesystem", "namespace", ""],
308
+ ["Fix", "type", "Fix{N}(f, x)"],
309
+ ["Fix1", "type", ""],
310
+ ["Fix2", "type", ""],
311
+ ["GC", "namespace", ""],
312
+ ["Generator", "type", "Generator(f, iter)"],
313
+ ["HTML", "type", "HTML(\"<div>foo</div>\")"],
314
+ ["IOBuffer", "type", "IOBuffer(string::String)"],
315
+ ["IOContext", "type", "IOContext(io::IO, KV::Pair...)"],
316
+ ["IOServer", "type", ""],
317
+ ["IOStream", "type", ""],
318
+ ["IR", "namespace", ""],
319
+ ["IdDict", "type", "IdDict([itr])"],
320
+ ["IdSet", "type", "IdSet{T}([itr])"],
321
+ ["ImmutableDict", "type", "ImmutableDict(KV::Pair)"],
322
+ ["IndexCartesian", "type", "IndexCartesian()"],
323
+ ["IndexLinear", "type", "IndexLinear()"],
324
+ ["IndexStyle", "type", "IndexStyle(A)"],
325
+ ["Inf", "constant", ""],
326
+ ["Inf16", "constant", ""],
327
+ ["Inf32", "constant", ""],
328
+ ["Inf64", "constant", ""],
329
+ ["InsertionSort", "constant", ""],
330
+ ["InvalidStateException", "type", ""],
331
+ ["Irrational", "type", "Irrational{sym} <: AbstractIrrational"],
332
+ ["IteratorEltype", "type", "IteratorEltype(itertype::Type)::IteratorEltype"],
333
+ ["IteratorSize", "type", "IteratorSize(itertype::Type)::IteratorSize"],
334
+ ["Iterators", "namespace", ""],
335
+ ["KeyError", "type", "KeyError(key)"],
336
+ ["LOAD_PATH", "constant", ""],
337
+ ["LazyString", "type", ""],
338
+ ["Libc", "namespace", ""],
339
+ ["LinRange", "type", "LinRange{T,L}"],
340
+ ["LinearIndices", "type", "LinearIndices(A::AbstractArray)"],
341
+ ["Lockable", "type", "Lockable(value, lock = ReentrantLock())"],
342
+ ["LogRange", "type", "LogRange{T}(start, stop, len) <: AbstractVector{T}"],
343
+ ["MIME", "type", ""],
344
+ ["MathConstants", "namespace", ""],
345
+ ["Matrix", "type", "Matrix{T}(missing, m, n)"],
346
+ ["MergeSort", "constant", ""],
347
+ ["Meta", "namespace", ""],
348
+ ["Missing", "type", ""],
349
+ ["MissingException", "type", "MissingException(msg)"],
350
+ ["NaN", "constant", ""],
351
+ ["NaN16", "constant", ""],
352
+ ["NaN32", "constant", ""],
353
+ ["NaN64", "constant", ""],
354
+ ["OS_HANDLE", "type", ""],
355
+ ["OncePerProcess", "type", "OncePerProcess{T}(init::Function)() -> T"],
356
+ ["OncePerTask", "type", "OncePerTask{T}(init::Function)() -> T"],
357
+ ["OncePerThread", "type", "OncePerThread{T}(init::Function)() -> T"],
358
+ ["OneTo", "type", ""],
359
+ ["Order", "namespace", ""],
360
+ ["OrdinalRange", "type", "OrdinalRange{T, S} <: AbstractRange{T}"],
361
+ ["PROGRAM_FILE", "constant", ""],
362
+ ["Pairs", "type", ""],
363
+ ["PartialQuickSort", "type", "PartialQuickSort{T <: Union{Integer,OrdinalRange}}"],
364
+ ["PermutedDimsArray", "type", "PermutedDimsArray(A, perm) -> B"],
365
+ ["Pipe", "type", "Pipe()"],
366
+ ["PipeBuffer", "function", "PipeBuffer(data::AbstractVector{UInt8}=UInt8[]; maxsize::Integer = typemax(Int))"],
367
+ ["PipeEndpoint", "type", ""],
368
+ ["ProcessFailedException", "type", ""],
369
+ ["QuickSort", "constant", ""],
370
+ ["Rational", "type", "Rational{T<:Integer} <: Real"],
371
+ ["RawFD", "type", ""],
372
+ ["ReentrantLock", "type", "ReentrantLock()"],
373
+ ["Regex", "type", "Regex(pattern[, flags]) <: AbstractPattern"],
374
+ ["RegexMatch", "type", "RegexMatch(\"11:30\", hour=\"11\", minute=\"30\", 3=nothing)"],
375
+ ["Returns", "type", ""],
376
+ ["RoundDown", "constant", ""],
377
+ ["RoundFromZero", "constant", ""],
378
+ ["RoundNearest", "constant", ""],
379
+ ["RoundNearestTiesAway", "constant", ""],
380
+ ["RoundNearestTiesUp", "constant", ""],
381
+ ["RoundToZero", "constant", ""],
382
+ ["RoundUp", "constant", ""],
383
+ ["RoundingMode", "type", ""],
384
+ ["RowSlices", "type", "RowSlices{M,AX,S}"],
385
+ ["ScopedValues", "namespace", ""],
386
+ ["Semaphore", "type", "Semaphore(sem_size)"],
387
+ ["Set", "type", "Set{T} <: AbstractSet{T}"],
388
+ ["Slices", "type", "Slices{P,SM,AX,S,N} <: AbstractSlices{S,N}"],
389
+ ["Some", "type", "Some{T}"],
390
+ ["Sort", "namespace", ""],
391
+ ["StackTraces", "namespace", ""],
392
+ ["StepRange", "type", "StepRange{T, S} <: OrdinalRange{T, S}"],
393
+ ["StepRangeLen", "type", "StepRangeLen( ref::R, step::S, len, [offset=1]) where { R,S}"],
394
+ ["StridedArray", "type", "StridedArray{T, N}"],
395
+ ["StridedMatrix", "type", "StridedMatrix{T}"],
396
+ ["StridedVecOrMat", "type", "StridedVecOrMat{T}"],
397
+ ["StridedVector", "type", "StridedVector{T}"],
398
+ ["StringIndexError", "type", "StringIndexError(str, i)"],
399
+ ["SubArray", "type", "SubArray{T,N,P,I,L} <: AbstractArray{T,N}"],
400
+ ["SubString", "type", "SubString(s::AbstractString, i::Integer, j::Integer=lastindex(s))"],
401
+ ["SubstitutionString", "type", "SubstitutionString(substr) <: AbstractString"],
402
+ ["Sys", "namespace", ""],
403
+ ["SystemError", "type", "SystemError(prefix::AbstractString, [errno::Int32])"],
404
+ ["TTY", "type", ""],
405
+ ["TaskFailedException", "type", ""],
406
+ ["Text", "type", "Text(\"foo\")"],
407
+ ["TextDisplay", "type", "TextDisplay(io::IO)"],
408
+ ["Threads", "namespace", ""],
409
+ ["Timer", "type", "Timer(callback::Function, delay; interval = 0, spawn::Union{Nothing,Bool}=nothing)"],
410
+ ["UUID", "type", ""],
411
+ ["UnitRange", "type", "UnitRange{T<:Real}"],
412
+ ["VERSION", "constant", ""],
413
+ ["Val", "type", "Val(c)"],
414
+ ["VecOrMat", "type", "VecOrMat{T}"],
415
+ ["Vector", "type", "Vector{T}(missing, m)"],
416
+ ["VersionNumber", "type", ""],
417
+ ["WeakKeyDict", "type", "WeakKeyDict([itr])"],
418
+ ["abs", "function", "abs(x)"],
419
+ ["abs2", "function", "abs2(x)"],
420
+ ["abspath", "function", "abspath(path::AbstractString, paths::AbstractString...)::String"],
421
+ ["accumulate", "function", "accumulate(op, A; dims::Integer, [init])"],
422
+ ["accumulate!", "function", "accumulate!(op, B, A; [dims], [init])"],
423
+ ["acos", "function", "acos(x::T) where {T <: Number} -> float(T)"],
424
+ ["acosd", "function", "acosd(x)"],
425
+ ["acosh", "function", "acosh(x)"],
426
+ ["acot", "function", "acot(x::T) where {T <: Number} -> float(T)"],
427
+ ["acotd", "function", "acotd(x)"],
428
+ ["acoth", "function", "acoth(x::T) where {T <: Number} -> float(T)"],
429
+ ["acquire", "function", "acquire(f, s::Semaphore)"],
430
+ ["acsc", "function", "acsc(x::T) where {T <: Number} -> float(T)"],
431
+ ["acscd", "function", "acscd(x)"],
432
+ ["acsch", "function", "acsch(x::T) where {T <: Number} -> float(T)"],
433
+ ["active_manifest", "function", "active_manifest()"],
434
+ ["active_project", "function", "active_project()"],
435
+ ["addenv", "function", "addenv(command::Cmd, env...; inherit::Bool = true)"],
436
+ ["adjoint", "function", "adjoint(A)"],
437
+ ["all", "function", "all(p, A; dims)"],
438
+ ["all!", "function", "all!(r, A)"],
439
+ ["allequal", "function", "allequal(itr)::Bool"],
440
+ ["allunique", "function", "allunique(itr)::Bool"],
441
+ ["angle", "function", "angle(z)"],
442
+ ["any", "function", "any(p, A; dims)"],
443
+ ["any!", "function", "any!(r, A)"],
444
+ ["append!", "function", "append!(collection, collections...) -> collection."],
445
+ ["argmax", "function", "argmax(A; dims) -> indices"],
446
+ ["argmin", "function", "argmin(A; dims) -> indices"],
447
+ ["ascii", "function", "ascii(s::AbstractString)"],
448
+ ["asec", "function", "asec(x::T) where {T <: Number} -> float(T)"],
449
+ ["asecd", "function", "asecd(x)"],
450
+ ["asech", "function", "asech(x::T) where {T <: Number} -> float(T)"],
451
+ ["asin", "function", "asin(x::T) where {T <: Number} -> float(T)"],
452
+ ["asind", "function", "asind(x)"],
453
+ ["asinh", "function", "asinh(x)"],
454
+ ["asyncmap", "function", "asyncmap(f, c...; ntasks=0, batch_size=nothing)"],
455
+ ["asyncmap!", "function", "asyncmap!(f, results, c...; ntasks=0, batch_size=nothing)"],
456
+ ["atan", "function", "atan(y)"],
457
+ ["atand", "function", "atand(y::T) where T -> float(T)"],
458
+ ["atanh", "function", "atanh(x)"],
459
+ ["atexit", "function", "atexit(f)"],
460
+ ["atreplinit", "function", "atreplinit(f)"],
461
+ ["axes", "function", "axes(A)"],
462
+ ["backtrace", "function", "backtrace()"],
463
+ ["basename", "function", "basename(path::AbstractString)::String"],
464
+ ["big", "function", "big(T::Type)"],
465
+ ["bind", "function", "bind(chnl::Channel, task::Task)"],
466
+ ["binomial", "function", "binomial(x::Number, k::Integer)"],
467
+ ["bitreverse", "function", "bitreverse(x)"],
468
+ ["bitrotate", "function", "bitrotate(x::Base.BitInteger, k::Integer)"],
469
+ ["bitstring", "function", "bitstring(n)"],
470
+ ["broadcast", "function", "broadcast(f, As...)"],
471
+ ["broadcast!", "function", "broadcast!(f, dest, As...)"],
472
+ ["bswap", "function", "bswap(n)"],
473
+ ["bytes2hex", "function", "bytes2hex(itr)::String"],
474
+ ["bytesavailable", "function", "bytesavailable(io)"],
475
+ ["cat", "function", "cat(A...; dims)"],
476
+ ["catch_backtrace", "function", "catch_backtrace()"],
477
+ ["cbrt", "function", "cbrt(x::Real)"],
478
+ ["cconvert", "function", "cconvert(T,x)"],
479
+ ["cd", "function", "cd(f::Function, dir::AbstractString=homedir())"],
480
+ ["ceil", "function", "ceil([T,] x)"],
481
+ ["cglobal", "function", "cglobal((symbol, library) [, type=Cvoid])"],
482
+ ["checkbounds", "function", "checkbounds(A, I...)"],
483
+ ["checked_length", "function", ""],
484
+ ["checkindex", "function", "checkindex(Bool, inds::AbstractUnitRange, index)"],
485
+ ["chmod", "function", "chmod(path::AbstractString, mode::Integer; recursive::Bool=false)"],
486
+ ["chomp", "function", "chomp(s::AbstractString)::SubString"],
487
+ ["chop", "function", "chop(s::AbstractString; head::Integer = 0, tail::Integer = 1)"],
488
+ ["chopprefix", "function", "chopprefix(s::AbstractString, prefix::Union{AbstractString,Regex,AbstractChar})::SubString"],
489
+ ["chopsuffix", "function", "chopsuffix(s::AbstractString, suffix::Union{AbstractString,Regex,AbstractChar})::SubString"],
490
+ ["chown", "function", "chown(path::AbstractString, owner::Integer, group::Integer=-1)"],
491
+ ["circcopy!", "function", "circcopy!(dest, src)"],
492
+ ["circshift", "function", "circshift(A, shifts)"],
493
+ ["circshift!", "function", "circshift!(dest, src, shifts)"],
494
+ ["cis", "function", "cis(x)"],
495
+ ["cispi", "function", "cispi(x)"],
496
+ ["clamp", "function", "clamp(x::Integer, r::AbstractUnitRange)"],
497
+ ["clamp!", "function", "clamp!(array::AbstractArray, lo, hi)"],
498
+ ["cld", "function", "cld(x, y)"],
499
+ ["close", "function", "close(t::Union{Timer, AsyncCondition})"],
500
+ ["closewrite", "function", "closewrite(stream)"],
501
+ ["cmp", "function", "cmp(a::AbstractString, b::AbstractString)::Int"],
502
+ ["coalesce", "function", "coalesce(x...)"],
503
+ ["code_lowered", "function", "code_lowered(f, types; generated=true, debuginfo=:default)"],
504
+ ["code_typed", "function", "code_typed(f, types; kw...)"],
505
+ ["codepoint", "function", "codepoint(c::AbstractChar)::Integer"],
506
+ ["codeunit", "function", "codeunit(s::AbstractString, i::Integer)::Union{UInt8, UInt16, UInt32}"],
507
+ ["codeunits", "function", "codeunits(s::AbstractString)"],
508
+ ["collect", "function", "collect(iterator)"],
509
+ ["complex", "function", "complex(A::AbstractArray)"],
510
+ ["conj", "function", "conj(A::AbstractArray)"],
511
+ ["conj!", "function", "conj!(A)"],
512
+ ["contains", "function", "contains(needle)"],
513
+ ["contractuser", "function", "contractuser(path::AbstractString)::AbstractString"],
514
+ ["convert", "function", "convert(T, x)"],
515
+ ["copy", "function", "copy(x)"],
516
+ ["copy!", "function", "copy!(dst, src) -> dst"],
517
+ ["copyline", "function", "copyline(out::IO, io::IO=stdin; keep::Bool=false)"],
518
+ ["copysign", "function", "copysign(x, y) -> z"],
519
+ ["copyto!", "function", "copyto!(dest, Rdest::CartesianIndices, src, Rsrc::CartesianIndices) -> dest"],
520
+ ["copyuntil", "function", "copyuntil(out::IO, stream::IO, delim; keep::Bool = false)"],
521
+ ["cos", "function", "cos(x::T) where {T <: Number} -> float(T)"],
522
+ ["cosc", "function", "cosc(x::T) where {T <: Number} -> float(T)"],
523
+ ["cosd", "function", "cosd(x::T) where T -> float(T)"],
524
+ ["cosh", "function", "cosh(x)"],
525
+ ["cospi", "function", "cospi(x::T) where T -> float(T)"],
526
+ ["cot", "function", "cot(x::T) where {T <: Number} -> float(T)"],
527
+ ["cotd", "function", "cotd(x::T) where {T <: Number} -> float(T)"],
528
+ ["coth", "function", "coth(x::T) where {T <: Number} -> float(T)"],
529
+ ["count", "function", "count([f=identity,] A::AbstractArray; dims=:)"],
530
+ ["count!", "function", "count!([f=identity,] r, A)"],
531
+ ["count_ones", "function", "count_ones(x::Integer)::Integer"],
532
+ ["count_zeros", "function", "count_zeros(x::Integer)::Integer"],
533
+ ["countlines", "function", "countlines(io::IO; eol::AbstractChar = '\\n')"],
534
+ ["cp", "function", "cp(src::AbstractString, dst::AbstractString; force::Bool=false, follow_symlinks::Bool=false)"],
535
+ ["csc", "function", "csc(x::T) where {T <: Number} -> float(T)"],
536
+ ["cscd", "function", "cscd(x::T) where {T <: Number} -> float(T)"],
537
+ ["csch", "function", "csch(x::T) where {T <: Number} -> float(T)"],
538
+ ["ctime", "function", "ctime(path)"],
539
+ ["ctruncate", "function", ""],
540
+ ["cumprod", "function", "cumprod(itr)"],
541
+ ["cumprod!", "function", "cumprod!(y::AbstractVector, x::AbstractVector)"],
542
+ ["cumsum", "function", "cumsum(itr)"],
543
+ ["cumsum!", "function", "cumsum!(B, A; dims::Integer)"],
544
+ ["current_exceptions", "function", "current_exceptions(task::Task=current_task(); [backtrace::Bool=true])"],
545
+ ["current_task", "function", "current_task()"],
546
+ ["deepcopy", "function", "deepcopy(x)"],
547
+ ["deg2rad", "function", "deg2rad(x)"],
548
+ ["delete!", "function", "delete!(collection, key)"],
549
+ ["deleteat!", "function", "deleteat!(a::Vector, inds)"],
550
+ ["denominator", "function", "denominator(x)"],
551
+ ["depwarn", "function", ""],
552
+ ["detach", "function", "detach(command)"],
553
+ ["devnull", "constant", ""],
554
+ ["diff", "function", "diff(A::AbstractVector)"],
555
+ ["digits", "function", "digits([T<:Integer], n::Integer; base::T = 10, pad::Integer = 1)"],
556
+ ["digits!", "function", "digits!(array, n::Integer; base::Integer = 10)"],
557
+ ["dirname", "function", "dirname(path::AbstractString)::String"],
558
+ ["disable_sigint", "function", "disable_sigint(f::Function)"],
559
+ ["diskstat", "function", "diskstat(path=pwd())"],
560
+ ["display", "function", "display(x)"],
561
+ ["displayable", "function", "displayable(mime)::Bool"],
562
+ ["displaysize", "function", "displaysize([io::IO]) -> (lines, columns)"],
563
+ ["div", "function", "div(x, y, r::RoundingMode=RoundToZero)"],
564
+ ["divrem", "function", "divrem(x, y, r::RoundingMode=RoundToZero)"],
565
+ ["donotdelete", "function", "donotdelete(i)"],
566
+ ["download", "function", "download(url::AbstractString, [path::AbstractString = tempname()]) -> path"],
567
+ ["dropdims", "function", "dropdims(A; dims)"],
568
+ ["dump", "function", "dump(x; maxdepth=8)"],
569
+ ["dup", "function", "dup(src::RawFD[, target::RawFD])::RawFD"],
570
+ ["eachcol", "function", "eachcol(A::AbstractVecOrMat) <: AbstractVector"],
571
+ ["eachindex", "function", "eachindex(A...)"],
572
+ ["eachline", "function", "eachline(io::IO=stdin; keep::Bool=false)"],
573
+ ["eachmatch", "function", "eachmatch(r::Regex, s::AbstractString; overlap::Bool=false)"],
574
+ ["eachrow", "function", "eachrow(A::AbstractVecOrMat) <: AbstractVector"],
575
+ ["eachrsplit", "function", "eachrsplit(str::AbstractString, dlm; limit::Integer=0, keepempty::Bool=true)"],
576
+ ["eachslice", "function", "eachslice(A::AbstractArray; dims, drop=true)"],
577
+ ["eachsplit", "function", "eachsplit(str::AbstractString, dlm; limit::Integer=0, keepempty::Bool=true)"],
578
+ ["elsize", "function", "elsize(type)"],
579
+ ["eltype", "function", "eltype(type)"],
580
+ ["empty", "function", "empty(a::AbstractDict, [index_type=keytype(a)], [value_type=valtype(a)])"],
581
+ ["empty!", "function", "empty!(c::Channel)"],
582
+ ["endswith", "function", "endswith(s::AbstractString, suffix::Regex)"],
583
+ ["enumerate", "function", "enumerate(iter)"],
584
+ ["eof", "function", "eof(stream)::Bool"],
585
+ ["eps", "function", "eps(x::AbstractFloat)"],
586
+ ["error", "function", "error(msg...)"],
587
+ ["errormonitor", "function", "errormonitor(t::Task)"],
588
+ ["esc", "function", "esc(e)"],
589
+ ["escape_microsoft_c_args", "function", "escape_microsoft_c_args(args::Union{Cmd,AbstractString...})"],
590
+ ["escape_raw_string", "function", "escape_raw_string(s::AbstractString, delim='\"')::AbstractString"],
591
+ ["escape_string", "function", "escape_string(str::AbstractString[, esc]; keep=(), ascii=false, fullhex=false)::AbstractString"],
592
+ ["evalfile", "function", "evalfile(path::AbstractString, args::Vector{String}=String[])"],
593
+ ["evalpoly", "function", "evalpoly(x, p)"],
594
+ ["exit", "function", "exit(code=0)"],
595
+ ["exit_on_sigint", "function", "exit_on_sigint(on::Bool)"],
596
+ ["exp", "function", "exp(x)"],
597
+ ["exp10", "function", "exp10(x)"],
598
+ ["exp2", "function", "exp2(x)"],
599
+ ["expanduser", "function", "expanduser(path::AbstractString)::AbstractString"],
600
+ ["expm1", "function", "expm1(x)"],
601
+ ["exponent", "function", "exponent(x::Real)::Int"],
602
+ ["extrema", "function", "extrema(f, A::AbstractArray; dims) -> Array{Tuple}"],
603
+ ["extrema!", "function", "extrema!(r, A)"],
604
+ ["factorial", "function", "factorial(n::Integer)"],
605
+ ["falses", "function", "falses(dims)"],
606
+ ["fd", "function", "fd(x)::RawFD"],
607
+ ["fdio", "function", "fdio([name::AbstractString, ]fd::Integer[, own::Bool=false])::IOStream"],
608
+ ["fetch", "function", "fetch(t::Task)"],
609
+ ["fieldcount", "function", "fieldcount(t::Type)"],
610
+ ["fieldindex", "function", "fieldindex(T, name::Symbol, err:Bool=true)"],
611
+ ["fieldname", "function", "fieldname(x::DataType, i::Integer)"],
612
+ ["fieldnames", "function", "fieldnames(x::DataType)"],
613
+ ["fieldoffset", "function", "fieldoffset(type, name::Symbol | i::Integer)"],
614
+ ["fieldtypes", "function", "fieldtypes(T::Type)"],
615
+ ["filemode", "function", "filemode(path)"],
616
+ ["filesize", "function", "filesize(path)"],
617
+ ["fill", "function", "fill(value, dims::Tuple)"],
618
+ ["fill!", "function", "fill!(A, x)"],
619
+ ["filter", "function", "filter(f, itr::SkipMissing{<:AbstractArray})"],
620
+ ["filter!", "function", "filter!(f, d::AbstractDict)"],
621
+ ["finalize", "function", "finalize(x)"],
622
+ ["finalizer", "function", "finalizer(f, x)"],
623
+ ["findall", "function", "findall(c::AbstractChar, s::AbstractString)"],
624
+ ["findfirst", "function", "findfirst(pattern::AbstractVector{<:Union{Int8,UInt8}},"],
625
+ ["findlast", "function", "findlast(ch::AbstractChar, string::AbstractString)"],
626
+ ["findmax", "function", "findmax(f, A; dims) -> (f(x), index)"],
627
+ ["findmax!", "function", "findmax!(rval, rind, A) -> (maxval, index)"],
628
+ ["findmin", "function", "findmin(f, A; dims) -> (f(x), index)"],
629
+ ["findmin!", "function", "findmin!(rval, rind, A) -> (minval, index)"],
630
+ ["findnext", "function", "findnext(pattern::AbstractVector{<:Union{Int8,UInt8}},"],
631
+ ["findprev", "function", "findprev(pattern::AbstractVector{<:Union{Int8,UInt8}},"],
632
+ ["first", "function", "first(s::AbstractString, n::Integer)"],
633
+ ["firstindex", "function", "firstindex(collection)::Integer"],
634
+ ["fld", "function", "fld(x, y)"],
635
+ ["fld1", "function", "fld1(x, y)"],
636
+ ["fldmod", "function", "fldmod(x, y)"],
637
+ ["fldmod1", "function", "fldmod1(x, y)"],
638
+ ["flipsign", "function", "flipsign(x, y)"],
639
+ ["float", "function", "float(A::AbstractArray)"],
640
+ ["floatmax", "function", "floatmax(T = Float64)"],
641
+ ["floatmin", "function", "floatmin(T = Float64)"],
642
+ ["floor", "function", "floor([T,] x)"],
643
+ ["flush", "function", "flush(io::IO)"],
644
+ ["fma", "function", "fma(x, y, z)"],
645
+ ["foldl", "function", "foldl(op, itr; [init])"],
646
+ ["foldr", "function", "foldr(op, itr; [init])"],
647
+ ["foreach", "function", "foreach(f, c...) -> nothing"],
648
+ ["fourthroot", "function", "fourthroot(x)"],
649
+ ["frexp", "function", "frexp(val)"],
650
+ ["front", "function", "front(x::Tuple)::Tuple"],
651
+ ["fullname", "function", "fullname(m::Module)"],
652
+ ["functionloc", "function", "functionloc(f::Function, types)"],
653
+ ["gcd", "function", "gcd(x, y...)"],
654
+ ["gcdx", "function", "gcdx(a, b...)"],
655
+ ["gensym", "function", "gensym([tag])"],
656
+ ["get", "function", "get(f::Union{Function, Type}, collection, key)"],
657
+ ["get!", "function", "get!(f::Union{Function, Type}, collection, key)"],
658
+ ["get_extension", "function", "get_extension(parent::Module, extension::Symbol)"],
659
+ ["get_zero_subnormals", "function", "get_zero_subnormals()::Bool"],
660
+ ["gethostname", "function", "gethostname()::String"],
661
+ ["getindex", "function", "getindex(A, inds...)"],
662
+ ["getkey", "function", "getkey(collection, key, default)"],
663
+ ["getpid", "function", "getpid(process)::Int32"],
664
+ ["getproperty", "function", "getproperty(value, name::Symbol)"],
665
+ ["gperm", "function", "gperm(path)"],
666
+ ["hardlink", "function", "hardlink(src::AbstractString, dst::AbstractString)"],
667
+ ["has_offset_axes", "function", "has_offset_axes(A)"],
668
+ ["hasfield", "function", "hasfield(T::Type, name::Symbol)"],
669
+ ["hash", "function", "hash(x[, h::UInt])::UInt"],
670
+ ["haskey", "function", "haskey(collection, key)::Bool"],
671
+ ["hasmethod", "function", "hasmethod(f, t::Type{<:Tuple}[, kwnames]; world=get_world_counter())::Bool"],
672
+ ["hasproperty", "function", "hasproperty(x, s::Symbol)"],
673
+ ["hcat", "function", "hcat(A...)"],
674
+ ["hex2bytes", "function", "hex2bytes(itr)"],
675
+ ["hex2bytes!", "function", "hex2bytes!(dest::AbstractVector{UInt8}, itr)"],
676
+ ["homedir", "function", "homedir()::String"],
677
+ ["htol", "function", "htol(x)"],
678
+ ["hton", "function", "hton(x)"],
679
+ ["hvcat", "function", "hvcat(blocks_per_row::Union{Tuple{Vararg{Int}}, Int}, values...)"],
680
+ ["hvncat", "function", "hvncat(dim::Int, row_first, values...)"],
681
+ ["hypot", "function", "hypot(x, y)"],
682
+ ["identify_package", "function", ""],
683
+ ["identity", "function", "identity(x)"],
684
+ ["ifelse", "function", "ifelse(condition::Bool, x, y)"],
685
+ ["ignorestatus", "function", "ignorestatus(command)"],
686
+ ["im", "constant", ""],
687
+ ["imag", "function", "imag(A::AbstractArray)"],
688
+ ["in", "function", "in(item, collection)::Bool"],
689
+ ["in!", "function", "in!(x, s::AbstractSet)::Bool"],
690
+ ["include_dependency", "function", "include_dependency(path::AbstractString; track_content::Bool=true)"],
691
+ ["include_string", "function", ""],
692
+ ["indexin", "function", "indexin(a, b)"],
693
+ ["insert!", "function", "insert!(a::Vector, index::Integer, item)"],
694
+ ["insertdims", "function", "insertdims(A; dims)"],
695
+ ["insorted", "function", "insorted(x, v; by=identity, lt=isless, rev=false)::Bool"],
696
+ ["instances", "function", "instances(T::Type)"],
697
+ ["intersect", "function", "intersect(s, itrs...)"],
698
+ ["intersect!", "function", "intersect!(s::Union{AbstractSet,AbstractVector}, itrs...)"],
699
+ ["inv", "function", "inv(x)"],
700
+ ["invmod", "function", "invmod(n::Integer, T) where {T <: Base.BitInteger}"],
701
+ ["invokelatest", "function", "invokelatest(f, args...; kwargs...)"],
702
+ ["invperm", "function", "invperm(v)"],
703
+ ["invpermute!", "function", "invpermute!(v, p)"],
704
+ ["isa_ast_node", "function", "isa_ast_node(x)"],
705
+ ["isabspath", "function", "isabspath(path::AbstractString)::Bool"],
706
+ ["isabstracttype", "function", "isabstracttype(T)"],
707
+ ["isambiguous", "function", ""],
708
+ ["isapprox", "function", "isapprox(x; kwargs...) / ≈(x; kwargs...)"],
709
+ ["isascii", "function", "isascii(cu::AbstractVector{CU}) where {CU <: Integer}::Bool"],
710
+ ["isassigned", "function", "isassigned(ref::RefValue)::Bool"],
711
+ ["isbinaryoperator", "function", "isbinaryoperator(s::Symbol)"],
712
+ ["isbits", "function", "isbits(x)"],
713
+ ["isbitstype", "function", "isbitstype(T)"],
714
+ ["isblockdev", "function", "isblockdev(path)::Bool"],
715
+ ["ischardev", "function", "ischardev(path)::Bool"],
716
+ ["iscntrl", "function", "iscntrl(c::AbstractChar)::Bool"],
717
+ ["isconcretetype", "function", "isconcretetype(T)"],
718
+ ["isconst", "function", "isconst(t::DataType, s::Union{Int,Symbol})::Bool"],
719
+ ["isdigit", "function", "isdigit(c::AbstractChar)::Bool"],
720
+ ["isdir", "function", "isdir(path)::Bool"],
721
+ ["isdirpath", "function", "isdirpath(path::AbstractString)::Bool"],
722
+ ["isdisjoint", "function", "isdisjoint(x)"],
723
+ ["isdispatchtuple", "function", "isdispatchtuple(T)"],
724
+ ["isdone", "function", "isdone(itr, [state])::Union{Bool, Missing}"],
725
+ ["isempty", "function", "isempty(condition)"],
726
+ ["isequal", "function", "isequal(x)"],
727
+ ["iseven", "function", "iseven(x::Number)::Bool"],
728
+ ["isexecutable", "function", "isexecutable(path::String)"],
729
+ ["isexported", "function", "isexported(m::Module, s::Symbol)::Bool"],
730
+ ["isexpr", "function", ""],
731
+ ["isfifo", "function", "isfifo(path)::Bool"],
732
+ ["isfile", "function", "isfile(path)::Bool"],
733
+ ["isfinite", "function", "isfinite(f)::Bool"],
734
+ ["isfull", "function", "isfull(c::Channel)"],
735
+ ["isidentifier", "function", "isidentifier(s) -> Bool"],
736
+ ["isimmutable", "function", "isimmutable(v) -> Bool"],
737
+ ["isinf", "function", "isinf(f)::Bool"],
738
+ ["isinteger", "function", "isinteger(x)::Bool"],
739
+ ["isinteractive", "function", "isinteractive()::Bool"],
740
+ ["isless", "function", "isless(a::AbstractString, b::AbstractString)::Bool"],
741
+ ["isletter", "function", "isletter(c::AbstractChar)::Bool"],
742
+ ["islink", "function", "islink(path)::Bool"],
743
+ ["islocked", "function", "islocked(lock) -> Status (Boolean)"],
744
+ ["islowercase", "function", "islowercase(c::AbstractChar)::Bool"],
745
+ ["ismarked", "function", "ismarked(s::IO)"],
746
+ ["ismissing", "function", "ismissing(x)"],
747
+ ["ismount", "function", "ismount(path)::Bool"],
748
+ ["ismutable", "function", "ismutable(v)::Bool"],
749
+ ["ismutabletype", "function", "ismutabletype(T)::Bool"],
750
+ ["isnan", "function", "isnan(f)::Bool"],
751
+ ["isnegative", "function", "isnegative(x)"],
752
+ ["isnothing", "function", "isnothing(x)"],
753
+ ["isnumeric", "function", "isnumeric(c::AbstractChar)::Bool"],
754
+ ["isodd", "function", "isodd(x::Number)::Bool"],
755
+ ["isone", "function", "isone(x)"],
756
+ ["isopen", "function", "isopen(s::IOStream)"],
757
+ ["isoperator", "function", "isoperator(s::Symbol)"],
758
+ ["ispath", "function", "ispath(path)::Bool"],
759
+ ["isperm", "function", "isperm(v)::Bool"],
760
+ ["ispositive", "function", "ispositive(x)"],
761
+ ["ispow2", "function", "ispow2(n::Number)::Bool"],
762
+ ["isprimitivetype", "function", "isprimitivetype(T)::Bool"],
763
+ ["isprint", "function", "isprint(c::AbstractChar)::Bool"],
764
+ ["ispublic", "function", "ispublic(m::Module, s::Symbol)::Bool"],
765
+ ["ispunct", "function", "ispunct(c::AbstractChar)::Bool"],
766
+ ["isqrt", "function", "isqrt(n::Integer)"],
767
+ ["isreadable", "function", "isreadable(io)::Bool"],
768
+ ["isreadonly", "function", "isreadonly(io)::Bool"],
769
+ ["isready", "function", "isready(c::Channel)"],
770
+ ["isreal", "function", "isreal(x)::Bool"],
771
+ ["issetequal", "function", "issetequal(x)"],
772
+ ["issetgid", "function", "issetgid(path)::Bool"],
773
+ ["issetuid", "function", "issetuid(path)::Bool"],
774
+ ["issingletontype", "function", ""],
775
+ ["issocket", "function", "issocket(path)::Bool"],
776
+ ["issorted", "function", ""],
777
+ ["isspace", "function", "isspace(c::AbstractChar)::Bool"],
778
+ ["issticky", "function", "issticky(path)::Bool"],
779
+ ["isstructtype", "function", "isstructtype(T)::Bool"],
780
+ ["issubnormal", "function", "issubnormal(f)::Bool"],
781
+ ["issubset", "function", "issubset(x)"],
782
+ ["istaskdone", "function", "istaskdone(t::Task)::Bool"],
783
+ ["istaskfailed", "function", "istaskfailed(t::Task)::Bool"],
784
+ ["istaskstarted", "function", "istaskstarted(t::Task)::Bool"],
785
+ ["istextmime", "function", "istextmime(m::MIME)"],
786
+ ["isunaryoperator", "function", "isunaryoperator(s::Symbol)"],
787
+ ["isunordered", "function", "isunordered(x)"],
788
+ ["isuppercase", "function", "isuppercase(c::AbstractChar)::Bool"],
789
+ ["isvalid", "function", "isvalid(s::AbstractString, i::Integer)::Bool"],
790
+ ["iswritable", "function", "iswritable(io)::Bool"],
791
+ ["isxdigit", "function", "isxdigit(c::AbstractChar)::Bool"],
792
+ ["iszero", "function", "iszero(x)"],
793
+ ["iterate", "function", "iterate(s::AbstractString, i::Integer)::Union{Tuple{<:AbstractChar, Int}, Nothing}"],
794
+ ["jit_total_bytes", "function", ""],
795
+ ["join", "function", "join([io::IO,] iterator [, delim [, last]])"],
796
+ ["joinpath", "function", "joinpath(parts::AbstractString...)::String"],
797
+ ["keepat!", "function", "keepat!(a::Vector, m::AbstractVector{Bool})"],
798
+ ["keys", "function", "keys(m::RegexMatch)::Vector"],
799
+ ["keytype", "function", "keytype(type)"],
800
+ ["kill", "function", "kill(p::Process, signum=Base.SIGTERM)"],
801
+ ["kron", "function", "kron(A, B)"],
802
+ ["kron!", "function", "kron!(C, A, B)"],
803
+ ["last", "function", "last(s::AbstractString, n::Integer)"],
804
+ ["lastindex", "function", "lastindex(collection)::Integer"],
805
+ ["lcm", "function", "lcm(x, y...)"],
806
+ ["ldexp", "function", "ldexp(x, n)"],
807
+ ["leading_ones", "function", "leading_ones(x::Integer)::Integer"],
808
+ ["leading_zeros", "function", "leading_zeros(x::Integer)::Integer"],
809
+ ["length", "function", "length(s::AbstractString)::Int"],
810
+ ["link_pipe!", "function", "link_pipe!(pipe; reader_supports_async=false, writer_supports_async=false)"],
811
+ ["load_path", "function", "load_path()"],
812
+ ["locate_package", "function", ""],
813
+ ["lock", "function", "lock(f::Function, l::Lockable)"],
814
+ ["log", "function", "log(x)"],
815
+ ["log10", "function", "log10(x)"],
816
+ ["log1p", "function", "log1p(x)"],
817
+ ["log2", "function", "log2(x)"],
818
+ ["logrange", "function", "logrange(start, stop, length)"],
819
+ ["lowercase", "function", "lowercase(s::AbstractString)"],
820
+ ["lowercasefirst", "function", "lowercasefirst(s::AbstractString)"],
821
+ ["lpad", "function", "lpad(s, n::Integer, p::Union{AbstractChar,AbstractString}=' ')::String"],
822
+ ["lstat", "function", "lstat(path)"],
823
+ ["lstrip", "function", "lstrip([pred=isspace,] str::AbstractString)::SubString"],
824
+ ["ltoh", "function", "ltoh(x)"],
825
+ ["ltruncate", "function", ""],
826
+ ["macroexpand", "function", "macroexpand(m::Module, x; recursive=true, legacyscope=true)"],
827
+ ["macroexpand!", "function", "macroexpand!(m::Module, x; recursive=true, legacyscope=false)"],
828
+ ["map", "function", "map(f, A::AbstractArray...) -> N-array"],
829
+ ["map!", "function", "map!(f, values(dict::AbstractDict))"],
830
+ ["mapfoldl", "function", "mapfoldl(f, op, itr; [init])"],
831
+ ["mapfoldr", "function", "mapfoldr(f, op, itr; [init])"],
832
+ ["mapreduce", "function", "mapreduce(f, op, A::AbstractArray...; dims=:, [init])"],
833
+ ["mapslices", "function", "mapslices(f, A; dims)"],
834
+ ["mark", "function", "mark(s::IO)"],
835
+ ["match", "function", "match(r::Regex, s::AbstractString[, idx::Integer[, addopts]])"],
836
+ ["max", "function", "max(x, y, ...)"],
837
+ ["maximum", "function", "maximum(f, A::AbstractArray; dims)"],
838
+ ["maximum!", "function", "maximum!(r, A)"],
839
+ ["maxintfloat", "function", "maxintfloat(T, S)"],
840
+ ["memoryindex", "function", "memoryindex(ref::GenericMemoryRef)::Int"],
841
+ ["memoryref", "function", "memoryref(::GenericMemory, index::Integer)"],
842
+ ["merge", "function", "merge(a::NamedTuple, iterable)"],
843
+ ["merge!", "function", "merge!(d::AbstractDict, others::AbstractDict...)"],
844
+ ["mergewith", "function", "mergewith(combine, d::AbstractDict, others::AbstractDict...)"],
845
+ ["mergewith!", "function", "mergewith!(combine, d::AbstractDict, others::AbstractDict...) -> d"],
846
+ ["methods", "function", "methods(f, [types], [module])"],
847
+ ["min", "function", "min(x, y, ...)"],
848
+ ["minimum", "function", "minimum(f, A::AbstractArray; dims)"],
849
+ ["minimum!", "function", "minimum!(r, A)"],
850
+ ["minmax", "function", "minmax(x, y)"],
851
+ ["missing", "constant", ""],
852
+ ["mkdir", "function", "mkdir(path::AbstractString; mode::Unsigned = 0o777)"],
853
+ ["mkpath", "function", "mkpath(path::AbstractString; mode::Unsigned = 0o777)"],
854
+ ["mktemp", "function", "mktemp(f::Function, parent=tempdir())"],
855
+ ["mktempdir", "function", "mktempdir(f::Function, parent=tempdir(); prefix=\"jl_\")"],
856
+ ["mod", "function", "mod(x::Integer, T::Type{<:Integer})::T"],
857
+ ["mod1", "function", "mod1(x, y)"],
858
+ ["mod2pi", "function", "mod2pi(x)"],
859
+ ["modf", "function", "modf(x)"],
860
+ ["modifyproperty!", "function", "modifyproperty!(x, f::Symbol, op, v, order::Symbol=:not_atomic)"],
861
+ ["moduleroot", "function", "moduleroot(m::Module)::Module"],
862
+ ["mtime", "function", "mtime(path)"],
863
+ ["mul_hi", "function", "mul_hi(a::T, b::T) where {T<:Base.Integer}"],
864
+ ["muladd", "function", "muladd(x, y, z)"],
865
+ ["mv", "function", "mv(src::AbstractString, dst::AbstractString; force::Bool=false)"],
866
+ ["nameof", "function", "nameof(f::Function)::Symbol"],
867
+ ["names", "function", ""],
868
+ ["nand", "function", "nand(x, y)"],
869
+ ["ncodeunits", "function", "ncodeunits(s::AbstractString)::Int"],
870
+ ["ndigits", "function", "ndigits(n::Integer; base::Integer=10, pad::Integer=1)"],
871
+ ["ndims", "function", "ndims(A::AbstractArray)::Integer"],
872
+ ["nextfloat", "function", "nextfloat(x::AbstractFloat)"],
873
+ ["nextind", "function", "nextind(str::AbstractString, i::Integer, n::Integer=1)::Int"],
874
+ ["nextpow", "function", "nextpow(a, x)"],
875
+ ["nextprod", "function", "nextprod(factors::Union{Tuple,AbstractVector}, n)"],
876
+ ["nonmissingtype", "function", "nonmissingtype(T::Type)"],
877
+ ["nor", "function", "nor(x, y)"],
878
+ ["normpath", "function", "normpath(path::AbstractString, paths::AbstractString...)::String"],
879
+ ["notify", "function", "notify(condition, val=nothing; all=true, error=false)"],
880
+ ["notnothing", "function", "notnothing(x)"],
881
+ ["ntoh", "function", "ntoh(x)"],
882
+ ["ntuple", "function", "ntuple(f, ::Val{N})"],
883
+ ["numerator", "function", "numerator(x)"],
884
+ ["objectid", "function", "objectid(x)::UInt"],
885
+ ["occursin", "function", "occursin(haystack)"],
886
+ ["oftype", "function", "oftype(x, y)"],
887
+ ["one", "function", "one(x)"],
888
+ ["ones", "function", "ones([T=Float64,] dims::Tuple)"],
889
+ ["oneunit", "function", "oneunit(x::T)"],
890
+ ["only", "function", "only(x)"],
891
+ ["open", "function", "open(f::Function, command, args...; kwargs...)"],
892
+ ["operator_associativity", "function", "operator_associativity(s::Symbol)"],
893
+ ["operator_precedence", "function", "operator_precedence(s::Symbol)"],
894
+ ["operm", "function", "operm(path)"],
895
+ ["pairs", "function", "pairs(collection)"],
896
+ ["parent", "function", "parent(A)"],
897
+ ["parentindices", "function", "parentindices(A)"],
898
+ ["parentmodule", "function", "parentmodule(m::Method)::Module"],
899
+ ["parse", "function", "parse(type, str; base)"],
900
+ ["partialsort", "function", "partialsort(v, k, by=identity, lt=isless, rev=false, order::Base.Order.Ordering=Base.Order.Forward)"],
901
+ ["partialsort!", "function", "partialsort!(v, k; by=identity, lt=isless, rev=false, order::Base.Order.Ordering=Base.Order.Forward)"],
902
+ ["partialsortperm", "function", "partialsortperm(v, k; by=identity, lt=isless, rev=false)"],
903
+ ["partialsortperm!", "function", "partialsortperm!(ix, v, k; by=identity, lt=isless, rev=false)"],
904
+ ["pathof", "function", "pathof(m::Module)"],
905
+ ["peek", "function", "peek(stream[, T=UInt8])"],
906
+ ["permute!", "function", "permute!(v, p)"],
907
+ ["permutedims", "function", "permutedims(v::AbstractVector)"],
908
+ ["permutedims!", "function", "permutedims!(dest, src, perm)"],
909
+ ["pi", "constant", ""],
910
+ ["pipeline", "function", "pipeline(from, to, ...)"],
911
+ ["pkgdir", "function", "pkgdir(m::Module[, paths::String...])"],
912
+ ["pkgversion", "function", "pkgversion(m::Module)"],
913
+ ["pointer", "function", "pointer(array [, index])"],
914
+ ["pointer_from_objref", "function", "pointer_from_objref(x)"],
915
+ ["pop!", "function", "pop!(collection, key[, default])"],
916
+ ["popat!", "function", "popat!(a::Vector, i::Integer, [default])"],
917
+ ["popdisplay", "function", "popdisplay()"],
918
+ ["popfirst!", "function", "popfirst!(collection) -> item"],
919
+ ["position", "function", "position(s)"],
920
+ ["powermod", "function", "powermod(x::Integer, p::Integer, m)"],
921
+ ["precision", "function", "precision(num::AbstractFloat; base::Integer=2)"],
922
+ ["precompile", "function", "precompile(f, argtypes::Tuple{Vararg{Any}}, m::Method)"],
923
+ ["prepend!", "function", "prepend!(a::Vector, collections...) -> collection"],
924
+ ["prevfloat", "function", "prevfloat(x::AbstractFloat)"],
925
+ ["prevind", "function", "prevind(str::AbstractString, i::Integer, n::Integer=1)::Int"],
926
+ ["prevpow", "function", "prevpow(a, x)"],
927
+ ["print", "function", "print([io::IO], xs...)"],
928
+ ["println", "function", "println([io::IO], xs...)"],
929
+ ["printstyled", "function", ""],
930
+ ["process_exited", "function", "process_exited(p::Process)"],
931
+ ["process_running", "function", "process_running(p::Process)"],
932
+ ["prod", "function", "prod(f, A::AbstractArray; dims)"],
933
+ ["prod!", "function", "prod!(r, A)"],
934
+ ["promote", "function", "promote(xs...)"],
935
+ ["promote_rule", "function", "promote_rule(type1, type2)"],
936
+ ["promote_shape", "function", "promote_shape(s1, s2)"],
937
+ ["promote_type", "function", "promote_type(type1, type2, ...)"],
938
+ ["propertynames", "function", "propertynames(x, private=false)"],
939
+ ["push!", "function", "push!(collection, items...) -> collection"],
940
+ ["pushdisplay", "function", "pushdisplay(d::AbstractDisplay)"],
941
+ ["pushfirst!", "function", "pushfirst!(collection, items...) -> collection"],
942
+ ["put!", "function", "put!(c::Channel, v)"],
943
+ ["pwd", "function", "pwd()::String"],
944
+ ["quoted", "function", "quoted(x)"],
945
+ ["rad2deg", "function", "rad2deg(x)"],
946
+ ["rand", "function", "rand([rng=default_rng()], [S], [dims...])"],
947
+ ["randn", "function", "randn([rng=default_rng()], [T=Float64], [dims...])"],
948
+ ["range", "function", "range(start, stop, length)"],
949
+ ["rationalize", "function", "rationalize([T<:Integer=Int,] x; tol::Real=eps(x))"],
950
+ ["read", "function", "read(command::Cmd, String)"],
951
+ ["read!", "function", "read!(stream::IO, array::AbstractArray)"],
952
+ ["readavailable", "function", "readavailable(stream)"],
953
+ ["readbytes!", "function", "readbytes!(stream::IOStream, b::AbstractVector{UInt8}, nb=length(b); all::Bool=true)"],
954
+ ["readchomp", "function", "readchomp(x)"],
955
+ ["readdir", "function", "readdir(dir::AbstractString=pwd();"],
956
+ ["readeach", "function", "readeach(io::IO, T)"],
957
+ ["readline", "function", "readline(io::IO=stdin; keep::Bool=false)"],
958
+ ["readlines", "function", "readlines(io::IO=stdin; keep::Bool=false)"],
959
+ ["readlink", "function", "readlink(path::AbstractString)::String"],
960
+ ["readuntil", "function", "readuntil(stream::IO, delim; keep::Bool = false)"],
961
+ ["real", "function", "real(A::AbstractArray)"],
962
+ ["realpath", "function", "realpath(path::AbstractString)::String"],
963
+ ["redirect_stderr", "function", "redirect_stderr(f::Function, stream)"],
964
+ ["redirect_stdin", "function", "redirect_stdin(f::Function, stream)"],
965
+ ["redirect_stdio", "function", "redirect_stdio(f; stdin=nothing, stderr=nothing, stdout=nothing)"],
966
+ ["redirect_stdout", "function", "redirect_stdout(f::Function, stream)"],
967
+ ["redisplay", "function", "redisplay(x)"],
968
+ ["reduce", "function", "reduce(f, A::AbstractArray; dims=:, [init])"],
969
+ ["reenable_sigint", "function", "reenable_sigint(f::Function)"],
970
+ ["reim", "function", "reim(A::AbstractArray)"],
971
+ ["reinterpret", "function", "reinterpret(reshape, T, A::AbstractArray{S}) -> B"],
972
+ ["release", "function", "release(s::Semaphore)"],
973
+ ["relpath", "function", "relpath(path::AbstractString, startpath::AbstractString = \".\")::String"],
974
+ ["rem", "function", "rem(x, y, r::RoundingMode=RoundToZero)"],
975
+ ["rem2pi", "function", "rem2pi(x, r::RoundingMode)"],
976
+ ["remove_linenums!", "function", ""],
977
+ ["rename", "function", ""],
978
+ ["repeat", "function", "repeat(A::AbstractArray; inner=ntuple(Returns(1), ndims(A)), outer=ntuple(Returns(1), ndims(A)))"],
979
+ ["replace", "function", "replace([io::IO], s::AbstractString, pat=>r, [pat2=>r2, ...]; [count::Integer])"],
980
+ ["replace!", "function", "replace!(new::Union{Function, Type}, A; [count::Integer])"],
981
+ ["replaceproperty!", "function", ""],
982
+ ["repr", "function", "repr(x; context=nothing)"],
983
+ ["require_one_based_indexing", "function", "require_one_based_indexing(A::AbstractArray)"],
984
+ ["reset", "function", "reset(::Event)"],
985
+ ["reseteof", "function", "reseteof(io)"],
986
+ ["reshape", "function", "reshape(A, dims...)::AbstractArray"],
987
+ ["resize!", "function", "resize!(a::Vector, n::Integer) -> a"],
988
+ ["rest", "function", ""],
989
+ ["rethrow", "function", "rethrow()"],
990
+ ["retry", "function", "retry(f; delays=ExponentialBackOff(), check=nothing) -> Function"],
991
+ ["reverse", "function", "reverse(A; dims=:)"],
992
+ ["reverse!", "function", "reverse!(A; dims=:)"],
993
+ ["reverseind", "function", "reverseind(v, i)"],
994
+ ["rm", "function", "rm(path::AbstractString; force::Bool=false, recursive::Bool=false)"],
995
+ ["rot180", "function", "rot180(A, k)"],
996
+ ["rotl90", "function", "rotl90(A, k)"],
997
+ ["rotr90", "function", "rotr90(A, k)"],
998
+ ["round", "function", "round(z::Complex[, RoundingModeReal, [RoundingModeImaginary]])"],
999
+ ["rounding", "function", "rounding(T)"],
1000
+ ["rpad", "function", "rpad(s, n::Integer, p::Union{AbstractChar,AbstractString}=' ')::String"],
1001
+ ["rsplit", "function", "rsplit(s::AbstractString; limit::Integer=0, keepempty::Bool=false)"],
1002
+ ["rstrip", "function", "rstrip([pred=isspace,] str::AbstractString)::SubString"],
1003
+ ["rtruncate", "function", ""],
1004
+ ["run", "function", "run(command, args...; wait::Bool = true)"],
1005
+ ["runtests", "function", ""],
1006
+ ["samefile", "function", "samefile(path_a, path_b)"],
1007
+ ["schedule", "function", "schedule(t::Task, [val]; error=false)"],
1008
+ ["searchsorted", "function", "searchsorted(v, x; by=identity, lt=isless, rev=false)"],
1009
+ ["searchsortedfirst", "function", "searchsortedfirst(v, x; by=identity, lt=isless, rev=false)"],
1010
+ ["searchsortedlast", "function", "searchsortedlast(v, x; by=identity, lt=isless, rev=false)"],
1011
+ ["sec", "function", "sec(x::T) where {T <: Number} -> float(T)"],
1012
+ ["secd", "function", "secd(x::T) where {T <: Number} -> float(T)"],
1013
+ ["sech", "function", "sech(x::T) where {T <: Number} -> float(T)"],
1014
+ ["seek", "function", "seek(s, pos)"],
1015
+ ["seekend", "function", "seekend(s)"],
1016
+ ["seekstart", "function", "seekstart(s)"],
1017
+ ["selectdim", "function", "selectdim(A, d::Integer, i)"],
1018
+ ["set_zero_subnormals", "function", "set_zero_subnormals(yes::Bool)::Bool"],
1019
+ ["setcpuaffinity", "function", "setcpuaffinity(original_command::Cmd, cpus) -> command::Cmd"],
1020
+ ["setdiff", "function", "setdiff(s, itrs...)"],
1021
+ ["setdiff!", "function", "setdiff!(s, itrs...)"],
1022
+ ["setenv", "function", "setenv(command::Cmd, env; dir)"],
1023
+ ["setgid", "function", "setgid(original_command::Cmd, gid) -> command::Cmd"],
1024
+ ["setindex!", "function", "setindex!(A, X, inds...)"],
1025
+ ["setprecision", "function", "setprecision(f::Function, [T=BigFloat,] precision::Integer; base=2)"],
1026
+ ["setproperty!", "function", "setproperty!(value, name::Symbol, x)"],
1027
+ ["setpropertyonce!", "function", ""],
1028
+ ["setrounding", "function", "setrounding(f::Function, T, mode)"],
1029
+ ["setuid", "function", "setuid(original_command::Cmd, uid) -> command::Cmd"],
1030
+ ["shell_escape", "function", "shell_escape(args::Union{Cmd,AbstractString...}; special::AbstractString=\"\")"],
1031
+ ["shell_escape_csh", "function", "shell_escape_csh(args::Union{Cmd,AbstractString...})"],
1032
+ ["shell_escape_posixly", "function", "shell_escape_posixly(args::Union{Cmd,AbstractString...})"],
1033
+ ["shell_escape_wincmd", "function", "shell_escape_wincmd(s::AbstractString)"],
1034
+ ["shell_split", "function", "shell_split(command::AbstractString)"],
1035
+ ["show", "function", "show([io::IO = stdout], x)"],
1036
+ ["showable", "function", "showable(mime, x)"],
1037
+ ["showarg", "function", "showarg(io, parent(v), false)"],
1038
+ ["showerror", "function", "showerror(io, e)"],
1039
+ ["sign", "function", "sign(x)"],
1040
+ ["signbit", "function", "signbit(x)"],
1041
+ ["signed", "function", "signed(x)"],
1042
+ ["significand", "function", "significand(x)"],
1043
+ ["similar", "function", "similar(storagetype, axes)"],
1044
+ ["sin", "function", "sin(x::T) where {T <: Number} -> float(T)"],
1045
+ ["sinc", "function", "sinc(x::T) where {T <: Number} -> float(T)"],
1046
+ ["sincos", "function", "sincos(x::T) where T -> Tuple{float(T),float(T)}"],
1047
+ ["sincosd", "function", "sincosd(x::T) where T -> Tuple{float(T),float(T)}"],
1048
+ ["sincospi", "function", "sincospi(x::T) where T -> Tuple{float(T),float(T)}"],
1049
+ ["sind", "function", "sind(x::T) where T -> float(T)"],
1050
+ ["sinh", "function", "sinh(x)"],
1051
+ ["sinpi", "function", "sinpi(x::T) where T -> float(T)"],
1052
+ ["size", "function", "size(A::AbstractArray, [dim])"],
1053
+ ["sizehint!", "function", "sizehint!(s, n; first::Bool=false, shrink::Bool=true) -> s"],
1054
+ ["sizeof", "function", "sizeof(str::AbstractString)"],
1055
+ ["skip", "function", "skip(s, offset)"],
1056
+ ["skipchars", "function", "skipchars(predicate, io::IO; linecomment=nothing)"],
1057
+ ["skipmissing", "function", "skipmissing(itr)"],
1058
+ ["sleep", "function", "sleep(seconds)"],
1059
+ ["something", "function", "something(x...)"],
1060
+ ["sort", "function", "sort(v::NTuple; kws...)::NTuple"],
1061
+ ["sort!", "function", ""],
1062
+ ["sortperm", "function", ""],
1063
+ ["sortperm!", "function", ""],
1064
+ ["sortslices", "function", ""],
1065
+ ["splat", "function", "splat(f)"],
1066
+ ["splice!", "function", "splice!(a::Vector, indices, [replacement]) -> items"],
1067
+ ["split", "function", "split(str::AbstractString, dlm; limit::Integer=0, keepempty::Bool=true)"],
1068
+ ["split_rest", "function", ""],
1069
+ ["splitdir", "function", "splitdir(path::AbstractString) -> (dir::AbstractString, file::AbstractString)"],
1070
+ ["splitdrive", "function", "splitdrive(path::AbstractString) -> (drive::AbstractString, path::AbstractString)"],
1071
+ ["splitext", "function", "splitext(path::AbstractString) -> (path_without_extension::String, extension::String)"],
1072
+ ["splitpath", "function", "splitpath(path::AbstractString)::Vector{String}"],
1073
+ ["sprint", "function", "sprint(f::Function, args...; context=nothing, sizehint=0)"],
1074
+ ["sqrt", "function", "sqrt(x)"],
1075
+ ["stack", "function", "stack(f, args...; [dims])"],
1076
+ ["stacktrace", "function", "stacktrace([trace::Vector{Ptr{Cvoid}},] [c_funcs::Bool=false])::StackTrace"],
1077
+ ["startswith", "function", "startswith(s::AbstractString, prefix::Regex)"],
1078
+ ["stat", "function", "stat(path)"],
1079
+ ["stderr", "constant", ""],
1080
+ ["stdin", "constant", ""],
1081
+ ["stdout", "constant", ""],
1082
+ ["step", "function", "step(r)"],
1083
+ ["stride", "function", "stride(A, k::Integer)"],
1084
+ ["strides", "function", "strides(A)"],
1085
+ ["string", "function", "string(xs...)"],
1086
+ ["strip", "function", "strip([pred=isspace,] str::AbstractString)::SubString"],
1087
+ ["success", "function", "success(command)"],
1088
+ ["sum", "function", "sum(f, A::AbstractArray; dims)"],
1089
+ ["sum!", "function", "sum!(r, A)"],
1090
+ ["summary", "function", "summary(io::IO, x)"],
1091
+ ["summarysize", "function", ""],
1092
+ ["supertype", "function", "supertype(T::Union{DataType, UnionAll})"],
1093
+ ["swapproperty!", "function", "swapproperty!(x, f::Symbol, v, order::Symbol=:not_atomic)"],
1094
+ ["symdiff", "function", "symdiff(s, itrs...)"],
1095
+ ["symdiff!", "function", "symdiff!(s::Union{AbstractSet,AbstractVector}, itrs...)"],
1096
+ ["symlink", "function", "symlink(target::AbstractString, link::AbstractString; dir_target = false)"],
1097
+ ["systemerror", "function", "systemerror(sysfunc[, errno::Cint=Libc.errno()])"],
1098
+ ["tail", "function", "tail(x::Tuple)::Tuple"],
1099
+ ["take!", "function", "take!(c::Channel)"],
1100
+ ["takestring!", "function", "takestring!(io::IOBuffer)::String"],
1101
+ ["tan", "function", "tan(x::T) where {T <: Number} -> float(T)"],
1102
+ ["tand", "function", "tand(x::T) where T -> float(T)"],
1103
+ ["tanh", "function", "tanh(x)"],
1104
+ ["tanpi", "function", "tanpi(x::T) where T -> float(T)"],
1105
+ ["task_local_storage", "function", "task_local_storage(body, key, value)"],
1106
+ ["tempdir", "function", "tempdir()"],
1107
+ ["tempname", "function", "tempname(parent=tempdir(); cleanup=true, suffix=\"\")::String"],
1108
+ ["text_colors", "constant", ""],
1109
+ ["textwidth", "function", "textwidth(s::AbstractString)"],
1110
+ ["thisind", "function", "thisind(s::AbstractString, i::Integer)::Int"],
1111
+ ["time", "function", "time()::Float64"],
1112
+ ["time_ns", "function", "time_ns()::UInt64"],
1113
+ ["timedwait", "function", "timedwait(testcb, timeout::Real; pollint::Real=0.1)"],
1114
+ ["titlecase", "function", "titlecase(s::AbstractString; [wordsep::Function], strict::Bool=true)::String"],
1115
+ ["to_index", "function", "to_index(i)"],
1116
+ ["to_indices", "function", "to_indices(A, I::Tuple)"],
1117
+ ["touch", "function", "touch(path::AbstractString)"],
1118
+ ["trailing_ones", "function", "trailing_ones(x::Integer)::Integer"],
1119
+ ["trailing_zeros", "function", "trailing_zeros(x::Integer)::Integer"],
1120
+ ["transcode", "function", "transcode(T, src)"],
1121
+ ["transpose", "function", "transpose(A)"],
1122
+ ["trues", "function", "trues(dims)"],
1123
+ ["trunc", "function", "trunc([T,] x)"],
1124
+ ["truncate", "function", "truncate(file, n)"],
1125
+ ["trylock", "function", "trylock(lock) -> Success (Boolean)"],
1126
+ ["tryparse", "function", "tryparse(type, str; base)"],
1127
+ ["typeintersect", "function", "typeintersect(T::Type, S::Type)"],
1128
+ ["typejoin", "function", "typejoin(T, S, ...)"],
1129
+ ["typemax", "function", "typemax(T)"],
1130
+ ["typemin", "function", "typemin(T)"],
1131
+ ["uabs", "function", ""],
1132
+ ["unescape_string", "function", "unescape_string(str::AbstractString, keep = ())::AbstractString"],
1133
+ ["union", "function", "union(s, itrs...)"],
1134
+ ["union!", "function", "union!(s::Union{AbstractSet,AbstractVector}, itrs...)"],
1135
+ ["unique", "function", "unique(A::AbstractArray; dims::Int)"],
1136
+ ["unique!", "function", "unique!(A::AbstractVector)"],
1137
+ ["unlock", "function", "unlock(lock)"],
1138
+ ["unmark", "function", "unmark(s::IO)"],
1139
+ ["unsafe_convert", "function", "unsafe_convert(T, x)"],
1140
+ ["unsafe_copyto!", "function", "unsafe_copyto!(dest::Array, doffs, src::Array, soffs, n)"],
1141
+ ["unsafe_load", "function", "unsafe_load(p::Ptr{T}, i::Integer=1)"],
1142
+ ["unsafe_modify!", "function", "unsafe_modify!(p::Ptr{T}, op, x, [order::Symbol])::Pair"],
1143
+ ["unsafe_pointer_to_objref", "function", "unsafe_pointer_to_objref(p::Ptr)"],
1144
+ ["unsafe_read", "function", "unsafe_read(io::IO, ref, nbytes::UInt)"],
1145
+ ["unsafe_replace!", "function", "unsafe_replace!(p::Ptr{T}, expected, desired,"],
1146
+ ["unsafe_store!", "function", "unsafe_store!(p::Ptr{T}, x, i::Integer=1)"],
1147
+ ["unsafe_string", "function", "unsafe_string(p::Ptr{T}, [length::Integer]) where {T<:Union{UInt16,UInt32,Cwchar_t}}"],
1148
+ ["unsafe_swap!", "function", "unsafe_swap!(p::Ptr{T}, x, [order::Symbol])"],
1149
+ ["unsafe_trunc", "function", "unsafe_trunc(T, x)"],
1150
+ ["unsafe_wrap", "function", "unsafe_wrap(Array, pointer::Ptr{T}, dims; own = false)"],
1151
+ ["unsafe_write", "function", "unsafe_write(io::IO, ref, nbytes::UInt)"],
1152
+ ["unsigned", "function", "unsigned(x)"],
1153
+ ["uperm", "function", "uperm(path)"],
1154
+ ["uppercase", "function", "uppercase(s::AbstractString)"],
1155
+ ["uppercasefirst", "function", "uppercasefirst(s::AbstractString)::String"],
1156
+ ["valtype", "function", "valtype(type)"],
1157
+ ["values", "function", "values(a::AbstractDict)"],
1158
+ ["vcat", "function", "vcat(A...)"],
1159
+ ["vec", "function", "vec(a::AbstractArray)::AbstractVector"],
1160
+ ["vect", "function", "vect(X...)"],
1161
+ ["view", "function", "view(A, inds...)"],
1162
+ ["wait", "function", "wait(t::Task; throw=true)"],
1163
+ ["waitall", "function", "waitall(tasks; failfast=true, throw=true) -> (done_tasks, remaining_tasks)"],
1164
+ ["waitany", "function", "waitany(tasks; throw=true) -> (done_tasks, remaining_tasks)"],
1165
+ ["walkdir", "function", "walkdir(dir = pwd(); topdown=true, follow_symlinks=false, onerror=throw)"],
1166
+ ["which", "function", "which(module, symbol)"],
1167
+ ["widemul", "function", "widemul(x, y)"],
1168
+ ["widen", "function", "widen(x)"],
1169
+ ["windowserror", "function", "windowserror(sysfunc[, code::UInt32=Libc.GetLastError()])"],
1170
+ ["withenv", "function", "withenv(f, kv::Pair...)"],
1171
+ ["write", "function", "write(filename::AbstractString, content)"],
1172
+ ["xor", "function", "xor(x, y)"],
1173
+ ["yield", "function", "yield(t::Task, arg = nothing)"],
1174
+ ["yieldto", "function", "yieldto(t::Task, arg = nothing)"],
1175
+ ["zero", "function", "zero(x)"],
1176
+ ["zeros", "function", "zeros([T=Float64,] dims::Tuple)"],
1177
+ ["zip", "function", "zip(iters...)"],
1178
+ ["π", "constant", ""],
1179
+ ["ℯ", "constant", ""],
1180
+ ];
1181
+ // The names each standard library exports, offered once the file has `using <Library>`.
1182
+ const stdlibNames = {
1183
+ Dates: [
1184
+ ["@dateformat_str", "macro", ""],
1185
+ ["Apr", "constant", ""],
1186
+ ["April", "constant", ""],
1187
+ ["Aug", "constant", ""],
1188
+ ["August", "constant", ""],
1189
+ ["Date", "type", "Date(y, [m, d])::Date"],
1190
+ ["DateFormat", "type", "DateFormat(format::AbstractString, locale=\"english\")"],
1191
+ ["DatePeriod", "type", ""],
1192
+ ["DateTime", "type", "DateTime(y, [m, d, h, mi, s, ms])::DateTime"],
1193
+ ["Day", "type", "Day(dt::Date)"],
1194
+ ["Dec", "constant", ""],
1195
+ ["December", "constant", ""],
1196
+ ["Feb", "constant", ""],
1197
+ ["February", "constant", ""],
1198
+ ["Fri", "constant", ""],
1199
+ ["Friday", "constant", ""],
1200
+ ["Hour", "type", "Hour(dt::Time)"],
1201
+ ["ISODateFormat", "constant", ""],
1202
+ ["ISODateTimeFormat", "constant", ""],
1203
+ ["ISOTimeFormat", "constant", ""],
1204
+ ["Jan", "constant", ""],
1205
+ ["January", "constant", ""],
1206
+ ["Jul", "constant", ""],
1207
+ ["July", "constant", ""],
1208
+ ["Jun", "constant", ""],
1209
+ ["June", "constant", ""],
1210
+ ["Mar", "constant", ""],
1211
+ ["March", "constant", ""],
1212
+ ["May", "constant", ""],
1213
+ ["Microsecond", "type", "Microsecond(dt::Time)"],
1214
+ ["Millisecond", "type", "Millisecond(dt::Time)"],
1215
+ ["Minute", "type", "Minute(dt::Time)"],
1216
+ ["Mon", "constant", ""],
1217
+ ["Monday", "constant", ""],
1218
+ ["Month", "type", "Month(dt::Date)"],
1219
+ ["Nanosecond", "type", "Nanosecond(dt::Time)"],
1220
+ ["Nov", "constant", ""],
1221
+ ["November", "constant", ""],
1222
+ ["Oct", "constant", ""],
1223
+ ["October", "constant", ""],
1224
+ ["Period", "type", ""],
1225
+ ["Quarter", "type", "Quarter(dt::Date)"],
1226
+ ["RFC1123Format", "constant", ""],
1227
+ ["Sat", "constant", ""],
1228
+ ["Saturday", "constant", ""],
1229
+ ["Second", "type", "Second(dt::Time)"],
1230
+ ["Sep", "constant", ""],
1231
+ ["September", "constant", ""],
1232
+ ["Sun", "constant", ""],
1233
+ ["Sunday", "constant", ""],
1234
+ ["Thu", "constant", ""],
1235
+ ["Thursday", "constant", ""],
1236
+ ["Time", "type", "Time(h, [mi, s, ms, us, ns])::Time"],
1237
+ ["TimePeriod", "type", ""],
1238
+ ["TimeType", "type", ""],
1239
+ ["TimeZone", "type", ""],
1240
+ ["Tue", "constant", ""],
1241
+ ["Tuesday", "constant", ""],
1242
+ ["UTC", "type", ""],
1243
+ ["Wed", "constant", ""],
1244
+ ["Wednesday", "constant", ""],
1245
+ ["Week", "type", "Week(dt::Date)"],
1246
+ ["Year", "type", "Year(dt::Date)"],
1247
+ ["canonicalize", "function", "canonicalize(::CompoundPeriod)::CompoundPeriod"],
1248
+ ["datetime2julian", "function", "datetime2julian(dt::DateTime)::Float64"],
1249
+ ["datetime2rata", "function", "datetime2rata(dt::TimeType)::Int64"],
1250
+ ["datetime2unix", "function", "datetime2unix(dt::DateTime)::Float64"],
1251
+ ["day", "function", "day(dt::TimeType)::Int64"],
1252
+ ["dayabbr", "function", "dayabbr(dt::TimeType; locale=\"english\")::String"],
1253
+ ["dayname", "function", "dayname(dt::TimeType; locale=\"english\")::String"],
1254
+ ["dayofmonth", "function", "dayofmonth(dt::TimeType)::Int64"],
1255
+ ["dayofquarter", "function", "dayofquarter(dt::TimeType)::Int"],
1256
+ ["dayofweek", "function", "dayofweek(dt::TimeType)::Int64"],
1257
+ ["dayofweekofmonth", "function", "dayofweekofmonth(dt::TimeType)::Int"],
1258
+ ["dayofyear", "function", "dayofyear(dt::TimeType)::Int"],
1259
+ ["daysinmonth", "function", "daysinmonth(dt::TimeType)::Int"],
1260
+ ["daysinyear", "function", "daysinyear(dt::TimeType)::Int"],
1261
+ ["daysofweekinmonth", "function", "daysofweekinmonth(dt::TimeType)::Int"],
1262
+ ["firstdayofmonth", "function", "firstdayofmonth(dt::TimeType)::TimeType"],
1263
+ ["firstdayofquarter", "function", "firstdayofquarter(dt::TimeType)::TimeType"],
1264
+ ["firstdayofweek", "function", "firstdayofweek(dt::TimeType)::TimeType"],
1265
+ ["firstdayofyear", "function", "firstdayofyear(dt::TimeType)::TimeType"],
1266
+ ["format", "function", "format(io::IO, tok::AbstractDateToken, dt::TimeType, locale)"],
1267
+ ["hour", "function", "hour(dt::DateTime)::Int64"],
1268
+ ["isleapyear", "function", "isleapyear(dt::TimeType)::Bool"],
1269
+ ["isoweekdate", "function", ""],
1270
+ ["isoyear", "function", ""],
1271
+ ["julian2datetime", "function", "julian2datetime(julian_days)::DateTime"],
1272
+ ["lastdayofmonth", "function", "lastdayofmonth(dt::TimeType)::TimeType"],
1273
+ ["lastdayofquarter", "function", "lastdayofquarter(dt::TimeType)::TimeType"],
1274
+ ["lastdayofweek", "function", "lastdayofweek(dt::TimeType)::TimeType"],
1275
+ ["lastdayofyear", "function", "lastdayofyear(dt::TimeType)::TimeType"],
1276
+ ["microsecond", "function", "microsecond(t::Time)::Int64"],
1277
+ ["millisecond", "function", "millisecond(dt::DateTime)::Int64"],
1278
+ ["minute", "function", "minute(dt::DateTime)::Int64"],
1279
+ ["month", "function", "month(dt::TimeType)::Int64"],
1280
+ ["monthabbr", "function", "monthabbr(dt::TimeType; locale=\"english\")::String"],
1281
+ ["monthday", "function", "monthday(dt::TimeType) -> (Int64, Int64)"],
1282
+ ["monthname", "function", "monthname(dt::TimeType; locale=\"english\")::String"],
1283
+ ["nanosecond", "function", "nanosecond(t::Time)::Int64"],
1284
+ ["now", "function", "now()::DateTime"],
1285
+ ["quarterofyear", "function", "quarterofyear(dt::TimeType)::Int"],
1286
+ ["rata2datetime", "function", "rata2datetime(days)::DateTime"],
1287
+ ["second", "function", "second(dt::DateTime)::Int64"],
1288
+ ["today", "function", "today()::Date"],
1289
+ ["tofirst", "function", "tofirst(dt::TimeType, dow::Int; of=Month)::TimeType"],
1290
+ ["tolast", "function", "tolast(dt::TimeType, dow::Int; of=Month)::TimeType"],
1291
+ ["tonext", "function", "tonext(dt::TimeType, dow::Int; same::Bool=false)::TimeType"],
1292
+ ["toprev", "function", "toprev(dt::TimeType, dow::Int; same::Bool=false)::TimeType"],
1293
+ ["unix2datetime", "function", "unix2datetime(x)::DateTime"],
1294
+ ["week", "function", "week(dt::TimeType)::Int64"],
1295
+ ["weeksinyear", "function", ""],
1296
+ ["year", "function", "year(dt::TimeType)::Int64"],
1297
+ ["yearmonth", "function", "yearmonth(dt::TimeType) -> (Int64, Int64)"],
1298
+ ["yearmonthday", "function", "yearmonthday(dt::TimeType) -> (Int64, Int64, Int64)"],
1299
+ ],
1300
+ Printf: [
1301
+ ["@printf", "macro", "@printf([io::IO], \"%Fmt\", args...)"],
1302
+ ["@sprintf", "macro", "@sprintf(\"%Fmt\", args...)"],
1303
+ ["Format", "type", ""],
1304
+ ["format", "function", ""],
1305
+ ],
1306
+ Random: [
1307
+ ["AbstractRNG", "type", ""],
1308
+ ["MersenneTwister", "type", "MersenneTwister(seed)"],
1309
+ ["RandomDevice", "type", "RandomDevice()"],
1310
+ ["Sampler", "type", "Sampler(rng, x, repetition = Val(Inf))"],
1311
+ ["SamplerSimple", "type", "SamplerSimple(x, data)"],
1312
+ ["SamplerTrivial", "type", "SamplerTrivial(x)"],
1313
+ ["SamplerType", "type", "SamplerType{T}()"],
1314
+ ["TaskLocalRNG", "type", ""],
1315
+ ["Xoshiro", "type", "Xoshiro(seed::Union{Integer, AbstractString})"],
1316
+ ["bitrand", "function", "bitrand([rng=default_rng()], [dims...])"],
1317
+ ["default_rng", "function", ""],
1318
+ ["rand!", "function", "rand!([rng=default_rng()], A, [S=eltype(A)])"],
1319
+ ["randcycle", "function", "randcycle([rng=default_rng(),] n::Integer)"],
1320
+ ["randcycle!", "function", "randcycle!([rng=default_rng(),] A::AbstractArray{<:Integer})"],
1321
+ ["randexp", "function", "randexp([rng=default_rng()], [T=Float64], [dims...])"],
1322
+ ["randexp!", "function", "randexp!([rng=default_rng()], A::AbstractArray) -> A"],
1323
+ ["randn!", "function", "randn!([rng=default_rng()], A::AbstractArray) -> A"],
1324
+ ["randperm", "function", "randperm([rng=default_rng(),] n::Integer)"],
1325
+ ["randperm!", "function", "randperm!([rng=default_rng(),] A::AbstractArray{<:Integer})"],
1326
+ ["randstring", "function", "randstring([rng=default_rng()], [chars], [len=8])"],
1327
+ ["randsubseq", "function", "randsubseq([rng=default_rng(),] A, p) -> Vector"],
1328
+ ["randsubseq!", "function", "randsubseq!([rng=default_rng(),] S, A, p)"],
1329
+ ["seed!", "function", "seed!([rng=default_rng()], seed) -> rng"],
1330
+ ["shuffle", "function", "shuffle([rng=default_rng(),] v::Union{NTuple,AbstractArray})"],
1331
+ ["shuffle!", "function", "shuffle!([rng=default_rng(),] v::AbstractArray)"],
1332
+ ],
1333
+ Statistics: [
1334
+ ["cor", "function", "cor(x::AbstractVector)"],
1335
+ ["cov", "function", "cov(x::AbstractVector; corrected::Bool=true)"],
1336
+ ["mean", "function", "mean(itr)"],
1337
+ ["mean!", "function", "mean!(r, v)"],
1338
+ ["median", "function", "median(itr)"],
1339
+ ["median!", "function", "median!(v)"],
1340
+ ["middle", "function", "middle(x)"],
1341
+ ["quantile", "function", "quantile(itr, p; sorted=false, alpha::Real=1.0, beta::Real=alpha)"],
1342
+ ["quantile!", "function", ""],
1343
+ ["std", "function", "std(itr; corrected::Bool=true, mean=nothing[, dims])"],
1344
+ ["stdm", "function", "stdm(itr, mean; corrected::Bool=true[, dims])"],
1345
+ ["var", "function", "var(itr; corrected::Bool=true, mean=nothing[, dims])"],
1346
+ ["varm", "function", "varm(itr, mean; dims, corrected::Bool=true)"],
1347
+ ],
1348
+ LinearAlgebra: [
1349
+ ["AbstractTriangular", "type", ""],
1350
+ ["Adjoint", "type", ""],
1351
+ ["BLAS", "namespace", ""],
1352
+ ["Bidiagonal", "type", "Bidiagonal(dv::V, ev::V, uplo::Symbol) where V <: AbstractVector"],
1353
+ ["BunchKaufman", "type", "BunchKaufman{Float64, Matrix{Float64}, Vector{Int64}}"],
1354
+ ["Cholesky", "type", "Cholesky{Float64, Matrix{Float64}}"],
1355
+ ["CholeskyPivoted", "type", "CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}"],
1356
+ ["ColumnNorm", "type", ""],
1357
+ ["Diagonal", "type", "Diagonal(V::AbstractVector)"],
1358
+ ["Eigen", "type", "Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}}"],
1359
+ ["Factorization", "type", ""],
1360
+ ["GeneralizedEigen", "type", "GeneralizedEigen{ComplexF64, ComplexF64, Matrix{ComplexF64}, Vector{ComplexF64}}"],
1361
+ ["GeneralizedSVD", "type", "GeneralizedSVD{Float64, Matrix{Float64}, Float64, Vector{Float64}}"],
1362
+ ["GeneralizedSchur", "type", ""],
1363
+ ["Givens", "type", ""],
1364
+ ["Hermitian", "type", "Hermitian(A::AbstractMatrix, uplo::Symbol=:U)"],
1365
+ ["Hessenberg", "type", ""],
1366
+ ["I", "constant", ""],
1367
+ ["LAPACK", "namespace", ""],
1368
+ ["LAPACKException", "type", ""],
1369
+ ["LDLt", "type", "LDLt{Float64, SymTridiagonal{Float64, Vector{Float64}}}"],
1370
+ ["LQ", "type", "LQ{Float64, Matrix{Float64}, Vector{Float64}}"],
1371
+ ["LU", "type", "LU{Float64, Matrix{Float64}, Vector{Int64}}"],
1372
+ ["LowerTriangular", "type", "LowerTriangular(A::AbstractMatrix)"],
1373
+ ["NoPivot", "type", ""],
1374
+ ["PosDefException", "type", ""],
1375
+ ["QR", "type", ""],
1376
+ ["QRPivoted", "type", ""],
1377
+ ["RankDeficientException", "type", ""],
1378
+ ["RowMaximum", "type", ""],
1379
+ ["RowNonZero", "type", ""],
1380
+ ["SVD", "type", "SVD{Float64, Float64, Matrix{Float64}, Vector{Float64}}"],
1381
+ ["Schur", "type", "Schur{Float64, Matrix{Float64}, Vector{Float64}}"],
1382
+ ["SingularException", "type", ""],
1383
+ ["SymTridiagonal", "type", "SymTridiagonal(dv::V, ev::V) where V <: AbstractVector"],
1384
+ ["Symmetric", "type", "Symmetric(A::AbstractMatrix, uplo::Symbol=:U)"],
1385
+ ["Transpose", "type", ""],
1386
+ ["Tridiagonal", "type", "Tridiagonal(dl::V, d::V, du::V) where V <: AbstractVector"],
1387
+ ["UniformScaling", "type", "UniformScaling{T<:Number}"],
1388
+ ["UnitLowerTriangular", "type", "UnitLowerTriangular(A::AbstractMatrix)"],
1389
+ ["UnitUpperTriangular", "type", "UnitUpperTriangular(A::AbstractMatrix)"],
1390
+ ["UpperHessenberg", "type", "UpperHessenberg(A::AbstractMatrix)"],
1391
+ ["UpperTriangular", "type", "UpperTriangular(A::AbstractMatrix)"],
1392
+ ["ZeroPivotException", "type", ""],
1393
+ ["adjoint!", "function", "adjoint!(dest,src)"],
1394
+ ["axpby!", "function", "axpby!(α, x::AbstractArray, β, y::AbstractArray)"],
1395
+ ["axpy!", "function", "axpy!(α, x::AbstractArray, y::AbstractArray)"],
1396
+ ["bunchkaufman", "function", "bunchkaufman(A, rook::Bool=false; check = true) -> S::BunchKaufman"],
1397
+ ["bunchkaufman!", "function", "bunchkaufman!(A, rook::Bool=false; check = true) -> BunchKaufman"],
1398
+ ["checksquare", "function", ""],
1399
+ ["cholesky", "function", "cholesky(A, NoPivot(); check = true) -> Cholesky"],
1400
+ ["cholesky!", "function", "cholesky!(A::AbstractMatrix, NoPivot(); check = true) -> Cholesky"],
1401
+ ["cond", "function", "cond(M, p::Real=2)"],
1402
+ ["condskeel", "function", "condskeel(M, [x, p::Real=Inf])"],
1403
+ ["convert", "function", "convert(T, x)"],
1404
+ ["copy_adjoint!", "function", "copy_adjoint!(B::AbstractVecOrMat, ir_dest::AbstractRange{Int}, jr_dest::AbstractRange{Int},"],
1405
+ ["copy_transpose!", "function", "copy_transpose!(B::AbstractVecOrMat, ir_dest::AbstractRange{Int}, jr_dest::AbstractRange{Int},"],
1406
+ ["copytrito!", "function", "copytrito!(B, A, uplo) -> B"],
1407
+ ["cross", "function", "cross(x, y)"],
1408
+ ["det", "function", "det(M)"],
1409
+ ["diag", "function", "diag(M, k::Integer=0)"],
1410
+ ["diagind", "function", "diagind(M::AbstractMatrix, k::Integer = 0, indstyle::IndexStyle = IndexLinear())"],
1411
+ ["diagm", "function", "diagm(kv::Pair{<:Integer,<:AbstractVector}...)"],
1412
+ ["diagview", "function", "diagview(M, k::Integer=0)"],
1413
+ ["dot", "function", "dot(x, y)"],
1414
+ ["eigen", "function", "eigen(A; permute::Bool=true, scale::Bool=true, sortby) -> Eigen"],
1415
+ ["eigen!", "function", "eigen!(A; permute, scale, sortby)"],
1416
+ ["eigmax", "function", "eigmax(A; permute::Bool=true, scale::Bool=true)"],
1417
+ ["eigmin", "function", "eigmin(A; permute::Bool=true, scale::Bool=true)"],
1418
+ ["eigvals", "function", "eigvals(A; permute::Bool=true, scale::Bool=true, sortby) -> values"],
1419
+ ["eigvals!", "function", "eigvals!(A; permute::Bool=true, scale::Bool=true, sortby) -> values"],
1420
+ ["eigvecs", "function", "eigvecs(A::Union{Symmetric, Hermitian, SymTridiagonal}[, eigvals])::Matrix"],
1421
+ ["factorize", "function", "factorize(A)"],
1422
+ ["fillband!", "function", "fillband!(A::AbstractMatrix, x, l, u)"],
1423
+ ["fillstored!", "function", "fillstored!(A::AbstractMatrix, x)"],
1424
+ ["givens", "function", "givens(f::T, g::T, i1::Integer, i2::Integer) where {T} -> (G::Givens, r::T)"],
1425
+ ["haszero", "function", "haszero(T::Type)"],
1426
+ ["hermitian", "function", "hermitian(A, uplo::Symbol=:U)"],
1427
+ ["hermitian_type", "function", "hermitian_type(T::Type)"],
1428
+ ["hermitianpart", "function", "hermitianpart(A::AbstractMatrix, uplo::Symbol=:U) -> Hermitian"],
1429
+ ["hermitianpart!", "function", "hermitianpart!(A::AbstractMatrix, uplo::Symbol=:U) -> Hermitian"],
1430
+ ["hessenberg", "function", "hessenberg(A) -> Hessenberg"],
1431
+ ["hessenberg!", "function", "hessenberg!(A) -> Hessenberg"],
1432
+ ["inertia", "function", ""],
1433
+ ["isbanded", "function", "isbanded(A::AbstractMatrix, kl::Integer, ku::Integer) -> Bool"],
1434
+ ["isdiag", "function", "isdiag(A) -> Bool"],
1435
+ ["ishermitian", "function", "ishermitian(A) -> Bool"],
1436
+ ["isposdef", "function", "isposdef(A) -> Bool"],
1437
+ ["isposdef!", "function", "isposdef!(A) -> Bool"],
1438
+ ["issuccess", "function", "issuccess(F::Factorization)"],
1439
+ ["issymmetric", "function", "issymmetric(A) -> Bool"],
1440
+ ["istril", "function", "istril(A::AbstractMatrix, k::Integer = 0) -> Bool"],
1441
+ ["istriu", "function", "istriu(A::AbstractMatrix, k::Integer = 0) -> Bool"],
1442
+ ["ldiv!", "function", "ldiv!(Y, A, B) -> Y"],
1443
+ ["ldlt", "function", "ldlt(S::SymTridiagonal) -> LDLt"],
1444
+ ["ldlt!", "function", "ldlt!(S::SymTridiagonal) -> LDLt"],
1445
+ ["lmul!", "function", "lmul!(a::Number, B::AbstractArray)"],
1446
+ ["logabsdet", "function", "logabsdet(M)"],
1447
+ ["logdet", "function", "logdet(M)"],
1448
+ ["lowrankdowndate", "function", "lowrankdowndate(C::Cholesky, v::AbstractVector) -> CC::Cholesky"],
1449
+ ["lowrankdowndate!", "function", "lowrankdowndate!(C::Cholesky, v::AbstractVector) -> CC::Cholesky"],
1450
+ ["lowrankupdate", "function", "lowrankupdate(C::Cholesky, v::AbstractVector) -> CC::Cholesky"],
1451
+ ["lowrankupdate!", "function", "lowrankupdate!(C::Cholesky, v::AbstractVector) -> CC::Cholesky"],
1452
+ ["lq", "function", "lq(A) -> S::LQ"],
1453
+ ["lq!", "function", "lq!(A) -> LQ"],
1454
+ ["lu", "function", "lu(A, pivot = RowMaximum(); check = true, allowsingular = false) -> F::LU"],
1455
+ ["lu!", "function", "lu!(F::LU, pivot = RowMaximum(); check = true, allowsingular = false) -> LU"],
1456
+ ["lyap", "function", "lyap(A, C)"],
1457
+ ["matprod_dest", "function", "matprod_dest(A, B, T)"],
1458
+ ["mul!", "function", "mul!(Y, A, B) -> Y"],
1459
+ ["norm", "function", "norm(A, p::Real=2)"],
1460
+ ["normalize", "function", "normalize(a, p::Real=2)"],
1461
+ ["normalize!", "function", "normalize!(a::AbstractArray, p::Real=2)"],
1462
+ ["nullspace", "function", "nullspace(M; atol::Real=0, rtol::Real=atol>0 ? 0 : n*ϵ)"],
1463
+ ["opnorm", "function", "opnorm(A::AbstractMatrix, p::Real=2)"],
1464
+ ["ordschur", "function", "ordschur(F::Schur, select::Union{Vector{Bool},BitVector}) -> F::Schur"],
1465
+ ["ordschur!", "function", "ordschur!(F::Schur, select::Union{Vector{Bool},BitVector}) -> F::Schur"],
1466
+ ["peakflops", "function", ""],
1467
+ ["pinv", "function", "pinv(M; atol::Real=0, rtol::Real=atol>0 ? 0 : n*ϵ)"],
1468
+ ["qr", "function", "qr(A, pivot = NoPivot(); blocksize) -> F"],
1469
+ ["qr!", "function", "qr!(A, pivot = NoPivot(); blocksize)"],
1470
+ ["rank", "function", "rank(A::AbstractMatrix; atol::Real=0, rtol::Real=atol>0 ? 0 : n*ϵ)"],
1471
+ ["rdiv!", "function", "rdiv!(A, B)"],
1472
+ ["reflect!", "function", "reflect!(x, y, c, s)"],
1473
+ ["rmul!", "function", "rmul!(A::AbstractArray, b::Number)"],
1474
+ ["rotate!", "function", "rotate!(x, y, c, s)"],
1475
+ ["schur", "function", "schur(A) -> F::Schur"],
1476
+ ["schur!", "function", "schur!(A) -> F::Schur"],
1477
+ ["svd", "function", "svd(A; full::Bool = false, alg::Algorithm = default_svd_alg(A), atol::Real=0, rtol::Real=0) -> SVD"],
1478
+ ["svd!", "function", "svd!(A; full::Bool = false, alg::Algorithm = default_svd_alg(A), atol::Real=0, rtol::Real=0) -> SVD"],
1479
+ ["svdvals", "function", "svdvals(A)"],
1480
+ ["svdvals!", "function", "svdvals!(A)"],
1481
+ ["sylvester", "function", "sylvester(A, B, C)"],
1482
+ ["symmetric", "function", "symmetric(A, uplo::Symbol=:U)"],
1483
+ ["symmetric_type", "function", "symmetric_type(T::Type)"],
1484
+ ["tr", "function", "tr(M)"],
1485
+ ["transpose!", "function", "transpose!(dest,src)"],
1486
+ ["tril", "function", "tril(M, k::Integer = 0)"],
1487
+ ["tril!", "function", "tril!(M)"],
1488
+ ["triu", "function", "triu(M, k::Integer = 0)"],
1489
+ ["triu!", "function", "triu!(M)"],
1490
+ ["uplo", "function", ""],
1491
+ ["zeroslike", "function", "zeroslike(::Type{M}, sz::Tuple{Integer, Vararg{Integer}}) where {M<:AbstractMatrix}"],
1492
+ ],
1493
+ Unicode: [
1494
+ ["graphemes", "function", "graphemes(s::AbstractString)::GraphemeIterator"],
1495
+ ["isequal_normalized", "function", ""],
1496
+ ["normalize", "function", ""],
1497
+ ],
1498
+ Test: [
1499
+ ["@inferred", "macro", "@inferred [AllowedType] f(x)"],
1500
+ ["@test", "macro", "@test ex"],
1501
+ ["@test_broken", "macro", "@test_broken ex"],
1502
+ ["@test_deprecated", "macro", "@test_deprecated [pattern] expression"],
1503
+ ["@test_logs", "macro", "@test_logs [log_patterns...] [keywords] expression"],
1504
+ ["@test_nowarn", "macro", "@test_nowarn expr"],
1505
+ ["@test_skip", "macro", "@test_skip ex"],
1506
+ ["@test_throws", "macro", "@test_throws exception expr"],
1507
+ ["@test_warn", "macro", "@test_warn msg expr"],
1508
+ ["@testset", "macro", "@testset [CustomTestSet] [options...] [\"description\"] begin test_ex end"],
1509
+ ["GenericArray", "type", ""],
1510
+ ["GenericDict", "type", ""],
1511
+ ["GenericOrder", "type", ""],
1512
+ ["GenericSet", "type", ""],
1513
+ ["GenericString", "type", ""],
1514
+ ["LogRecord", "type", ""],
1515
+ ["TestLogger", "type", "TestLogger(; min_level=Info, catch_exceptions=false)"],
1516
+ ["TestSetException", "type", ""],
1517
+ ["detect_ambiguities", "function", "detect_ambiguities(mod1, mod2...; recursive=false,"],
1518
+ ["detect_unbound_args", "function", "detect_unbound_args(mod1, mod2...; recursive=false, allowed_undefineds=nothing)"],
1519
+ ],
1520
+ };
1521
+
1522
+ // KEYWORDS
1523
+ const keywordList = [
1524
+ "baremodule", "begin", "break", "catch", "const", "continue",
1525
+ "do", "else", "elseif", "end", "export", "false", "finally", "for", "function",
1526
+ "global", "if", "import", "in", "isa", "let", "local", "macro", "module",
1527
+ "nothing", "primitive type", "public", "quote", "return",
1528
+ "struct", "true", "try", "using", "where", "while",
1529
+ ];
1530
+ const keywords = keywordList.map((label) => ({ label, type: "keyword" }));
1531
+ // SNIPPETS
1532
+ const snippets = [
1533
+ autocomplete.snippetCompletion("function ${name}(${params})\n\t${}\nend", {
1534
+ label: "function",
1535
+ detail: "definition",
1536
+ type: "keyword",
1537
+ }),
1538
+ autocomplete.snippetCompletion("${name}(${params}) = ${body}", {
1539
+ label: "f(x) =",
1540
+ detail: "short function definition",
1541
+ type: "keyword",
1542
+ }),
1543
+ autocomplete.snippetCompletion("struct ${Name}\n\t${field}\nend", {
1544
+ label: "struct",
1545
+ detail: "definition",
1546
+ type: "keyword",
1547
+ }),
1548
+ autocomplete.snippetCompletion("mutable struct ${Name}\n\t${field}\nend", {
1549
+ label: "mutable struct",
1550
+ detail: "definition",
1551
+ type: "keyword",
1552
+ }),
1553
+ autocomplete.snippetCompletion("abstract type ${Name} end", {
1554
+ label: "abstract type",
1555
+ detail: "definition",
1556
+ type: "keyword",
1557
+ }),
1558
+ autocomplete.snippetCompletion("module ${Name}\n\n${}\n\nend", {
1559
+ label: "module",
1560
+ detail: "definition",
1561
+ type: "keyword",
1562
+ }),
1563
+ autocomplete.snippetCompletion("macro ${name}(${params})\n\t${}\nend", {
1564
+ label: "macro",
1565
+ detail: "definition",
1566
+ type: "keyword",
1567
+ }),
1568
+ autocomplete.snippetCompletion("if ${condition}\n\t${}\nend", {
1569
+ label: "if",
1570
+ detail: "block",
1571
+ type: "keyword",
1572
+ }),
1573
+ autocomplete.snippetCompletion("if ${condition}\n\t${}\nelse\n\t${}\nend", {
1574
+ label: "if",
1575
+ detail: "/ else block",
1576
+ type: "keyword",
1577
+ }),
1578
+ autocomplete.snippetCompletion("if ${condition}\n\t${}\nelseif ${condition}\n\t${}\nelse\n\t${}\nend", {
1579
+ label: "if",
1580
+ detail: "/ elseif / else block",
1581
+ type: "keyword",
1582
+ }),
1583
+ autocomplete.snippetCompletion("for ${item} in ${collection}\n\t${}\nend", {
1584
+ label: "for",
1585
+ detail: "loop",
1586
+ type: "keyword",
1587
+ }),
1588
+ autocomplete.snippetCompletion("for (${i}, ${item}) in enumerate(${collection})\n\t${}\nend", {
1589
+ label: "for",
1590
+ detail: "enumerate loop",
1591
+ type: "keyword",
1592
+ }),
1593
+ autocomplete.snippetCompletion("while ${condition}\n\t${}\nend", {
1594
+ label: "while",
1595
+ detail: "loop",
1596
+ type: "keyword",
1597
+ }),
1598
+ autocomplete.snippetCompletion("let ${name} = ${value}\n\t${}\nend", {
1599
+ label: "let",
1600
+ detail: "block",
1601
+ type: "keyword",
1602
+ }),
1603
+ autocomplete.snippetCompletion("do ${x}\n\t${}\nend", {
1604
+ label: "do",
1605
+ detail: "block",
1606
+ type: "keyword",
1607
+ }),
1608
+ autocomplete.snippetCompletion("begin\n\t${}\nend", {
1609
+ label: "begin",
1610
+ detail: "block",
1611
+ type: "keyword",
1612
+ }),
1613
+ autocomplete.snippetCompletion("try\n\t${}\ncatch ${e}\n\t${}\nend", {
1614
+ label: "try",
1615
+ detail: "/ catch block",
1616
+ type: "keyword",
1617
+ }),
1618
+ autocomplete.snippetCompletion("[${x} for ${x} in ${collection}]", {
1619
+ label: "[for]",
1620
+ detail: "comprehension",
1621
+ type: "keyword",
1622
+ }),
1623
+ ];
1624
+ // BUILT-IN NAMES
1625
+ const kindToType = {
1626
+ function: "function",
1627
+ macro: "function",
1628
+ type: "type",
1629
+ namespace: "namespace",
1630
+ constant: "constant",
1631
+ };
1632
+ function toCompletions(entries) {
1633
+ return entries.map(([label, kind, signature]) => {
1634
+ let option = { label, type: kindToType[kind] || "variable" };
1635
+ if (signature)
1636
+ option.detail = signature.slice(label.length);
1637
+ return option;
1638
+ });
1639
+ }
1640
+ const builtins = toCompletions(baseNames);
1641
+ const stdlibCompletions = {};
1642
+ function stdlib(name) {
1643
+ if (!(name in stdlibNames))
1644
+ return undefined;
1645
+ return (stdlibCompletions[name] || (stdlibCompletions[name] = toCompletions(stdlibNames[name])));
1646
+ }
1647
+ // NAMES DEFINED IN THE FILE
1648
+ // Nodes that start a new scope. Names defined inside one are offered only
1649
+ // inside it. `if` and `begin` blocks share their parent's scope, as in Julia.
1650
+ const scopeNodes = new Set([
1651
+ "Program", "ModuleDefinition", "FunctionDefinition", "MacroDefinition",
1652
+ "StructDefinition", "LetStatement", "ForStatement", "WhileStatement",
1653
+ "TryStatement", "DoClause", "ArrowFunctionExpression", "Generator",
1654
+ "ShortFunction",
1655
+ ]);
1656
+ function children(node) {
1657
+ let out = [];
1658
+ for (let ch = node.firstChild; ch; ch = ch.nextSibling)
1659
+ out.push(ch);
1660
+ return out;
1661
+ }
1662
+ // The names bound by the target of an assignment or a for loop:
1663
+ // `x`, `x::Int`, `(a, b)`, `a, b`, `a.b` (nothing) and so on.
1664
+ function targetNames(node, def, type = "variable") {
1665
+ switch (node.name) {
1666
+ case "Identifier":
1667
+ def(node, type);
1668
+ break;
1669
+ case "TupleExpression":
1670
+ case "OpenTuple":
1671
+ case "ParenExpression":
1672
+ for (let ch of children(node))
1673
+ targetNames(ch, def, type);
1674
+ break;
1675
+ case "BinaryExpression": // `x::Int`
1676
+ case "SplatExpression": // `xs...`
1677
+ case "KwArg": // `x = 1` as a parameter
1678
+ case "Assignment":
1679
+ if (node.firstChild)
1680
+ targetNames(node.firstChild, def, type);
1681
+ break;
1682
+ }
1683
+ }
1684
+ // The parameters of a function signature such as `f(a, b::Int; c = 1)`,
1685
+ // `f(x)::Int` or `f(x::T) where T`.
1686
+ function callOf(node) {
1687
+ while (node && node.name == "BinaryExpression")
1688
+ node = node.firstChild;
1689
+ return node && node.name == "CallExpression" ? node : null;
1690
+ }
1691
+ function signatureParams(signature, def) {
1692
+ // `where T` and `where {T <: Real}` declare type parameters.
1693
+ for (let node = signature; node && node.name == "BinaryExpression"; node = node.firstChild) {
1694
+ let where = node.getChild("where");
1695
+ let type = node.getChild("Type");
1696
+ if (where && type)
1697
+ typeParams(type, def);
1698
+ }
1699
+ let call = callOf(signature);
1700
+ let args = call ? call.getChild("Arguments") : signature.name == "TupleExpression" ? signature : null;
1701
+ if (!args)
1702
+ return;
1703
+ for (let arg of children(args)) {
1704
+ if (arg.name == "KeywordArguments")
1705
+ for (let kw of children(arg))
1706
+ targetNames(kw, def);
1707
+ else
1708
+ targetNames(arg, def);
1709
+ }
1710
+ }
1711
+ function typeParams(node, def) {
1712
+ let inner = node.name == "Type" ? node.firstChild : node;
1713
+ if (!inner)
1714
+ return;
1715
+ if (inner.name == "BraceExpression")
1716
+ for (let ch of children(inner))
1717
+ typeParams(ch, def);
1718
+ else if (inner.name == "BinaryExpression" || inner.name == "UnaryExpression") {
1719
+ if (inner.firstChild)
1720
+ typeParams(inner.firstChild, def);
1721
+ }
1722
+ else if (inner.name == "Identifier")
1723
+ def(inner, "type");
1724
+ }
1725
+ // The name defined by a signature: `f` in `f(x)`, `Base.show(io, x)` (none).
1726
+ function signatureName(signature) {
1727
+ if (signature.name == "Identifier")
1728
+ return signature;
1729
+ let call = callOf(signature);
1730
+ let head = call && call.firstChild;
1731
+ return head && head.name == "Identifier" ? head : null;
1732
+ }
1733
+ function typeHeadName(head) {
1734
+ let node = head.firstChild;
1735
+ if (node && node.name == "TypeHeadSubtype")
1736
+ node = node.firstChild && node.firstChild.firstChild;
1737
+ if (node && node.name == "ParametrizedExpression")
1738
+ node = node.firstChild;
1739
+ return node && node.name == "Identifier" ? node : null;
1740
+ }
1741
+ // A short function definition is an assignment with a call on its left.
1742
+ function isShortFunction(node) {
1743
+ return node.name == "Assignment" && !!node.firstChild && !!callOf(node.firstChild);
1744
+ }
1745
+ // Names that a node defines in the scope that contains it.
1746
+ function outerDefs(node, def) {
1747
+ switch (node.name) {
1748
+ case "FunctionDefinition": {
1749
+ let sig = node.getChild("Signature");
1750
+ let name = sig && sig.firstChild && signatureName(sig.firstChild);
1751
+ if (name)
1752
+ def(name, "function");
1753
+ return true;
1754
+ }
1755
+ case "MacroDefinition": {
1756
+ let sig = node.getChild("Signature");
1757
+ let name = sig && sig.firstChild && signatureName(sig.firstChild);
1758
+ if (name)
1759
+ def(name, "macro");
1760
+ return true;
1761
+ }
1762
+ case "StructDefinition":
1763
+ case "AbstractDefinition":
1764
+ case "PrimitiveDefinition": {
1765
+ let head = node.getChild("TypeHead");
1766
+ let name = head && typeHeadName(head);
1767
+ if (name)
1768
+ def(name, "type");
1769
+ return true;
1770
+ }
1771
+ case "ModuleDefinition": {
1772
+ let name = node.getChild("Identifier");
1773
+ if (name)
1774
+ def(name, "namespace");
1775
+ return true;
1776
+ }
1777
+ case "Assignment": {
1778
+ let lhs = node.firstChild;
1779
+ if (!lhs)
1780
+ return false;
1781
+ if (isShortFunction(node)) {
1782
+ let name = signatureName(lhs);
1783
+ if (name)
1784
+ def(name, "function");
1785
+ return true;
1786
+ }
1787
+ targetNames(lhs, def);
1788
+ return false;
1789
+ }
1790
+ case "LocalStatement":
1791
+ case "GlobalStatement":
1792
+ for (let ch of children(node))
1793
+ targetNames(ch, def);
1794
+ return false;
1795
+ case "ConstStatement": {
1796
+ let a = node.lastChild;
1797
+ if (a && a.name == "Assignment" && a.firstChild)
1798
+ targetNames(a.firstChild, def, "constant");
1799
+ return true;
1800
+ }
1801
+ case "ImportStatement":
1802
+ case "UsingStatement": {
1803
+ let selected = node.getChild("SelectedImport");
1804
+ if (selected) {
1805
+ let paths = selected.getChildren("ImportPath");
1806
+ for (let path of paths.slice(1)) {
1807
+ let last = path.lastChild;
1808
+ if (last && last.name == "Identifier")
1809
+ def(last, "function");
1810
+ }
1811
+ }
1812
+ return true;
1813
+ }
1814
+ }
1815
+ return false;
1816
+ }
1817
+ // Names that a scope node defines for its own body.
1818
+ function innerDefs(node, def) {
1819
+ var _a;
1820
+ switch (node.name) {
1821
+ case "FunctionDefinition":
1822
+ case "MacroDefinition": {
1823
+ let sig = node.getChild("Signature");
1824
+ if (sig && sig.firstChild)
1825
+ signatureParams(sig.firstChild, def);
1826
+ break;
1827
+ }
1828
+ case "Assignment": // a short function definition
1829
+ if (node.firstChild)
1830
+ signatureParams(node.firstChild, def);
1831
+ break;
1832
+ case "StructDefinition": {
1833
+ let head = node.getChild("TypeHead");
1834
+ let name = head && typeHeadName(head);
1835
+ let parametrized = name && name.parent;
1836
+ if (parametrized && parametrized.name == "ParametrizedExpression") {
1837
+ let brace = parametrized.getChild("BraceExpression");
1838
+ if (brace)
1839
+ typeParams(brace, def);
1840
+ }
1841
+ for (let ch of children(node)) {
1842
+ if (ch.name == "Identifier")
1843
+ def(ch, "property");
1844
+ else if (ch.name == "BinaryExpression" && ch.firstChild && ch.firstChild.name == "Identifier")
1845
+ def(ch.firstChild, "property");
1846
+ }
1847
+ break;
1848
+ }
1849
+ case "ForStatement":
1850
+ for (let b of node.getChildren("ForBinding"))
1851
+ if (b.firstChild)
1852
+ targetNames(b.firstChild, def);
1853
+ break;
1854
+ case "Generator":
1855
+ for (let gen of node.getChildren("GenFor"))
1856
+ for (let b of gen.getChildren("ForBinding"))
1857
+ if (b.firstChild)
1858
+ targetNames(b.firstChild, def);
1859
+ break;
1860
+ case "LetStatement":
1861
+ for (let b of node.getChildren("LetBinding"))
1862
+ if (b.firstChild)
1863
+ targetNames(b.firstChild, def);
1864
+ break;
1865
+ case "DoClause": {
1866
+ let params = node.getChild("Parameters");
1867
+ if (params)
1868
+ for (let p of children(params))
1869
+ targetNames(p, def);
1870
+ break;
1871
+ }
1872
+ case "ArrowFunctionExpression":
1873
+ if (node.firstChild)
1874
+ targetNames(node.firstChild, def);
1875
+ break;
1876
+ case "TryStatement": {
1877
+ let capture = (_a = node.getChild("CatchClause")) === null || _a === void 0 ? void 0 : _a.getChild("ExceptionCapture");
1878
+ if (capture && capture.firstChild)
1879
+ targetNames(capture.firstChild, def);
1880
+ break;
1881
+ }
1882
+ }
1883
+ }
1884
+ function isScope(node) {
1885
+ return scopeNodes.has(node.name) || isShortFunction(node);
1886
+ }
1887
+ const cache = new common.NodeWeakMap();
1888
+ // The names defined directly in a scope, without those of nested scopes.
1889
+ function getScope(doc, scope) {
1890
+ let cached = cache.get(scope);
1891
+ if (cached)
1892
+ return cached;
1893
+ let completions = [];
1894
+ let seen = new Set();
1895
+ let def = (node, type) => {
1896
+ let label = doc.sliceString(node.from, node.to);
1897
+ if (!label || seen.has(label))
1898
+ return;
1899
+ seen.add(label);
1900
+ completions.push({ label: type == "macro" ? "@" + label : label, type: type == "macro" ? "function" : type });
1901
+ };
1902
+ innerDefs(scope, def);
1903
+ let walk = (node) => {
1904
+ for (let ch of children(node))
1905
+ if (!outerDefs(ch, def) && !isScope(ch))
1906
+ walk(ch);
1907
+ };
1908
+ walk(scope);
1909
+ cache.set(scope, completions);
1910
+ return completions;
1911
+ }
1912
+ const dontComplete = [
1913
+ "StringLiteral", "CommandLiteral", "NsStringLiteral", "NsCommandLiteral",
1914
+ "LineComment", "BlockComment", "CharLiteral", "Symbol", "Field",
1915
+ ];
1916
+ const identifier = /@?[\p{L}_][\p{L}\p{N}_!′]*$/u;
1917
+ // Inside a string, an interpolation such as `"$(name)"` holds code that can
1918
+ // be completed.
1919
+ function inDontComplete(node) {
1920
+ for (let cur = node; cur; cur = cur.parent) {
1921
+ if (cur.name == "ParenExpression" || cur.name == "TupleExpression") {
1922
+ let parent = cur.parent;
1923
+ if (parent && (parent.name == "StringLiteral" || parent.name == "CommandLiteral"))
1924
+ return false;
1925
+ }
1926
+ if (dontComplete.indexOf(cur.name) > -1) {
1927
+ // `$name` inside a string is an Identifier child of the string.
1928
+ if (cur.name == "StringLiteral" && node.name == "Identifier" && node.parent == cur)
1929
+ return false;
1930
+ return true;
1931
+ }
1932
+ }
1933
+ return false;
1934
+ }
1935
+ /**
1936
+ Completes names defined in the file, in scope at the cursor.
1937
+ */
1938
+ const localCompletionSource = (context) => {
1939
+ let inner = language.syntaxTree(context.state).resolveInner(context.pos, -1);
1940
+ if (inDontComplete(inner))
1941
+ return null;
1942
+ let word = context.matchBefore(identifier);
1943
+ if (!word && !context.explicit)
1944
+ return null;
1945
+ let options = [];
1946
+ for (let pos = inner; pos; pos = pos.parent) {
1947
+ if (isScope(pos))
1948
+ options = options.concat(getScope(context.state.doc, pos));
1949
+ }
1950
+ // Leave out the name being typed, when the file's only use of it is here.
1951
+ if (word)
1952
+ options = options.filter((o) => o.label != word.text);
1953
+ return { options, from: word ? word.from : context.pos, validFor: identifier };
1954
+ };
1955
+ // The libraries named by `using` or `import` statements in the file, such
1956
+ // as `Dates` in `using Dates` or `using Dates: now`.
1957
+ function usedLibraries(context) {
1958
+ let found = [];
1959
+ let scan = (node) => {
1960
+ for (let ch of children(node)) {
1961
+ if (ch.name == "UsingStatement" || ch.name == "ImportStatement") {
1962
+ let selected = ch.getChild("SelectedImport");
1963
+ let paths = selected ? selected.getChildren("ImportPath").slice(0, 1) : ch.getChildren("ImportPath");
1964
+ for (let path of paths) {
1965
+ let first = path.getChild("Identifier");
1966
+ if (first)
1967
+ found.push(context.state.sliceDoc(first.from, first.to));
1968
+ }
1969
+ }
1970
+ else if (ch.name == "ModuleDefinition") {
1971
+ scan(ch);
1972
+ }
1973
+ }
1974
+ };
1975
+ scan(language.syntaxTree(context.state).topNode);
1976
+ return found;
1977
+ }
1978
+ /**
1979
+ Completes `Base` names, and the names of standard libraries such as
1980
+ `Dates` once the file has `using Dates`.
1981
+ */
1982
+ const builtinCompletionSource = (context) => {
1983
+ let inner = language.syntaxTree(context.state).resolveInner(context.pos, -1);
1984
+ if (inDontComplete(inner))
1985
+ return null;
1986
+ let word = context.matchBefore(identifier);
1987
+ if (!word && !context.explicit)
1988
+ return null;
1989
+ let options = builtins.slice();
1990
+ for (let lib of usedLibraries(context)) {
1991
+ let names = stdlib(lib);
1992
+ if (names)
1993
+ options = options.concat(names);
1994
+ }
1995
+ return { options, from: word ? word.from : context.pos, validFor: identifier };
1996
+ };
1997
+ /**
1998
+ Completes the names in a module after `Base.` or `Dates.`.
1999
+ */
2000
+ const memberCompletionSource = (context) => {
2001
+ let match = context.matchBefore(/[\p{L}_][\p{L}\p{N}_]*\.@?[\p{L}\p{N}_!]*$/u);
2002
+ if (!match)
2003
+ return null;
2004
+ let dot = match.text.indexOf(".");
2005
+ let module = match.text.slice(0, dot);
2006
+ let options = module == "Base" || module == "Core" ? builtins : stdlib(module);
2007
+ if (!options)
2008
+ return null;
2009
+ return { options: options, from: match.from + dot + 1, validFor: /^@?[\p{L}\p{N}_!]*$/u };
2010
+ };
2011
+ const keywordSource = autocomplete.completeFromList(keywords.concat(snippets));
2012
+ // Completion after a dot belongs to memberCompletionSource. A range such as
2013
+ // `1..` or a splat such as `xs...` doesn't count.
2014
+ function notAfterDot(source) {
2015
+ return (context) => {
2016
+ let before = context.state.sliceDoc(Math.max(0, context.pos - 200), context.pos);
2017
+ if (/(^|[^.])\.@?[\p{L}\p{N}_!]*$/u.test(before))
2018
+ return null;
2019
+ return source(context);
2020
+ };
2021
+ }
2022
+ const juliaCompletionSources = [
2023
+ notAfterDot(localCompletionSource),
2024
+ notAfterDot(builtinCompletionSource),
2025
+ notAfterDot((context) => {
2026
+ let inner = language.syntaxTree(context.state).resolveInner(context.pos, -1);
2027
+ return inDontComplete(inner) ? null : keywordSource(context);
2028
+ }),
2029
+ memberCompletionSource,
2030
+ ];
2031
+
2032
+ // Folds a block from the end of its first line to its `end` keyword.
2033
+ function foldBlock(node, state) {
2034
+ let last = node.lastChild;
2035
+ if (!last || last.name != "end")
2036
+ return null;
2037
+ let from = state.doc.lineAt(node.from).to;
2038
+ let to = last.from;
2039
+ return to > from ? { from, to } : null;
2040
+ }
2041
+ const juliaLanguage = language.LRLanguage.define({
2042
+ parser: lezerJulia.parser.configure({
2043
+ props: [
2044
+ language.indentNodeProp.add({
2045
+ IfStatement: language.continuedIndent({ except: /^\s*(end\b|else\b|elseif\b)/ }),
2046
+ TryStatement: language.continuedIndent({ except: /^\s*(end\b|else\b|finally\b)/ }),
2047
+ "Definition CompoundStatement": language.continuedIndent({ except: /^\s*(end\b)/ }), // node groups
2048
+ ExportStatement: language.continuedIndent(),
2049
+ ImportStatement: language.continuedIndent(),
2050
+ ReturnStatement: language.continuedIndent(),
2051
+ Assignment: language.continuedIndent(),
2052
+ BinaryExpression: language.continuedIndent(),
2053
+ TernaryExpression: language.continuedIndent(),
2054
+ }),
2055
+ language.foldNodeProp.add({
2056
+ "FunctionDefinition MacroDefinition StructDefinition ModuleDefinition": foldBlock,
2057
+ "IfStatement ForStatement WhileStatement LetStatement TryStatement": foldBlock,
2058
+ "BeginStatement QuoteStatement DoClause": foldBlock,
2059
+ "VectorExpression MatrixExpression ComprehensionExpression Arguments TupleExpression": language.foldInside,
2060
+ }),
2061
+ ],
2062
+ }),
2063
+ languageData: {
2064
+ closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`", "'''", '"""', "```"] },
2065
+ commentTokens: { line: "#", block: { open: "#=", close: "=#" } },
2066
+ indentOnInput: /^\s*(\]|\}|\)|end|else|elseif|catch|finally)$/,
2067
+ wordChars: "⁺⁻⁼⁽⁾₉₊₋₌₍₎℘⅀⅁⅂⅃⅄𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃!",
2068
+ },
2069
+ });
2070
+ function collectKeywords() {
2071
+ let keywords = [];
2072
+ for (let node of lezerJulia.parser.nodeSet.types) {
2073
+ let groups = node.prop(common.NodeProp.group);
2074
+ let group = groups != null ? groups[0] : null;
2075
+ if (group === "keyword") {
2076
+ keywords.push({ label: node.name, type: "keyword" });
2077
+ }
2078
+ }
2079
+ return keywords;
2080
+ }
2081
+ const keywordCompletion = juliaLanguage.data.of({
2082
+ autocomplete: autocomplete__namespace.completeFromList(collectKeywords()),
2083
+ });
2084
+ /**
2085
+ Completes keywords, snippets, the names in `Base` and the standard
2086
+ libraries used in the file, and the names defined in the file that are in
2087
+ scope at the cursor.
2088
+ */
2089
+ const juliaCompletion = juliaCompletionSources.map((source) => juliaLanguage.data.of({ autocomplete: source }));
2090
+ const defaultConfig = {
2091
+ enableKeywordCompletion: false,
2092
+ enableCompletion: true,
2093
+ };
2094
+ function julia(config = defaultConfig) {
2095
+ config = Object.assign(Object.assign({}, defaultConfig), config);
2096
+ let extensions = [];
2097
+ if (config.enableCompletion) {
2098
+ extensions.push(juliaCompletion);
2099
+ }
2100
+ else if (config.enableKeywordCompletion) {
2101
+ extensions.push(keywordCompletion);
2102
+ }
2103
+ return new language.LanguageSupport(juliaLanguage, extensions);
2104
+ }
2105
+
2106
+ exports.builtinCompletionSource = builtinCompletionSource;
2107
+ exports.builtins = builtins;
2108
+ exports.julia = julia;
2109
+ exports.juliaCompletion = juliaCompletion;
2110
+ exports.juliaCompletionSources = juliaCompletionSources;
2111
+ exports.juliaLanguage = juliaLanguage;
2112
+ exports.keywordCompletion = keywordCompletion;
2113
+ exports.keywords = keywords;
2114
+ exports.localCompletionSource = localCompletionSource;
2115
+ exports.memberCompletionSource = memberCompletionSource;
2116
+ exports.snippets = snippets;