lang: funcs: Move standalone functions into core

Everything should be all together.
This commit is contained in:
James Shubin
2024-11-21 22:56:17 -05:00
parent b40d10a366
commit 018d3efc90
15 changed files with 58 additions and 28 deletions

View File

@@ -61,6 +61,28 @@ const (
// is listed here because it needs a well-known name that can be used by
// the string interpolation code.
ConcatFuncName = "concat"
// ContainsFuncName is the name the contains function is registered as.
ContainsFuncName = "contains"
// LookupDefaultFuncName is the name this function is registered as.
// This starts with an underscore so that it cannot be used from the
// lexer.
LookupDefaultFuncName = "_lookup_default"
// LookupFuncName is the name this function is registered as.
// This starts with an underscore so that it cannot be used from the
// lexer.
LookupFuncName = "_lookup"
// StructLookupFuncName is the name this function is registered as. This
// starts with an underscore so that it cannot be used from the lexer.
StructLookupFuncName = "_struct_lookup"
// StructLookupOptionalFuncName is the name this function is registered
// as. This starts with an underscore so that it cannot be used from the
// lexer.
StructLookupOptionalFuncName = "_struct_lookup_optional"
)
// registeredFuncs is a global map of all possible funcs which can be used. You