Notes

The following operators exist

OperatorDescriptionExample
*Last Match PointerA pointer to the buffer of where the last found match is stored
%Stack OperatorA pointer to the memory location of the stack. Will output the last element on the stack when used as an output.
&nameVariablesAn arbitrary set of data that gets printed as either string or a signed number depending on the datatype.
%[...]Stack OffsetWill access the string pointer at memory location stack + len(stack) - ... (Reverse Stack lookup without popping)
%[...,]Reverse SubstackWill return all elements before stack - len(stack) - ... as a String*[] (Array of string pointers)
%[,...]SubstackWill return all elements after stack - len(stack) - ... as a String*[] (Array of string pointers)
%[-...]Negative stack offsetWill return stack + ... as a String*
%[&named-counter]Named Counter Stack OffsetAll offset variants also work using named counters.
#Symbol Table OperatorMETA uses integrated, high performance, symbol tables. These can be referenced using the symbol table operator.
#<..., ...>Symbol Table SetInserts the combination of key (argument 1) and value (argument 2) into the current symbol table.
#[...] ~ &idSymbol Table GetRetrieves the value that corresponds to key (argument 1). This value will have to be captured by a immediate modifier that follows the expression or used inside an output method.
#^<...>Symbol Table WalkingSince some variables may have to be stored in a higher scope than the one currently in, the Symbol Table walk operator may be used to walk up ... steps in the symbol table tree.
#^^Global Symbol Table OperatorSince writing &^<#global-symbol-scope> is quite cumbersome, the global symbol table can always be accessed by doing &^^
~ ...Immediate CaptureCaptures the last expression result into a variable specified in ...
-f<...>Immediate ModifierCalls the function f with the specified arguments and the last expression result. The last expression result will ALWAYS be in position 0 of the argument list
@(...)ScopeCreates a new scope and assigns everyhting captured between (...) in the newly created scope instead of the original one.
@(...) ~ &scopeScope CaptureCaptures a new scope in a variable
"function" @(ID :Literal) ~ &id "{" ... "}" :FunctionDeclaration<identifier = &id["nodes"][0]>Scope AccessAccesses parts of a scope by referencing it’s storage at a later point

Declaring Variables

[define [i32 name] 0]

[defunc [fn [i32 arg1] [i32 arg2]] -> i32
	[+ arg1 arg2]]

Overrides

[override [fn [u32 arg1] [u32 arg2]] -> u32
	[+ arg1 arg2]]

Enum

[enum MyEnumName
	[first 1]
	[second 1]]

[define [MyEnumName variable] MyEnumName::first]

Structs

[struct MyStruct<T>
	[T prop1]
	[u32 prop2]
	[char[2,] name]]

[define [MyStruct<i32> prop1]]

Arrays

Arrays can be created by doing: '[1 2 3 4]

Array elements are separated by a space

Types

The types of all variables have to be explicitly declared so the compiler can optimize for them. You have several options when creating an array. By default there are no mixed arrays meaning you cannot write char and i32 into the same array.

i32[] Will create a dynamically sized array of i32s

i32[5] Will create an i32 array of size 5

i32[5,] Will create an i32 array with initial length 5 that can be dynamically resized but may not be resized to less than 5 entries.

i32[,5] Will create an i32 array with no initial length that can be resized up to an entry count of 5

i32[5,10] Will create an i32 array with initial length 5 that may be extended up to a size of 10

Char

'a

Datatypes

NameDescription
u88 bit unsigned integer
u1616 bit unsigned integer
u3232 bit unsigned integer
u6464 bit unsigned integer
i88 bit signed integer
i1616 bit signed integer
i3232 bit signed integer
i6464 bit signed integer
char8 bit character
wchar16 bit wide character
i32[]Array of i32s - refer to arrays for more information