Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AjayMT/golsp
/ functions
Functions
84 in github.com/AjayMT/golsp
⨍
Functions
84
◇
Types & classes
11
↓ 54 callers
Function
UndefinedObject
UndefinedObject: Produce the UNDEFINED identifier object. Used because structs and other data structures are mutable by default and cannot be stored i
core/defs.go:107
↓ 19 callers
Method
Append
(obj Object)
core/list.go:96
↓ 15 callers
Function
MakeScope
MakeScope: construct a new child scope that descends from a parent scope `parent`: the parent scope this function returns a new Scope struct whose Par
core/eval.go:140
↓ 15 callers
Method
Next
(item *Item, index int)
core/list.go:68
↓ 14 callers
Function
BuiltinFunctionObject
Object Object constructors BuiltinFunctionObject: Produce a function object from a BuiltinFunction-type function `name`: the name of the function `fn`
core/defs.go:96
↓ 11 callers
Function
Eval
Eval: Evaluate a syntax tree node within a scope `scope`: the scope within which to evaluate the node `root`: the root node to evaluate this function
core/eval.go:482
↓ 11 callers
Function
evalDot
evalDot: Evaluate 'dot' property access operator on map objects `obj`: the (map) object `root`: the syntax tree node associated with the dot operator
core/eval.go:446
↓ 9 callers
Method
Join
(other List)
core/list.go:117
↓ 9 callers
Function
SpreadNode
SpreadNode: Apply the spread operator to a syntax tree node `scope`: the scope within which the node is being spread `node`: the node to spread this f
core/eval.go:345
↓ 9 callers
Function
StringObject
StringObject: Produce a string object from a string `str`: the string this function returns the produced Object
core/defs.go:120
↓ 8 callers
Function
ToNumber
ToNumber: Extract a number from a number object. This function cannot convert non-number objects to numbers `obj`: the number object this function ret
core/defs.go:204
↓ 7 callers
Function
EvalArgs
EvalArgs: evaluate a list of arguments passed to builtin functions, primarily used to handle spreading `scp`: the scope within which to evaluate the a
core/builtins.go:647
↓ 7 callers
Method
ToSlice
()
core/list.go:77
↓ 6 callers
Function
BuiltinComparisonFunction
BuiltinComparisonFunction: This function produces a builtin comparison function for the specified operator `op`: the comparison operator, one of == !=
core/builtins.go:567
↓ 5 callers
Function
BuiltinMathFunction
BuiltinMathFunction: Produce a builtin function for a given math operator `op`: the math operator, one of + - * / % this function returns a Object con
core/builtins.go:309
↓ 5 callers
Function
appendNode
appendNode: append a parsed node to a list of parsed nodes `nodes`: the list of parsed nodes `node`: the parsed node to append to the list `prev`: a p
core/parser.go:162
↓ 5 callers
Function
typeCheck
(objectType g.ObjectType, nodeType g.STNodeType)
stdlib/types/types.go:9
↓ 4 callers
Function
NumberObject
NumberObject: Produce a number object from a number `num`: the number this function returns the produced Object
core/defs.go:133
↓ 3 callers
Function
CopyObject
CopyObject: Copy an Object `object`: the object to copy this function returns a copy of object. Note that it does not copy object.Value since that pro
core/eval.go:171
↓ 3 callers
Function
RuntimeWaitGroup
()
core/eval.go:13
↓ 3 callers
Method
at
(index int)
core/list.go:24
↓ 2 callers
Function
ListFromSlice
(slice []Object)
core/list.go:18
↓ 2 callers
Function
LookupIdentifier
LookupIdentifier: lookup an identifier within a particular scope `scope`: the scope in which to search for the identifier `identifier`: the name of th
core/eval.go:125
↓ 2 callers
Function
assign
assign: The builtin 'def' and 'const' functions. These functions (re)bind identifiers to objects and function patterns to expressions. They only act w
core/builtins.go:128
↓ 2 callers
Function
bindArguments
bindArguments: Bind the arguments passed to a function to the function object's Scope property `exprhead`: the 'expression head' i.e function object `
core/eval.go:376
↓ 2 callers
Function
cropen
(scope g.Scope, args []g.Object, create bool)
stdlib/os/os.go:24
↓ 2 callers
Function
fileInfoToObject
(fi os.FileInfo)
stdlib/os/os.go:162
↓ 2 callers
Function
isConstant
isConstant: Check whether an identifier is constant within a given scope and its parents `scope`: the scope `identifier`: the identifier this function
core/builtins.go:104
↓ 2 callers
Function
matchPatterns
matchPatterns: Match a list of arguments to a particular function pattern `fn`: the function whose patterns to check `arguments`: the list of argument
core/eval.go:79
↓ 2 callers
Function
objectToBoolean
objectToBoolean: Convert a Object to a boolean. This function defines the conditions of the builtin 'if' and 'when' functions `obj`: the object this f
core/builtins.go:494
↓ 2 callers
Function
rm
(scope g.Scope, args []g.Object, all bool)
stdlib/os/os.go:43
↓ 2 callers
Method
slice
(begin int, end int)
core/list.go:34
↓ 1 callers
Function
BuiltinDo
BuiltinDo: The builtin 'do' function. This function evaluates a series of statements within an enclosed, isolated scope this function returns the resu
core/builtins.go:430
↓ 1 callers
Function
BuiltinSprintf
BuiltinSprintf: The builtin 'sprintf' function. This function formats a Go-style format string with a set of arguments this function returns the forma
core/builtins.go:400
↓ 1 callers
Method
Copy
()
core/list.go:88
↓ 1 callers
Function
CopyFunction
CopyFunction: Copy a Function struct `fn`: the function to copy this function returns a copy of fn
core/eval.go:154
↓ 1 callers
Function
EvalMap
EvalMap: Lookup key(s) in a map `glmap`: the map object `arguments`: the key or keys to look up this function returns the object or list of objects th
core/eval.go:314
↓ 1 callers
Function
EvalSlice
EvalSlice: Evaluate a slice expression, i.e `[list begin end step]` `list`: the list or string that is sliced `arguments`: the arguments passed in the
core/eval.go:226
↓ 1 callers
Method
Index
(index int)
core/list.go:144
↓ 1 callers
Function
InitializeBuiltins
InitializeBuiltins: Initialize the default builtin scope ('Builtins') with builtin identifiers
core/builtins.go:21
↓ 1 callers
Function
IsolateScope
IsolateScope: 'Isolate' a scope object by copying all values from its parent scopes into the scope struct, effectively orphaning it and flattening its
core/eval.go:199
↓ 1 callers
Function
ListObject
ListObject: Produce a list object from a slice of strings. This function cannot produce lists that contain non-string objects `slice`: the slice this
core/defs.go:172
↓ 1 callers
Function
MakeST
MakeST: construct a syntax tree from a list of tokens `tokens`: list of tokens to parse
core/parser.go:51
↓ 1 callers
Function
MapObject
MapObject: Produce a map object from a map of strings to Objects. This function cannot produce maps that bind numbers to objects `gomap`: the map this
core/defs.go:153
↓ 1 callers
Function
Run
Run: Run a Golsp program `program`: the program to run `dirname`: the directory of the program file `filename`: the name of the program file `args`: c
core/eval.go:690
↓ 1 callers
Method
Slice
(begin int, end int)
core/list.go:152
↓ 1 callers
Method
SliceStep
(begin int, end int, step int, sliceAll bool)
core/list.go:165
↓ 1 callers
Function
ToString
Object constructors Object de-constructors ToString: Extract a string from a string object. This function cannot convert non-string objects to strings
core/defs.go:192
↓ 1 callers
Function
Tokenize
Tokenize: tokenize a string `input`: the string to tokenize this function returns a list of tokens
core/parser.go:257
↓ 1 callers
Function
comparePatternNode
comparePatternNode: Compare a node in a function pattern with an argument object `pattern`: the pattern node `arg`: the argument to compare with the p
core/eval.go:21
↓ 1 callers
Function
comparePatterns
comparePatterns: Compare two function potterns (as passed to the '=' function) to check whether they are identical. This function is used to check for
core/builtins.go:65
↓ 1 callers
Function
formatStr
formatStr: Format a Go-style format string with a set of Object arguments `text`: the format string `objects`: the objects to serialize into the strin
core/builtins.go:360
↓ 1 callers
Function
makeST
makeST: recursively construct a syntax tree from a list of tokens `delim`: the leading delimeter of the current expression `tokens`: remaining tokens
core/parser.go:62
↓ 1 callers
Function
matchOperator
matchOperator: check if a list of characters contains an operator and find the correct operator if so `runes`: list of characters `index`: index at wh
core/parser.go:232
↓ 1 callers
Function
normalizeString
normalizeString: Replace esacped escape sequences with actual escape sequences in a string `str`: the string this function returns the normalized stri
core/parser.go:188
↓ 1 callers
Function
parseLiteral
parseLiteral: parse an extended literal, i.e a string or comment `delimiter`: leading delimiter of literal, either '"' or '#' `input`: list of unparse
core/parser.go:200
↓ 1 callers
Method
sublist
(begin *Item, index int)
core/list.go:53
Function
BuiltinConst
(scope Scope, arguments []Object)
core/builtins.go:116
Function
BuiltinDef
see 'assign'
core/builtins.go:113
Function
BuiltinGo
BuiltinGo: The builtin 'go' function. This function concurrently evaluates a series of statements within an enclosed, isolated scope this function ret
core/builtins.go:452
Function
BuiltinIf
BuiltinIf: the builtin 'if' function. This function evaluates a predicate and evaluates one of two expressions depending on the result of the predicat
core/builtins.go:514
Function
BuiltinLambda
BuiltinLambda: The builtin 'lambda' function. This produces a function-type object with one pattern and one expression this function returns the funct
core/builtins.go:228
Function
BuiltinPrintf
BuiltinPrintf: The builtin 'printf' function. This function formats a Go-style format string with a set of arguments and writes the result to stdout t
core/builtins.go:417
Function
BuiltinRequire
BuiltinRequire: The builtin 'require' function. This function evaluates a file and returns the Object that the file exports.
core/builtins.go:270
Function
BuiltinSleep
BuiltinSleep: the builtin 'sleep' function. This function waits for a specified number of milliseconds this function returns UNDEFINED
core/builtins.go:476
Function
BuiltinWhen
BuiltinWhen: the builtin 'when' function. This function takes a set of predicate-body pairs (expressed as zipped expressions), evaluates the predicate
core/builtins.go:544
Function
CallFunction
CallFunction: call a function object with a list of arguments `fnobj`: the function object `args`: the list of arguments this function returns the res
core/eval.go:462
Function
PrintElements
(list Object)
debug.go:12
Function
PrintST
(root STNode)
debug.go:25
Function
create
(s g.Scope, a []g.Object)
stdlib/os/os.go:41
Function
exit
(scope g.Scope, args []g.Object)
stdlib/os/os.go:202
Function
main
()
cli.go:14
Function
mkdir
(scope g.Scope, args []g.Object)
stdlib/os/os.go:58
Function
open
(s g.Scope, a []g.Object)
stdlib/os/os.go:40
Function
parseNumber
(scope g.Scope, args []g.Object)
stdlib/types/types.go:26
Function
read
(scope g.Scope, args []g.Object)
stdlib/os/os.go:68
Function
readAll
(scope g.Scope, args []g.Object)
stdlib/os/os.go:86
Function
readDir
(scope g.Scope, args []g.Object)
stdlib/os/os.go:183
Function
readUntil
(scope g.Scope, args []g.Object)
stdlib/os/os.go:106
Function
remove
(s g.Scope, a []g.Object)
stdlib/os/os.go:55
Function
removeAll
(s g.Scope, a []g.Object)
stdlib/os/os.go:56
Function
seek
(scope g.Scope, args []g.Object)
stdlib/os/os.go:143
Function
stat
(scope g.Scope, args []g.Object)
stdlib/os/os.go:173
Function
write
(scope g.Scope, args []g.Object)
stdlib/os/os.go:124