12. AST manipulation library
The AST module implements compilation time reflection for the Daslang syntax tree.
All functions and symbols are in “ast” module, use require to get access to it.
require ast
12.1. Type aliases
- bitfield TypeDeclFlags
properties of the TypeDecl object.
- Fields
ref (0x1) - The type is a reference type.
constant (0x2) - The type is a constant type.
temporary (0x4) - The type is a temporary type.
_implicit (0x8) - The type is an implicit type.
removeRef (0x10) - Remove the reference flag.
removeConstant (0x20) - Remove the constant flag.
removeDim (0x40) - Remove the dimension flag.
removeTemporary (0x80) - Remove the temporary flag.
explicitConst (0x100) - The type is an explicit constant type.
aotAlias (0x200) - The type is an AOT alias.
smartPtr (0x400) - The type is a smart pointer type.
smartPtrNative (0x800) - The type is a native smart pointer type (smart_ptr_raw).
isExplicit (0x1000) - The type is explicit.
isNativeDim (0x2000) - The type is a native dimension.
isTag (0x4000) - The type is a reification tag.
explicitRef (0x8000) - The type is an explicit reference.
isPrivateAlias (0x10000) - The type is a private alias.
autoToAlias (0x20000) - The type is an auto-to-alias.
- bitfield FieldDeclarationFlags
properties of the FieldDeclaration object.
- Fields
moveSemantics (0x1) - The field is initialized using move semantics.
parentType (0x2) - Which parent type this field belongs to.
capturedConstant (0x4) - This field is a captured constant (via lambda or generator).
generated (0x8) - This field is compiler-generated.
capturedRef (0x10) - This field is a captured reference (via lambda or generator).
doNotDelete (0x20) - Has @do_not_delete attribute.
privateField (0x40) - This field is private.
_sealed (0x80) - The field is sealed. It cannot be overridden in derived types.
implemented (0x100) - Already implemented.
classMethod (0x200) - This field is a class method.
- bitfield StructureFlags
properties of the Structure object.
- Fields
isClass (0x1) - The structure is a class.
genCtor (0x2) - Generate constructor.
cppLayout (0x4) - C++ data layout.
cppLayoutNotPod (0x8) - C++ layout not POD type, i.e. has alignment to accommodate for inheritance.
generated (0x10) - This structure is compiler-generated.
persistent (0x20) - This structure is using persistent heap (C++ heap).
isLambda (0x40) - This structure is a lambda.
privateStructure (0x80) - This structure is private.
macroInterface (0x100) - This structure is a macro interface.
_sealed (0x200) - This structure is sealed. It cannot be inherited.
skipLockCheck (0x400) - Skip lock check.
circular (0x800) - This structure has circulare references (and is invalid).
_generator (0x1000) - This structure is a generator.
hasStaticMembers (0x2000) - This structure has static members.
hasStaticFunctions (0x4000) - This structure has static functions.
hasInitFields (0x8000) - This structure has initialized fields.
safeWhenUninitialized (0x10000) - This structure is safe when uninitialized.
isTemplate (0x20000) - This structure is a template.
hasDefaultInitializer (0x40000) - This structure has a default initializer.
- bitfield ExprGenFlags
generation (genFlags) properties of the Expression object.
- Fields
alwaysSafe (0x1) - Expression is always safe.
generated (0x2) - Expression is compiler-generated.
userSaidItsSafe (0x4) - Expression is marked as safe explicitly.
- bitfield ExprLetFlags
properties of the ExprLet object.
- Fields
inScope (0x1) - It’s ‘let inscope’ expression.
hasEarlyOut (0x2) - It’s ‘let hasEarlyOut’ expression.
itTupleExpansion (0x4) - It’s ‘let itTupleExpansion’ expression.
- bitfield ExprFlags
properties of the Expression object.
- Fields
constexpression (0x1) - Expression is a constant expression.
noSideEffects (0x2) - Expression has no side effects.
noNativeSideEffects (0x4) - Expression has no native side effects, i.e. expression itself has no sideeffects.
isForLoopSource (0x8) - Expression is a for loop source.
isCallArgument (0x10) - Expression is a call argument.
- bitfield ExprPrintFlags
printing properties of the Expression object.
- Fields
topLevel (0x1) - Its a top level expression.
argLevel (0x2) - Its an argument level expression.
bottomLevel (0x4) - Its a bottom level expression - no sub-expressions or nesting.
- bitfield FunctionFlags
properties of the Function object.
- Fields
builtIn (0x1) - Function is built-in.
policyBased (0x2) - Function is policy-based.
callBased (0x4) - Function is call-based.
interopFn (0x8) - Function is interop function.
hasReturn (0x10) - Function has a return value.
copyOnReturn (0x20) - Function copies return value.
moveOnReturn (0x40) - Function moves return value.
exports (0x80) - Its an exported function.
init (0x100) - Its an init function.
addr (0x200) - Function has address requested.
used (0x400) - Function is used.
fastCall (0x800) - Function is fast call.
knownSideEffects (0x1000) - Function has known side effects (user defined).
hasToRunAtCompileTime (0x2000) - Function has to run at compile time.
unsafeOperation (0x4000) - Function is unsafe operation.
unsafeDeref (0x8000) - All dereferences in the function will be simulated without safety checks.
hasMakeBlock (0x10000) - Function has ‘make block’ operation.
aotNeedPrologue (0x20000) - Function needs AOT prologue.
noAot (0x40000) - Function is not AOT.
aotHybrid (0x80000) - Function is AOT hybrid, i.e. can be called from both AOT and interpreted code. Call in never hardcoded.
aotTemplate (0x100000) - Function is AOT template, i.e. instantiated from template at C++ compile time.
generated (0x200000) - Function is compiler-generated.
privateFunction (0x400000) - Function is private.
_generator (0x800000) - Function is a generator.
_lambda (0x1000000) - Function is a lambda.
firstArgReturnType (0x2000000) - First argument type is return type.
noPointerCast (0x4000000) - Function has no pointer cast.
isClassMethod (0x8000000) - Function is a class method.
isTypeConstructor (0x10000000) - Function is a type constructor.
shutdown (0x20000000) - Function is a shutdown function.
anyTemplate (0x40000000) - Function is any template.
macroInit (0x80000000) - Function is macro init.
- bitfield MoreFunctionFlags
additional properties of the Function object.
- Fields
macroFunction (0x1) - Function is a macro function.
needStringCast (0x2) - Converts das string arguments to C++ char *. Empty string, which is null in das, is converted to “”.
aotHashDeppendsOnArguments (0x4) - Function hash depends on arguments.
lateInit (0x8) - Function is late initialized.
requestJit (0x10) - Function is requested to be JIT compiled.
unsafeOutsideOfFor (0x20) - Function is unsafe outside of for loop sources.
skipLockCheck (0x40) - Skip lock check for this function.
safeImplicit (0x80) - Function is safe for implicit calls. Otherwise temp values are to be specialized for in the generic.
deprecated (0x100) - Function is deprecated.
aliasCMRES (0x200) - Function aliases CMRES (Copy or Move return result).
neverAliasCMRES (0x400) - Function never aliases CMRES.
addressTaken (0x800) - Function address is taken.
propertyFunction (0x1000) - Function is a property function.
pinvoke (0x2000) - Function is a P/Invoke function, i.e. cross-context call.
jitOnly (0x4000) - Function is JIT only.
isStaticClassMethod (0x8000) - Function is a static class method.
requestNoJit (0x10000) - Function is requested to not be JIT compiled.
jitContextAndLineInfo (0x20000) - Function requires JIT context and line info.
nodiscard (0x40000) - Discarding the return value of the function is unsafe.
captureString (0x80000) - Function captures string arguments.
callCaptureString (0x100000) - Function calls capture string arguments.
hasStringBuilder (0x200000) - Function has a string builder.
recursive (0x400000) - Function is recursive.
isTemplate (0x800000) - Function is a template function.
- bitfield FunctionSideEffectFlags
side-effect properties of the Function object.
- Fields
_unsafe (0x1) - Function is unsafe.
userScenario (0x2) - User specified [sideeffects] annotation to indicate side effects.
modifyExternal (0x4) - Function may modify external state.
modifyArgument (0x8) - Function may modify argument values.
accessGlobal (0x10) - Function may access global state (variables and such).
invoke (0x20) - Function is using ‘invoke’, so we don’t know any additional side effects.
- bitfield VariableFlags
properties of the Variable object.
- Fields
init_via_move (0x1) - Variable is initialized via move <-
init_via_clone (0x2) - Variable is initialized via clone :=
used (0x4) - Variable is used
aliasCMRES (0x8) - Variable is an alias for CMRES return value
marked_used (0x10) - Variable is marked as used (to suppress unused warnings)
global_shared (0x20) - Variable is a global shared variable
do_not_delete (0x40) - @do_not_delete annotation on the variable
generated (0x80) - Variable is generated by the compiler
capture_as_ref (0x100) - Variable is captured by reference in a closure
can_shadow (0x200) - Variable can shadow another variable in an inner scope
private_variable (0x400) - Variable is private to the class/struct
tag (0x800) - Variable is a reification tag
global (0x1000) - Variable is a global variable
inScope (0x2000) - Variable is ‘let inscope’, i.e. there is a coresponding ‘delete’ in the ‘finally’ section of the block
no_capture (0x4000) - This variable will not be captured in lambda (think ‘self’).
early_out (0x8000) - There is an early out from the scope where this variable is defined (via return and otherwise)
used_in_finally (0x10000) - Variable is used in the finally block
static_class_member (0x20000) - Variable is a static class member
bitfield_constant (0x40000) - Variable is a bitfield constant
- bitfield VariableAccessFlags
access properties of the Variable object.
- Fields
access_extern (0x1) - Variable is Function or block argument.
access_get (0x2) - Variable is accessed via get (read of some kind).
access_ref (0x4) - Variable is accessed via ref (written to).
access_init (0x8) - Variable is initialized.
access_pass (0x10) - Variable is passed to a function, or invoke.
access_fold (0x20) - Variable was folded aways (optimized out).
- bitfield ExprBlockFlags
properties of the ExprBlock object.
- Fields
isClosure (0x1) - Block is a closure, and not a regular expression list.
hasReturn (0x2) - Block has a return statement.
copyOnReturn (0x4) - When invoked, the block result is copied on return.
moveOnReturn (0x8) - When invoked, the block result is moved on return.
inTheLoop (0x10) - Block is inside a loop.
finallyBeforeBody (0x20) - Finally is to be visited before the body.
finallyDisabled (0x40) - Finally is disabled.
aotSkipMakeBlock (0x80) - AOT is allowed to skip make block generation, and pass [&]() directly.
aotDoNotSkipAnnotationData (0x100) - AOT should not skip annotation data even if make block is skipped.
isCollapseable (0x200) - Block is eligible for collapse optimization.
needCollapse (0x400) - Block needs to be collapsed.
hasMakeBlock (0x800) - Block has make block operation.
hasEarlyOut (0x1000) - Block has early out (break/continue/return).
forLoop (0x2000) - Block is a for loop body.
hasExitByLabel (0x4000) - Block has exit by label (goto outside).
isLambdaBlock (0x8000) - Block is a lambda block.
- bitfield ExprAtFlags
properties of the ExprAt object.
- Fields
r2v (0x1) - Reference to value conversion is applied.
r2cr (0x2) - Read to const reference is propagated.
write (0x4) - The result is written to.
no_promotion (0x8) - Promotion to operator is disabled, even if operator [] is overloaded.
- bitfield ExprMakeLocalFlags
properties of the ExprMakeLocal object (ExprMakeArray, ExprMakeStruct, ‘ExprMakeTuple’, ‘ExprMakeVariant’).
- Fields
useStackRef (0x1) - Use stack reference, i.e. there is an address on the stack - where the reference is written to.
useCMRES (0x2) - Result is returned via CMRES pointer. Usually this is ‘return <- [[ExprMakeLocal]]’
doesNotNeedSp (0x4) - Does not need stack pointer, usually due to being part of bigger initialization.
doesNotNeedInit (0x8) - Does not need field initialization, usually due to being fully initialized via constructor.
initAllFields (0x10) - Initialize all fields.
alwaysAlias (0x20) - Always alias the result, so temp value is always allocated on the stack.
- bitfield ExprAscendFlags
properties of the ExprAscend object.
- Fields
useStackRef (0x1) - Use stack reference, i.e. there is an address on the stack - where the reference is written to.
needTypeInfo (0x2) - Simulated node needs type information at runtime.
isMakeLambda (0x4) - Is a lambda expression.
- bitfield ExprCastFlags
properties of the ExprCast object.
- Fields
upcastCast (0x1) - Upcast cast, i.e. casting from based class to derived class.
reinterpretCast (0x2) - Reinterpret cast, i.e. casting between unrelated types (like pointer to integer)
- bitfield ExprVarFlags
properties of the ExprVar object.
- Fields
local (0x1) - Local variable.
argument (0x2) - Function argument.
_block (0x4) - Block argument
thisBlock (0x8) - Argument of the most-nested block.
r2v (0x10) - Reference to value conversion is applied.
r2cr (0x20) - Read to const reference is propagated.
write (0x40) - Written to.
under_clone (0x80) - This is a foo := bar expression, and the variable is being cloned to.
- bitfield ExprMakeStructFlags
properties of the ExprMakeStruct object.
- Fields
useInitializer (0x1) - Use initializer, i.e. ‘Foo(…)’, and not ‘Foo(uninitialized …)’.
isNewHandle (0x2) - Its ‘new Foo(…)’.
usedInitializer (0x4) - ‘useInitializer’ was used optimized out.
nativeClassInitializer (0x8) - Generated class initializer.
isNewClass (0x10) - Its ‘new ClassName(…)’.
forceClass (0x20) - Its declared via ‘class’syntax, so using it for regular types will fail.
forceStruct (0x40) - Its declared via ‘struct’ syntax, so using it for regular types will fail.
forceVariant (0x80) - Its declared via ‘variant’ syntax, so using it for regular types will fail.
forceTuple (0x100) - Its declared via ‘tuple’ syntax, so using it for regular types will fail.
alwaysUseInitializer (0x200) - Always use initializer, even for default construction.
ignoreVisCheck (0x400) - Ignores visibility check between modules.
canShadowBlock (0x800) - ‘where’ section argument can shadow other variables. This is for nested comprehensions and such.
- bitfield MakeFieldDeclFlags
Properties of the MakeFieldDecl object.
- Fields
moveSemantics (0x1) - Initialized with move semantics, <-
cloneSemantics (0x2) - Initialized with clone semantics, :=
- bitfield ExprFieldDerefFlags
dereferencing properties of the ExprField object.
- Fields
unsafeDeref (0x1) - Dereference without safety checking.
ignoreCaptureConst (0x2) - Ignore capture const, i.e. was captured as constant - but used as mutable.
- bitfield ExprFieldFieldFlags
field properties of the ExprField object.
- Fields
r2v (0x1) - Reference to value conversion is applied.
r2cr (0x2) - Read to const reference is propagated.
write (0x4) - This is part of a write operation, and a field or part of it is being assigned to.
no_promotion (0x8) - No promotion to property, even if available.
under_clone (0x10) - Under clone, i.e. ‘Foo.bar := …’
- bitfield ExprSwizzleFieldFlags
properties of the ExprSwizzle object.
- Fields
r2v (0x1) - Reference to value conversion is applied.
r2cr (0x2) - Read to const reference is propagated.
write (0x4) - This is part of a write operation, and a field or part of it is being assigned to.
- bitfield ExprYieldFlags
properties of the ExprYield object.
- Fields
moveSemantics (0x1) - Its ‘yield <- …’.
skipLockCheck (0x2) - Skip lock checks.
- bitfield ExprReturnFlags
properties of the ExprReturn object.
- Fields
moveSemantics (0x1) - Its ‘return <- …’.
returnReference (0x2) - Return a reference. Function result is a reference.
returnInBlock (0x4) - Return in block, not in function.
takeOverRightStack (0x8) - Take over right stack, i.e its ‘return [MakeLocal]’ and temp stack value is allocated by return expression.
returnCallCMRES (0x10) - Return call CMRES, i.e. ‘return call(…)’.
returnCMRES (0x20) - Return CMRES, i.e. ‘return [MakeLocal]’ or ‘return [CmresVariable]’
fromYield (0x40) - From yield.
fromComprehension (0x80) - From comprehension.
skipLockCheck (0x100) - Skip lock checks.
- bitfield ExprMakeBlockFlags
properties of the ExprMakeBlock object.
- Fields
isLambda (0x1) - Is lambda, i.e. @(…) { … }
isLocalFunction (0x2) - Is a local function, i.e. @@(…) { … }
- bitfield CopyFlags
properties of the ExprCopy object.
- Fields
allowCopyTemp (0x1) - This copy is allowed to copy a temporary value.
takeOverRightStack (0x2) - Its ‘foo = [MakeLocal]’ and temp stack value is allocated by copy expression.
promoteToClone (0x4) - Promote to clone, i.e. this is ‘foo := bar’ and not ‘foo = bar’
- bitfield MoveFlags
Properties of the ExprMove object.
- Fields
skipLockCheck (0x1) - Skip lock checks.
takeOverRightStack (0x2) - Its ‘foo <- [MakeLocal]’ and temp stack value is allocated by move expression.
- bitfield IfFlags
properties of the ExprIf object.
- Fields
isStatic (0x1) - This is a ‘static_if’ or ‘static_elif’ expression.
doNotFold (0x2) - Do not fold this ‘if’ expression during compilation.
- ExpressionPtr = smart_ptr<Expression>
Smart pointer to Expression object.
- ProgramPtr = smart_ptr<Program>
Smart pointer to Program object.
- TypeDeclPtr = smart_ptr<TypeDecl>
Smart pointer to TypeDecl object.
- VectorTypeDeclPtr = dasvector`smart_ptr`TypeDecl
Smart pointer to das::vector<ExpressionPtr>.
- EnumerationPtr = smart_ptr<Enumeration>
Smart pointer to Enumeration object.
- StructurePtr = smart_ptr<Structure>
Smart pointer to Structure object.
- FunctionPtr = smart_ptr<Function>
Smart pointer to Function object.
- VariablePtr = smart_ptr<Variable>
Smart pointer to Variable object.
- MakeFieldDeclPtr = smart_ptr<MakeFieldDecl>
Smart pointer to MakeFieldDecl object.
- ExprMakeBlockPtr = smart_ptr<ExprMakeBlock>
Smart pointer to ‘ExprMakeBlock’.
- FunctionAnnotationPtr = smart_ptr<FunctionAnnotation>
Smart pointer to FunctionAnnotation object.
- StructureAnnotationPtr = smart_ptr<StructureAnnotation>
Smart pointer to StructureAnnotation object.
- EnumerationAnnotationPtr = smart_ptr<EnumerationAnnotation>
Smart pointer to EnumerationAnnotation object.
- PassMacroPtr = smart_ptr<PassMacro>
Smart pointer to PassMacro object.
- VariantMacroPtr = smart_ptr<VariantMacro>
Smart pointer to VariantMacro object.
- ReaderMacroPtr = smart_ptr<ReaderMacro>
Smart pointer to ReaderMacro object.
- CommentReaderPtr = smart_ptr<CommentReader>
Smart pointer to CommentReader object.
- CallMacroPtr = smart_ptr<CallMacro>
Smart pointer to CallMacro object.
- TypeInfoMacroPtr = smart_ptr<TypeInfoMacro>
Smart pointer to TypeInfoMacro object.
- ForLoopMacroPtr = smart_ptr<ForLoopMacro>
Smart pointer to ‘ForLoopMacro’.
- CaptureMacroPtr = smart_ptr<CaptureMacro>
Smart pointer to ‘CaptureMacro’.
- TypeMacroPtr = smart_ptr<TypeMacro>
Smart pointer to TypeMacro object.
- SimulateMacroPtr = smart_ptr<SimulateMacro>
Smart pointer to SimulateMacro object.
12.2. Enumerations
- CaptureMode
Enumeration with lambda variables capture modes.
- Values
capture_any = 0 - Unspecified capture mode (will try copy, then reference - and ask for unsafe).
capture_by_copy = 1 - Value is copied.
capture_by_reference = 2 - Reference to the original value is captured (this one is unsafe)
capture_by_clone = 3 - Value is cloned.
capture_by_move = 4 - Value is moved.
- SideEffects
Enumeration with all possible side effects of expression or function.
- Values
none = 0 - No side effects.
unsafe = 1 - Function is unsafe.
userScenario = 2 - [sideeffects] annotation to indicate side effects.
modifyExternal = 4 - Function may modify external state.
accessExternal = 4 - Access to external state.
modifyArgument = 8 - Function may modify argument values.
modifyArgumentAndExternal = 12 - Function may modify argument values and external state.
worstDefault = 12 - Function has all sideeffects, except for a user scenario. This is to bind functions, whith unknown sideeffects.
accessGlobal = 16 - Function may access global state (variables and such).
invoke = 32 - Function is using ‘invoke’, so we don’t know any additional side effects.
inferredSideEffects = 56 - Mask for all sideefects, which can be inferred from the code.
12.3. Handled structures
- ModuleLibrary
Object which holds list of Module and provides access to them.
- Expression
Any expression (base class).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
- TypeDecl
- TypeDecl implicit.canAot() : bool()
Returns whether the given type can be ahead-of-time compiled.
- TypeDecl implicit.isExprType() : bool()
Returns if somewhere in the type hierarchy the given type is an expression type.
- TypeDecl implicit.isSimpleType() : bool()
Returns if the given type is a simple type, and does not need resolve at infer time. Nor is it void.
- TypeDecl implicit.isArray() : bool()
Returns if the given type is an array type.
- TypeDecl implicit.isGoodIteratorType() : bool()
Returns if the given type is an iterator type.
- TypeDecl implicit.isGoodArrayType() : bool()
Returns if the given type is a dynamic array type.
- TypeDecl implicit.isGoodTableType() : bool()
Returns if the given type is a table type.
- TypeDecl implicit.isGoodBlockType() : bool()
Returns if the given type is a block type.
- TypeDecl implicit.isGoodFunctionType() : bool()
Returns if the given type is a function type.
- TypeDecl implicit.isGoodLambdaType() : bool()
Returns if the given type is a lambda type.
- TypeDecl implicit.isGoodTupleType() : bool()
Returns if the given type is a tuple type.
- TypeDecl implicit.isGoodVariantType() : bool()
Returns if the given type is a variant type.
- TypeDecl implicit.isVoid() : bool()
Returns if the given type is a void type.
- TypeDecl implicit.isAnyType() : bool()
Returns whether the given type is the Any type (C++ side vec4f, passed via standard interop).
- TypeDecl implicit.isRef() : bool()
Returns if the given type is a reference value.
- TypeDecl implicit.isRefType() : bool()
Returns if the given type is a reference type.
- TypeDecl implicit.canWrite() : bool()
Returns whether the given type can be written to.
- TypeDecl implicit.isAotAlias() : bool()
Returns if somewhere in the type definition it is an AOT alias type.
Returns if the given type is a shareable type.
- TypeDecl implicit.isIndex() : bool()
Returns if the given type is an index type.
- TypeDecl implicit.isBool() : bool()
Returns whether the given type is a boolean type.
- TypeDecl implicit.isInteger() : bool()
Returns if the given type is an integer type.
- TypeDecl implicit.isSignedInteger() : bool()
Returns if the given type is a signed integer type.
- TypeDecl implicit.isUnsignedInteger() : bool()
Returns if the given type is an unsigned integer type.
- TypeDecl implicit.isSignedIntegerOrIntVec() : bool()
Returns if the given type is a signed integer or signed integer vector type.
- TypeDecl implicit.isUnsignedIntegerOrIntVec() : bool()
Returns if the given type is an unsigned integer or unsigned integer vector type.
- TypeDecl implicit.isFloatOrDouble() : bool()
Returns if the given type is a float or double type.
- TypeDecl implicit.isNumeric() : bool()
Returns if the given type is a numeric type.
- TypeDecl implicit.isNumericComparable() : bool()
Returns if the given type is a numeric comparable type.
- TypeDecl implicit.isPointer() : bool()
Returns if the given type is a pointer type.
- TypeDecl implicit.isSmartPointer() : bool()
Returns if the given type is a smart pointer type.
- TypeDecl implicit.isVoidPointer() : bool()
Returns if the given type is a void pointer type.
- TypeDecl implicit.isIterator() : bool()
Returns if the given type is an iterator type.
- TypeDecl implicit.isEnum() : bool()
Returns if the given type is an enum type.
- TypeDecl implicit.isEnumT() : bool()
Returns if the given type’s base type is an enum type.
- TypeDecl implicit.isHandle() : bool()
Returns if the given type is a handle type, i.e. a C++ type exposed to DaScript via TypeAnnotation.
- TypeDecl implicit.isStructure() : bool()
Returns if the given type is a structure type.
- TypeDecl implicit.isClass() : bool()
Returns if the given type is a class type.
- TypeDecl implicit.isFunction() : bool()
Returns if the given type is a function type.
- TypeDecl implicit.isTuple() : bool()
Returns if the given type is a tuple type.
- TypeDecl implicit.isVariant() : bool()
Returns if the given type is a variant type.
- TypeDecl implicit.sizeOf() : int()
Returns the size of the given type in bytes.
- TypeDecl implicit.countOf() : int()
Returns the number of elements in the given type if it is a fixed array; otherwise, returns 1.
- TypeDecl implicit.alignOf() : int()
Returns the alignment requirement of the given type in bytes.
- TypeDecl implicit.baseSizeOf() : int()
Returns the size of the given type in bytes, not accounting for the fixed array dimensions.
- TypeDecl implicit.stride() : int()
Returns if the given type is a fixed array, return the size of its stride (indexed element) in bytes.
- TypeDecl implicit.tupleSize() : int()
Returns the size of the given tuple type in bytes.
- TypeDecl implicit.tupleAlign() : int()
Returns the alignment of the given tuple type in bytes.
- TypeDecl implicit.variantSize() : int()
Returns the size of the given variant type in bytes.
- TypeDecl implicit.variantAlign() : int()
Returns the alignment of the given variant type in bytes.
- TypeDecl implicit.canCopy() : bool()
Returns whether the given type can be copied.
- TypeDecl implicit.canMove() : bool()
Returns whether the given type can be moved.
- TypeDecl implicit.canClone() : bool()
Returns whether the given type can be cloned.
- TypeDecl implicit.canCloneFromConst() : bool()
Returns whether the given type can be cloned from a const instance.
- TypeDecl implicit.canNew() : bool()
Returns whether the given type can be instantiated via ‘new’ on the heap.
- TypeDecl implicit.canDeletePtr() : bool()
Returns whether the given type can have its pointer deleted.
- TypeDecl implicit.canDelete() : bool()
Returns whether the given type can be deleted.
- TypeDecl implicit.needDelete() : bool()
Returns if the given type requires deletion.
- TypeDecl implicit.isPod() : bool()
Returns if the given type is a pod (plain old data) type.
- TypeDecl implicit.isRawPod() : bool()
Returns if the given type is a raw pod (plain old data without any pointers or strings) type.
- TypeDecl implicit.isNoHeapType() : bool()
Returns if the given type is a no-heap type, i.e. can be used without heap allocation.
- TypeDecl implicit.isWorkhorseType() : bool()
Returns if the given type is a workhorse type, which is a built-in non-ref type.
- TypeDecl implicit.isPolicyType() : bool()
Returns if the given type is a policy type, i.e. there are SimNodes available for it.
- TypeDecl implicit.isVecPolicyType() : bool()
Returns if the given type is a vector policy type, which is any policy type which is not a string.
- TypeDecl implicit.isReturnType() : bool()
Returns if the given type is a return type (basically anything but block).
- TypeDecl implicit.isCtorType() : bool()
Returns if the given basic type is a constructor type, i.e. can be constructed via type name, for example int(3.4)
- TypeDecl implicit.isRange() : bool()
Returns if the given type is a range type.
- TypeDecl implicit.isString() : bool()
Returns if the given type is a string type.
- TypeDecl implicit.isConst() : bool()
Returns if the given type is a const type.
- TypeDecl implicit.isFoldable() : bool()
Returns if the given type is a foldable type, like integer or float and unlike pointer or array.
- TypeDecl implicit.isAlias() : bool()
Returns of somehwere in the type definition it is an alias type.
- TypeDecl implicit.isAutoArrayResolved() : bool()
Returns if the fixed array dimensions are fully resolved (no ‘auto’ or expression dimensions).
- TypeDecl implicit.isAuto() : bool()
Returns if somewhere in the type definition there is an auto type.
- TypeDecl implicit.isAutoOrAlias() : bool()
Returns if somewhere in the type definition there is an auto or alias type.
- TypeDecl implicit.isVectorType() : bool()
Returns if the given type is a vector type, like int2 float3, or range64.
- TypeDecl implicit.isBitfield() : bool()
Returns whether the given type is a bitfield.
- TypeDecl implicit.isLocal() : bool()
Returns if the given type is a local type, i.e. can be allocated on stack.
- TypeDecl implicit.hasClasses() : bool()
Returns whether somewhere in the type definition there are classes.
- TypeDecl implicit.hasNonTrivialCtor() : bool()
Returns whether somewhere in the type definition there are non-trivial constructors.
- TypeDecl implicit.hasNonTrivialDtor() : bool()
Returns if somehwere in the type definition there are non-trivial destructors.
- TypeDecl implicit.hasNonTrivialCopy() : bool()
Returns if somehwere in the type definition there are non-trivial copy operations.
- TypeDecl implicit.canBePlacedInContainer() : bool()
Returns whether the given type can be placed in a container.
- TypeDecl implicit.vectorBaseType() : Type()
Returns the base type of a vector type, e.g. for vector4 it returns float.
- TypeDecl implicit.vectorDim() : int()
Returns the dimension of a vector type, e.g. for vector4 it returns 4.
- TypeDecl implicit.canInitWithZero() : bool()
Returns whether the given type can be initialized with zero (i.e. memset its memory to zero).
- TypeDecl implicit.rangeBaseType() : Type()
Returns the base type of a range type, e.g. for range64 it returns int64.
- TypeDecl implicit.unsafeInit() : bool()
Returns if the given type requires initialization, and its unsafe to skip it.
- TypeDecl implicit.get_mnh() : uint64()
Returns mangled name hash for the given type.
- Properties
canAot : bool
isExprType : bool
isSimpleType : bool
isArray : bool
isGoodIteratorType : bool
isGoodArrayType : bool
isGoodTableType : bool
isGoodBlockType : bool
isGoodFunctionType : bool
isGoodLambdaType : bool
isGoodTupleType : bool
isGoodVariantType : bool
isVoid : bool
isAnyType : bool
isRef : bool
isRefType : bool
canWrite : bool
isAotAlias : bool
isShareable : bool
isIndex : bool
isBool : bool
isInteger : bool
isSignedInteger : bool
isUnsignedInteger : bool
isSignedIntegerOrIntVec : bool
isUnsignedIntegerOrIntVec : bool
isFloatOrDouble : bool
isNumeric : bool
isNumericComparable : bool
isPointer : bool
isSmartPointer : bool
isVoidPointer : bool
isIterator : bool
isEnum : bool
isEnumT : bool
isHandle : bool
isStructure : bool
isClass : bool
isFunction : bool
isTuple : bool
isVariant : bool
sizeOf : int
countOf : int
alignOf : int
baseSizeOf : int
stride : int
tupleSize : int
tupleAlign : int
variantSize : int
variantAlign : int
canCopy : bool
canMove : bool
canClone : bool
canCloneFromConst : bool
canNew : bool
canDeletePtr : bool
canDelete : bool
needDelete : bool
isPod : bool
isRawPod : bool
isNoHeapType : bool
isWorkhorseType : bool
isPolicyType : bool
isVecPolicyType : bool
isReturnType : bool
isCtorType : bool
isRange : bool
isString : bool
isConst : bool
isFoldable : bool
isAlias : bool
isAutoArrayResolved : bool
isAuto : bool
isAutoOrAlias : bool
isVectorType : bool
isBitfield : bool
isLocal : bool
hasClasses : bool
hasNonTrivialCtor : bool
hasNonTrivialDtor : bool
hasNonTrivialCopy : bool
canBePlacedInContainer : bool
vectorBaseType : Type
vectorDim : int
canInitWithZero : bool
rangeBaseType : Type
unsafeInit : bool
get_mnh : uint64
Any type declaration.
- Fields
baseType : Type - Basic declaration type
structType : Structure ? - Structure type if baseType is Type::tStructure
enumType : Enumeration ? - Enumeration type if baseType is Type::tEnumeration
annotation : TypeAnnotation ? - Handled type if baseType is Type::tHandle
firstType : smart_ptr< TypeDecl > - First type for compound types (like array<firstType> or table<firstType, secondType>)
secondType : smart_ptr< TypeDecl > - Second type for compound types (like table<firstType, secondType>)
argTypes : vector<smart_ptr<TypeDecl>> - Argument types for function types, tuples, variants, etc
argNames : vector<das_string> - Argument names for function types
dim : vector<int> - Dimensions for fixed array types
dimExpr : vector<smart_ptr<Expression>> - Dimension expressions for fixed array types, when dimension is specified by expression
flags : TypeDeclFlags - Type declaration flags
alias : das_string - Alias name for typedefs, i.e. ‘int aka MyInt’ or ‘MyInt’
at : LineInfo - Location of the type declaration in the source code
_module : Module ? - Module this type belongs to
- Structure
- Structure implicit.sizeOf() : int()
Returns the size of the given type in bytes.
- Properties
sizeOf : int
Structure declaration.
- Fields
name : das_string - Name of the structure
fields : vector<FieldDeclaration> - Field declarations of the structure
at : LineInfo - Location of the structure declaration in the source code
_module : Module ? - Module this structure belongs to
parent : Structure ? - Parent structure, if any
annotations : AnnotationList - List of annotations attached to this structure
flags : StructureFlags - Structure flags
- FieldDeclaration
Structure field declaration.
- Fields
name : das_string - Name of the field
_type : smart_ptr< TypeDecl > - Type of the field
init : smart_ptr< Expression > - Expression for field initializer, if any
annotation : AnnotationArgumentList - Annotations attached to this field
at : LineInfo - Location of the field declaration in the source code
offset : int - Offset of the field in the structure
flags : FieldDeclarationFlags - Field flags
- EnumEntry
Entry in the enumeration.
- Fields
name : das_string - Name of the enumeration entry
cppName : das_string - C++ name of the enumeration entry
at : LineInfo - Location of the enumeration entry in the source code
value : smart_ptr< Expression > - Value of the enumeration entry (typicall ‘ExprConst’ derivative)
- Enumeration
Enumeration declaration.
- Fields
name : das_string - Name of the enumeration
cppName : das_string - C++ name of the enumeration
at : LineInfo - Location of the enumeration declaration in the source code
list : vector<EnumEntry> - List of entries in the enumeration
_module : Module ? - Module this enumeration belongs to
external : bool - Weather this enumeration is external (defined on the C++ side)
baseType : Type - Enumeration underlying type (int8, int16, int, or int64)
annotations : AnnotationList - Annotations attached to this enumeration
isPrivate : bool - Is this enumeration private (not visible from outside the module)
- Function
- Function implicit.origin() : Function?()
Returns the origin function, i.e. which generic it came from (if any).
- Function implicit.getMangledNameHash() : uint64()
Returns mangled name hash for the given function.
- Function implicit.isGeneric() : bool()
Returns if the given function is a generic function.
- Properties
origin : Function ?
getMangledNameHash : uint64
isGeneric : bool
Function declaration.
- Fields
annotations : AnnotationList - Annotations attached to this function
name : das_string - Name of the function
arguments : vector<smart_ptr<Variable>> - Arguments of the function
result : smart_ptr< TypeDecl > - Result type of the function
body : smart_ptr< Expression > - Body expression of the function (usually ‘ExprBlock’ but can be optimized out on later stages)
index : int - Index of the function in the ‘Context’
totalStackSize : uint - Stack size required for this function
totalGenLabel : int - Number of generated labels in the jump table (for the generator)
at : LineInfo - Location of the function in the source code
atDecl : LineInfo - Location of the function declaration in the source code
_module : Module ? - Module this function belongs to
classParent : Structure ? - Parent structure if this is a method
flags : FunctionFlags - Function flags
moreFlags : MoreFunctionFlags - More function flags
sideEffectFlags : FunctionSideEffectFlags - Function side effect flags
inferStack : vector<InferHistory> - Inference history
fromGeneric : smart_ptr< Function > - If this function was instantiated from a generic function, pointer to the generic function
hash : uint64 - Hash of the function signature
aotHash : uint64 - Hash of the function signature for AOT purposes
- BuiltInFunction
Bindings for the ‘BuiltInFunction’, which is used for the builtin (bound) functions in Daslang.
- Fields
annotations : AnnotationList - Annotations attached to this function
name : das_string - Name of the function
arguments : vector<smart_ptr<Variable>> - Arguments of the function
result : smart_ptr< TypeDecl > - Result type of the function
body : smart_ptr< Expression > - Body expression of the function (null just about every time for the builtins)
index : int - Index of the function in the ‘Context’
totalStackSize : uint - Stack size required for this function
totalGenLabel : int - Number of generated labels in the jump table (for the generator)
at : LineInfo - Location of the function in the source code
atDecl : LineInfo - Location of the function declaration in the source code
_module : Module ? - Module this function belongs to
classParent : Structure ? - Parent structure if this is a method
flags : FunctionFlags - Function flags
moreFlags : MoreFunctionFlags - More function flags
sideEffectFlags : FunctionSideEffectFlags - Function side effect flags
inferStack : vector<InferHistory> - Inference history
fromGeneric : smart_ptr< Function > - If this function was instantiated from a generic function, pointer to the generic function
hash : uint64 - Hash of the function signature
aotHash : uint64 - Hash of the function signature for AOT purposes
cppName : das_string - C++ function name.
- ExternalFnBase
Base class for external function bindings. Bindings for the ‘BuiltInFunction’, which is used for the builtin (bound) functions in Daslang.
- Fields
annotations : AnnotationList - Annotations attached to this function
name : das_string - Name of the function
arguments : vector<smart_ptr<Variable>> - Arguments of the function
result : smart_ptr< TypeDecl > - Result type of the function
body : smart_ptr< Expression > - Body expression of the function (null just about every time for the external functions)
index : int - Index of the function in the ‘Context’
totalStackSize : uint - Stack size required for this function
totalGenLabel : int - Number of generated labels in the jump table (for the generator)
at : LineInfo - Location of the function in the source code
atDecl : LineInfo - Location of the function declaration in the source code
_module : Module ? - Module this function belongs to
classParent : Structure ? - Parent structure if this is a method
flags : FunctionFlags - Function flags
moreFlags : MoreFunctionFlags - More function flags
sideEffectFlags : FunctionSideEffectFlags - Function side effect flags
inferStack : vector<InferHistory> - Inference history
fromGeneric : smart_ptr< Function > - If this function was instantiated from a generic function, pointer to the generic function
hash : uint64 - Hash of the function signature
aotHash : uint64 - Hash of the function signature for AOT purposes
cppName : das_string - C++ function name.
- InferHistory
Generic function infer history.
- Fields
- Variable
- Variable implicit.isAccessUnused() : bool()
Returns whether the given variable is never accessed in the code.
- Variable implicit.getMangledNameHash() : uint64()
Returns mangled name hash for the given function.
- Properties
isAccessUnused : bool
getMangledNameHash : uint64
Variable declaration.
- Fields
name : das_string - Name of the variable
_aka : das_string - Alternative name of the variable
_type : smart_ptr< TypeDecl > - Type of the variable
init : smart_ptr< Expression > - Initializer expression for the variable, if any
source : smart_ptr< Expression > - If its an iterator variable for the for loop, source expression being iterated over
at : LineInfo - Location of the variable declaration in the source code
index : int - Index of the variable in the global variable list (for global variables)
stackTop : uint - Stack top offset for local variables
_module : Module ? - Module this variable belongs to
initStackSize : uint - Stack size required to evaluate the initializer expression (for global variables)
flags : VariableFlags - Variable flags
access_flags : VariableAccessFlags - Variable access flags
annotation : AnnotationArgumentList - Annotations attached to this variable
- AstContext
Lexical context for the particular expression.
- Fields
func : smart_ptr< Function > - Function this expression belongs to
_loop : vector<smart_ptr<Expression>> - Loop stack
blocks : vector<smart_ptr<Expression>> - Stack of active blocks
scopes : vector<smart_ptr<Expression>> - Stack of active scopes
_with : vector<smart_ptr<Expression>> - Stack of active ‘with’ expressions
- ExprBlock
Any block expression, including regular blocks and all types of closures.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
list : vector<smart_ptr<Expression>> - List of expressions in the main body of the block
finalList : vector<smart_ptr<Expression>> - List of expressions in the ‘finally’ section of the block
returnType : smart_ptr< TypeDecl > - Declared return type of the block, if any (for closures)
arguments : vector<smart_ptr<Variable>> - List of arguments for the block (for closures)
stackTop : uint - Stack top offset for the block declaration
stackVarTop : uint - Where variables of the block start on the stack
stackVarBottom : uint - Where variables of the block end on the stack
stackCleanVars : vector<pair`uint`uint> - Variables which are to be zeroed, if there is ‘finally’ section of the block. If there is ‘inscope’ variable after the return, it should be zeroed before entering the block.
maxLabelIndex : int - Maximum label index used in this block (for goto statements)
annotations : AnnotationList - AnnotationList - Annotations attached to this block
annotationData : uint64 - Opaque data associated with block
annotationDataSid : uint64 - Opaque data source unique-ish id associated with block
blockFlags : ExprBlockFlags - Block expression flags
inFunction : Function ? - Which function this block belongs to
- ExprLet
Local variable declaration (let v = expr;).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
variables : vector<smart_ptr<Variable>> - List of variables being declared in this let expression
atInit : LineInfo - Location of the initializer expression in source code
letFlags : ExprLetFlags - Properties of the ExprLet object.
- ExprStringBuilder
String builder expression (“blah{blah1}blah2”).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
elements : vector<smart_ptr<Expression>> - List of expressions that make up the string builder (literals and expressions)
stringBuilderFlags : StringBuilderFlags - Flags specific to string builder expressions
- MakeFieldDecl
Part of ExprMakeStruct, declares single field (a = expr or a <- expr etc)
- Fields
at : LineInfo - Location of the expression in source code
name : das_string - Name of the field being assigned
value : smart_ptr< Expression > - Initializer expression for the field
tag : smart_ptr< Expression > - Tag associated with the field, if any
flags : MakeFieldDeclFlags - Flags specific to this field declaration
- ExprNamedCall
Named call (call([argname1=expr1, argname2=expr2])).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the named call
nonNamedArguments : vector<smart_ptr<Expression>> - Non-named arguments passed to the call
arguments : MakeStruct - Named arguments passed to the call
argumentsFailedToInfer : bool - Whether any arguments failed to infer their types
- ExprLooksLikeCall
Anything which looks like call (call(expr1,expr2)).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call
arguments : vector<smart_ptr<Expression>> - List of arguments passed to the call
argumentsFailedToInfer : bool - Whether any arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
- ExprCallFunc
Actual function call (func(expr1,…)).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the called function
arguments : vector<smart_ptr<Expression>> - Arguments passed to the function
argumentsFailedToInfer : bool - Whether any arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Pointer to the function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
- ExprNew
New expression (new Foo, new Bar(expr1..), but NOT new [[Foo …]])
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the new expression
arguments : vector<smart_ptr<Expression>> - List of arguments passed to the constructor
argumentsFailedToInfer : bool - Whether any arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Pointer to the constructor function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
typeexpr : smart_ptr< TypeDecl > - Type expression for the type being constructed
initializer : bool - Whether there is an initializer for the new expression, or it’s just default construction
- ExprCall
Anything which looks like call (call(expr1,expr2)).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call
arguments : vector<smart_ptr<Expression>> - List of arguments passed to the function
argumentsFailedToInfer : bool - Whether any arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Pointer to the function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
doesNotNeedSp : bool - If the call does not need stack pointer
cmresAlias : bool - If the call uses CMRES (Copy or Move result) aliasing, i.e would need temporary
notDiscarded : bool - If the call result is not discarded
- ExprPtr2Ref
Pointer dereference (*expr or deref(expr)).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Expression being dereferenced
unsafeDeref : bool - If true, skip runtime null-pointer check
assumeNoAlias : bool - If true, assume no aliasing occurs
- ExprNullCoalescing
Null coalescing (expr1 ?? default_value).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Expression being coalesced
unsafeDeref : bool - If true, skip runtime null-pointer check
assumeNoAlias : bool - Assume no aliasing occurs
defaultValue : smart_ptr< Expression > - Default value expression
- ExprAt
Index lookup (expr[expr1]).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Subexpression being indexed
index : smart_ptr< Expression > - Index expression
atFlags : ExprAtFlags - Flags specific to ExprAt expressions
- ExprSafeAt
Safe index lookup (expr?[expr1]).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Subexpression being indexed
index : smart_ptr< Expression > - Index expression
atFlags : ExprAtFlags - Flags specific to ExprAt expressions
- ExprIs
Is expression for variants and such (expr is Foo).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Subexpression being checked
typeexpr : smart_ptr< TypeDecl > - Type being checked against
- ExprOp
Compilation time only base class for any operator.
- ExprOp2
Two operand operator (expr1 + expr2)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call (unsued)
arguments : vector<smart_ptr<Expression>> - Arguments (unused)
argumentsFailedToInfer : bool - If arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
op : das_string - Name of the operator
left : smart_ptr< Expression > - Left operand expression
right : smart_ptr< Expression > - Right operand expression
- ExprOp3
Three operand operator (cond ? expr1 : expr2)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call (unsued)
arguments : vector<smart_ptr<Expression>> - Arguments (unused)
argumentsFailedToInfer : bool - If arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
op : das_string - Name of the operator
subexpr : smart_ptr< Expression > - Condition expression
left : smart_ptr< Expression > - Left operand expression
right : smart_ptr< Expression > - Right operand expression
- ExprCopy
Copy operator (expr1 = expr2)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call (unsued)
arguments : vector<smart_ptr<Expression>> - Arguments (unused)
argumentsFailedToInfer : bool - If arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
op : das_string - Name of the operator
left : smart_ptr< Expression > - Left operand expression
right : smart_ptr< Expression > - Right operand expression
copy_flags : CopyFlags - Flags specific to copy operation
- ExprMove
Move operator (expr1 <- expr2)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call (unsued)
arguments : vector<smart_ptr<Expression>> - Arguments (unused)
argumentsFailedToInfer : bool - If arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
op : das_string - Name of the operator
left : smart_ptr< Expression > - Left operand expression
right : smart_ptr< Expression > - Right operand expression
move_flags : MoveFlags - Flags specific to move operation
- ExprClone
Clone operator (expr1 := expr2)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the call (unsued)
arguments : vector<smart_ptr<Expression>> - Arguments (unused)
argumentsFailedToInfer : bool - If arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Function being called, if resolved
stackTop : uint - Stack top at the point of call, if temporary variable allocation is needed
op : das_string - Name of the operator
left : smart_ptr< Expression > - Left operand expression
right : smart_ptr< Expression > - Right operand expression
- ExprWith
With section (with expr {your; block; here}).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
_with : smart_ptr< Expression > - The expression to be used as the context for the with block
body : smart_ptr< Expression > - The body of the with block
- ExprAssume
Assume expression (assume name = expr) or (typedef name = type).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
alias : das_string - The alias name for the assume expression
subexpr : smart_ptr< Expression > - The expression being aliased, if specified
assumeType : smart_ptr< TypeDecl > - The type being assumed, if specified
- ExprWhile
While loop (while expr {your; block; here;})
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
cond : smart_ptr< Expression > - The condition expression
body : smart_ptr< Expression > - The body of the while loop
- ExprTryCatch
Try-recover expression (try {your; block; here;} recover {your; recover; here;})
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
try_block : smart_ptr< Expression > - The try block
catch_block : smart_ptr< Expression > - The recover block
- ExprIfThenElse
If-then-else expression (if expr1 {your; block; here;} else {your; block; here;}) including static_if’s.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
cond : smart_ptr< Expression > - The condition expression
if_true : smart_ptr< Expression > - The ‘then’ block expression
if_false : smart_ptr< Expression > - The ‘else’ block expression
if_flags : IfFlags - Flags specific to if-then-else expressions
- ExprFor
For loop (for expr1 in expr2 {your; block; here;})
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
iterators : vector<das_string> - Names of the iterator variables
iteratorsAka : vector<das_string> - Aliases for the iterator variables
iteratorsAt : vector<LineInfo> - Line information for each iterator
iteratorsTags : vector<smart_ptr<Expression>> - Tags associated with each iterator
iteratorsTupleExpansion : vector<uint8> - Tuple expansion flags for iterators
iteratorVariables : vector<smart_ptr<Variable>> - Variables associated with each iterator
sources : vector<smart_ptr<Expression>> - Source expressions to iterate over
body : smart_ptr< Expression > - The body of the for loop
visibility : LineInfo - Line information for visibility of the iterators
allowIteratorOptimization : bool - Whether iterator optimization is allowed
canShadow : bool - Whether shadowing is allowed, i.e. if the iterator names can shadow outer scope variables
- ExprMakeLocal
Any make expression (ExprMakeBlock, ExprMakeTuple, ExprMakeVariant, ExprMakeStruct)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
makeType : smart_ptr< TypeDecl > - Type being made
stackTop : uint - Stack top offset for the data, if applicable
extraOffset : uint - Extra offset for the data, if applicable. If part of the larger initialization, extra offset is that
makeFlags : ExprMakeLocalFlags - Flags specific to make-local expressions
- ExprMakeStruct
ake structure expression ([[YourStruct v1=expr1elem1, v2=expr2elem1, …; v1=expr1elem2, … ]])
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
makeType : smart_ptr< TypeDecl > - Type being made
stackTop : uint - Stack top offset for the data, if applicable
extraOffset : uint - Extra offset for the data, if applicable. If part of the larger initialization, extra offset is that
makeFlags : ExprMakeLocalFlags - Flags specific to make-local expressions
structs : vector<smart_ptr<MakeStruct>> - Array of structures being made
_block : smart_ptr< Expression > - Optional block expression to run after the struct is made
constructor : Function ? - Constructor function to call, if any
makeStructFlags : ExprMakeStructFlags - Flags specific to make-struct expressions
- ExprMakeVariant
Make variant expression ([YourVariant variantName=expr1])
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
makeType : smart_ptr< TypeDecl > - Type being made
stackTop : uint - Stack top offset for the data, if applicable
extraOffset : uint - Extra offset for the data, if applicable. If part of the larger initialization, extra offset is that
makeFlags : ExprMakeLocalFlags - Flags specific to make-local expressions
variants : vector<smart_ptr<MakeFieldDecl>> - Array of variants being made
- ExprMakeArray
Make array expression ([[auto 1;2;3]] or [{auto “foo”;”bar”}] for static and dynamic arrays accordingly). Location of the expression in source code
- Fields
at : LineInfo - Type of the expression
_type : smart_ptr< TypeDecl > - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
__rtti : string - Expression generation flags
genFlags : ExprGenFlags - Expression flags
flags : ExprFlags - Expression print flags
printFlags : ExprPrintFlags - Type being made
makeType : smart_ptr< TypeDecl > - Stack top offset for the data, if applicable
stackTop : uint - Extra offset for the data, if applicable. If part of the larger initialization, extra offset is that
extraOffset : uint - Flags specific to make-local expressions
makeFlags : ExprMakeLocalFlags - Type of the array elements
recordType : smart_ptr< TypeDecl > - Array of expressions for the elements
values : vector<smart_ptr<Expression>> - If gen2 syntax is used (i.e. […] instead of [[…]])
gen2 : bool
- ExprMakeTuple
Make tuple expression ([[auto f1,f2,f3]])
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
makeType : smart_ptr< TypeDecl > - Type being made
stackTop : uint - Stack top offset for the data, if applicable
extraOffset : uint - Extra offset for the data, if applicable. If part of the larger initialization, extra offset is that
makeFlags : ExprMakeLocalFlags - Flags specific to make-local expressions
recordType : smart_ptr< TypeDecl > - Type of the array elements
values : vector<smart_ptr<Expression>> - Array of expressions for the elements
gen2 : bool - If gen2 syntax is used (i.e. […] instead of [[…]])
isKeyValue : bool - If key-value syntax is used (i.e. [key=>val; key2=>val2])
- ExprArrayComprehension
Array comprehension ([for (x in 0..3); x], [iterator for (y in range(100)); x*2; where (x!=13)]] for arrays or generators accordingly).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
exprFor : smart_ptr< Expression > - The ‘for’ expression
exprWhere : smart_ptr< Expression > - The ‘where’ expression
subexpr : smart_ptr< Expression > - The subexpression
generatorSyntax : bool - If generator syntax is used (i.e. [iterator for …] instead of [for])
tableSyntax : bool - If table syntax is used (i.e. {for …} instead of [for])
- TypeInfoMacro
Compilation time only structure which holds live information about typeinfo expression for the specific macro.
- Fields
name : das_string - The name of the macro
_module : Module ? - The module where the macro is defined
- ExprTypeInfo
typeinfo() expression (typeinfo dim(a), typeinfois_ref_type<int&>())
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
trait : das_string - The trait name
subexpr : smart_ptr< Expression > - The expression being queried for type information
typeexpr : smart_ptr< TypeDecl > - The type expression being queried for type information
subtrait : das_string - The sub-trait name
extratrait : das_string - The extra trait name
macro : TypeInfoMacro ? - The macro associated with the typeinfo expression
- ExprTypeDecl
typedecl() expression (typedecl(1+2))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
typeexpr : smart_ptr< TypeDecl > - The type expression being queried for type information
- ExprLabel
Label (label 13:)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
labelName : int - The label name
comment : das_string - The label comment
- ExprGoto
Goto expression (goto label 13, goto x)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
labelName : int - Label to go to, if specified
subexpr : smart_ptr< Expression > - Expression evaluating to label to go to, if specified
- ExprRef2Value
Compilation time only structure which holds reference to value conversion for the value types, i.e. goes from int& to int and such.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - The sub-expression being converted from reference to value
- ExprRef2Ptr
Addr expresion (addr(expr))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - The sub-expression being converted from pointer to reference
- ExprAddr
Function address (@@foobarfunc or @@foobarfunc<(int;int):bool>)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
target : das_string - Name of the function being referenced
funcType : smart_ptr< TypeDecl > - Type of the function being referenced
func : Function ? - Function being referenced (if resolved)
- ExprAssert
Assert expression (assert(x<13), or assert(x<13, “x is too big”), or verify(foo()!=0))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the asserted expression
arguments : vector<smart_ptr<Expression>> - Arguments of the assert expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the assert is used
isVerify : bool - Whether the assert is a verify expression (verify expressions have to have sideeffects, assert expressions cant)
- ExprQuote
Compilation time expression which holds its subexpressions but does not infer them (quote() <| x+5)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the query expression
arguments : vector<smart_ptr<Expression>> - Arguments of the query expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the query is used
- ExprStaticAssert
Static assert expression (static_assert(x<13) or static_assert(x<13, “x is too big”))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the static_assert expression
arguments : vector<smart_ptr<Expression>> - Arguments of the static_assert expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the static_assert is used
- ExprDebug
Debug expression (debug(x) or debug(x,”x=”))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the debug expression
arguments : vector<smart_ptr<Expression>> - Arguments of the debug expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the debug is used
- ExprInvoke
- ExprInvoke implicit.isCopyOrMove() : bool()
Returns if the given invoke expression requires copy or move of a ref type.
- Properties
isCopyOrMove : bool
Invoke expression (invoke(fn) or invoke(lamb, arg1, arg2, …))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the invoke expression
arguments : vector<smart_ptr<Expression>> - Arguments of the invoke expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the invoke is used
stackTop : uint - Stack top for invoke, if applicable
doesNotNeedSp : bool - Does not need stack pointer
isInvokeMethod : bool - Is invoke of class method
cmresAlias : bool - If true, then CMRES aliasing is allowed for this invoke (and stack will be allocated)
- ExprErase
Erase expression (erase(tab,key))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the erase expression
arguments : vector<smart_ptr<Expression>> - Arguments of the erase expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the erase is used
- ExprSetInsert
Set insert expression, i.e. tab |> insert(key).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the set-insert expression
arguments : vector<smart_ptr<Expression>> - Arguments of the set-insert expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the set-insert is used
- ExprFind
Find expression (find(tab,key) <| { your; block; here; })
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the find expression
arguments : vector<smart_ptr<Expression>> - Arguments of the find expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the find is used
- ExprKeyExists
Key exists expression (key_exists(tab,key))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the key-exists expression
arguments : vector<smart_ptr<Expression>> - Arguments of the key-exists expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the key-exists is used
- ExprAscend
New expression for ExprMakeLocal (new [[Foo fld=val,…]] or new [[Foo() fld=…]], but NOT new Foo())
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Subexpression being ascended (newed)
ascType : smart_ptr< TypeDecl > - Type being made
stackTop : uint - Location on the stack where the temp object is created, if necessary
ascendFlags : ExprAscendFlags - Flags specific to ExprAscend expressions
- ExprCast
Any cast expression (cast<int> a, upcast<Foo> b or reinterpret<Bar?> c)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - Subexpression being cast
castType : smart_ptr< TypeDecl > - Type to which the expression is being cast
castFlags : ExprCastFlags - Flags specific to ExprCast expressions
- ExprDelete
Delete expression (delete blah)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - The expression being deleted
sizeexpr : smart_ptr< Expression > - The size expression for deleting classes. This one determines how big instance is to be deleted.
native : bool - True if the delete is native, and not to be expanded at compilation time.
- ExprVar
Variable access (foo)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - The name of the variable
variable : smart_ptr< Variable > - The variable being accessed
pBlock : ExprBlock ? - The block in which the variable is accessed (if any)
argumentIndex : int - The argument index of the variable (if variable is an argument of a function or a block)
varFlags : ExprVarFlags - The flags of the variable
- ExprTag
Compilation time only tag expression, used for reification. For example $c(….).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - The subexpression of the tag
value : smart_ptr< Expression > - Value of the tag
name : das_string - Name of the tag
- ExprSwizzle
Vector swizzle operatrion (vec.xxy or vec.y)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
value : smart_ptr< Expression > - Value being swizzled
mask : das_string - Swizzle mask
fields : vector<uint8> - Swizzle fields
fieldFlags : ExprSwizzleFieldFlags - Flags specific to ExprSwizzle expressions
- ExprField
- ExprField implicit.field() : FieldDeclaration?()
Returns pointer to a field of a structure, or null if the field does not exist or its not a structure.
- Properties
field : FieldDeclaration ?
Field lookup (foo.bar)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
value : smart_ptr< Expression > - Subexpression whose field is being accessed
name : das_string - Name of the field being accessed
atField : LineInfo - Location of the field access in source code
fieldIndex : int - Index of the field in the type’s field list
annotation : smart_ptr< TypeAnnotation > - Type annotation for the field
derefFlags : ExprFieldDerefFlags - Flags for dereferencing operations
fieldFlags : ExprFieldFieldFlags - Flags specific to field access expressions
- ExprSafeField
Safe field lookup (foo?.bar)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
value : smart_ptr< Expression > - Subexpression whose field is being accessed
name : das_string - Name of the field being accessed
atField : LineInfo - Location of the field access in source code
fieldIndex : int - Index of the field in the type’s field list
annotation : smart_ptr< TypeAnnotation > - Type annotation for the field
derefFlags : ExprFieldDerefFlags - Flags for dereferencing operations
fieldFlags : ExprFieldFieldFlags - Flags specific to field access expressions
skipQQ : bool - If true the subexpression is already a pointer and no additional dereference is needed
- ExprIsVariant
Is expression (foo is bar) Location of the expression in source code
- Fields
at : LineInfo - Type of the expression
_type : smart_ptr< TypeDecl > - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
__rtti : string - Expression generation flags
genFlags : ExprGenFlags - Expression flags
flags : ExprFlags - Expression print flags
printFlags : ExprPrintFlags - Subexpression whose field is being accessed
value : smart_ptr< Expression > - Name of the field being accessed
name : das_string - Location of the field access in source code
atField : LineInfo - Index of the field in the type’s field list
fieldIndex : int - Type annotation for the field
annotation : smart_ptr< TypeAnnotation > - Flags for dereferencing operations
derefFlags : ExprFieldDerefFlags - Flags specific to field access expressions
fieldFlags : ExprFieldFieldFlags
- ExprAsVariant
As expression (foo as bar)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
value : smart_ptr< Expression > - Subexpression whose field is being accessed
name : das_string - Name of the field being accessed
atField : LineInfo - Location of the field access in source code
fieldIndex : int - Index of the field in the type’s field list
annotation : smart_ptr< TypeAnnotation > - Type annotation for the field
derefFlags : ExprFieldDerefFlags - Flags for dereferencing operations
fieldFlags : ExprFieldFieldFlags - Flags specific to field access expressions
- ExprSafeAsVariant
Safe as expression (foo? as bar)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
value : smart_ptr< Expression > - Subexpression whose field is being accessed
name : das_string - Name of the field being accessed
atField : LineInfo - Location of the field access in source code
fieldIndex : int - Index of the field in the type’s field list
annotation : smart_ptr< TypeAnnotation > - Type annotation for the field
derefFlags : ExprFieldDerefFlags - Flags for dereferencing operations
fieldFlags : ExprFieldFieldFlags - Flags specific to field access expressions
skipQQ : bool - If true the subexpression is already a pointer and no additional dereference is needed
- ExprOp1
Single operator expression (+a or -a or !a or ~a)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the operator (unused)
arguments : vector<smart_ptr<Expression>> - Arguments of the operator (unused)
argumentsFailedToInfer : bool - Whether arguments failed to infer
atEnclosure : LineInfo - Location of the expression in source code
func : Function ? - Function associated with the expression
stackTop : uint - Stack top position if temporary variable allocation is needed
op : das_string - Name of the operator
subexpr : smart_ptr< Expression > - That one argument of the operator
- ExprReturn
Return expression (return or return foo, or return <- foo)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - The expression being returned (if any)
returnFlags : ExprReturnFlags - Return flags
stackTop : uint - Stack top position if temporary variable allocation is needed
refStackTop : uint - Reference stack top position if temporary variable allocation is needed
returnFunc : Function ? - Function associated with the return expression
_block : ExprBlock ? - Block associated with the return expression
- ExprYield
Yield expression (yield foo or yeild <- bar)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
subexpr : smart_ptr< Expression > - The expression being yielded (never empty)
returnFlags : ExprYieldFlags - Yield flags
- ExprBreak
Break expression (break)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
- ExprContinue
Continue expression (continue)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
- ExprConst
Compilation time constant expression base class
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression
- ExprFakeContext
Compilation time only fake context expression. Will simulate as current evaluation Context.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::fakeContext)
- ExprFakeLineInfo
- ExprFakeLineInfo implicit.getValue() : void?()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : void?
Compilation time only fake lineinfo expression. Will simulate as current file and line LineInfo.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::fakeLineInfo)
value : void? - Pointer to the LineInfo, as void?
- ExprConstPtr
- ExprConstPtr implicit.getValue() : void?()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : void?
Null (null). Technically can be any other pointer, but it is used for nullptr.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression
value : void? - Pointer value. Typically this is ‘null’ constant, so the value is zero.
- ExprConstInt8
- ExprConstInt8 implicit.getValue() : int8()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int8
Holds int8 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt8)
value : int8 - Value of the constant expression
- ExprConstInt16
- ExprConstInt16 implicit.getValue() : int16()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int16
Holds int16 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt16)
value : int16 - Value of the constant expression
- ExprConstInt64
- ExprConstInt64 implicit.getValue() : int64()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int64
Holds int64 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt64)
value : int64 - Value of the constant expression
- ExprConstInt
- ExprConstInt implicit.getValue() : int()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int
Holds int constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt)
value : int - Value of the constant expression
- ExprConstInt2
- ExprConstInt2 implicit.getValue() : int2()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int2
Holds int2 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt2)
value : int2 - Value of the constant expression
- ExprConstInt3
- ExprConstInt3 implicit.getValue() : int3()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int3
Holds int3 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt3)
value : int3 - Value of the constant expression
- ExprConstInt4
- ExprConstInt4 implicit.getValue() : int4()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : int4
Holds int4 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tInt4)
value : int4 - Value of the constant expression
- ExprConstUInt8
- ExprConstUInt8 implicit.getValue() : uint8()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint8
Holds uint8 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt8)
value : uint8 - Value of the constant expression
- ExprConstUInt16
- ExprConstUInt16 implicit.getValue() : uint16()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint16
Holds uint16 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt16)
value : uint16 - Value of the constant expression
- ExprConstUInt64
- ExprConstUInt64 implicit.getValue() : uint64()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint64
Holds uint64 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt64)
value : uint64 - Value of the constant expression
- ExprConstUInt
- ExprConstUInt implicit.getValue() : uint()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint
Holds uint constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt)
value : uint - Value of the constant expression
- ExprConstUInt2
- ExprConstUInt2 implicit.getValue() : uint2()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint2
Holds uint2 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt2)
value : uint2 - Value of the constant expression
- ExprConstUInt3
- ExprConstUInt3 implicit.getValue() : uint3()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint3
Holds uint3 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt3)
value : uint3 - Value of the constant expression
- ExprConstUInt4
- ExprConstUInt4 implicit.getValue() : uint4()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint4
Holds uint4 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tUInt4)
value : uint4 - Value of the constant expression
- ExprConstRange
- ExprConstRange implicit.getValue() : range()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : range
Holds range constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tRange)
value : range - Value of the constant expression
- ExprConstURange
- ExprConstURange implicit.getValue() : urange()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : urange
Holds urange constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tURange)
value : urange - Value of the constant expression
- ExprConstRange64
- ExprConstRange64 implicit.getValue() : range64()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : range64
Holds range64 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tRange64)
value : range64 - Value of the constant expression
- ExprConstURange64
- ExprConstURange64 implicit.getValue() : urange64()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : urange64
Holds urange64 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tURange64)
value : urange64 - Value of the constant expression
- ExprConstFloat
- ExprConstFloat implicit.getValue() : float()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : float
Holds float constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tFloat)
value : float - Value of the constant expression
- ExprConstFloat2
- ExprConstFloat2 implicit.getValue() : float2()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : float2
Holds float2 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tFloat2)
value : float2 - Value of the constant expression
- ExprConstFloat3
- ExprConstFloat3 implicit.getValue() : float3()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : float3
Holds float3 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tFloat3)
value : float3 - Value of the constant expression
- ExprConstFloat4
- ExprConstFloat4 implicit.getValue() : float4()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : float4
Holds float4 constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tFloat4)
value : float4 - Value of the constant expression
- ExprConstDouble
- ExprConstDouble implicit.getValue() : double()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : double
Holds double constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tDouble)
value : double - Value of the constant expression
- ExprConstBool
- ExprConstBool implicit.getValue() : bool()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : bool
Holds bool constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tBool)
value : bool - Value of the constant expression
- CaptureEntry
Single entry in lambda capture.
- Fields
name : das_string - Name of the captured variable
mode : CaptureMode - How the variable is captured (by value, by reference, etc.)
- ExprMakeBlock
Any closure. Holds block as well as capture information in CaptureEntry.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
_capture : vector<CaptureEntry> - List of captured variables
_block : smart_ptr< Expression > - The block expression
stackTop : uint - Stack top for the block
mmFlags : ExprMakeBlockFlags - Expression generation flags
aotFunctorName : das_string - Name of the AOT functor (if applicable)
- ExprMakeGenerator
Generator closure (generator<int> or generator<Foo&>)
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the AOT functor (if applicable)
arguments : vector<smart_ptr<Expression>> - Arguments passed to the generator
argumentsFailedToInfer : bool - Whether arguments failed to infer
atEnclosure : LineInfo - Location of the enclosure
iterType : smart_ptr< TypeDecl > - Iterator type, i.e. type of values produced by the generated iterator
_capture : vector<CaptureEntry> - List of captured variables
- ExprMemZero
Memzero (memzero(expr))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the set-insert expression
arguments : vector<smart_ptr<Expression>> - Arguments of the set-insert expression
argumentsFailedToInfer : bool - Whether the arguments failed to infer types
atEnclosure : LineInfo - Location of the enclosure where the set-insert is used
- ExprConstEnumeration
Holds enumeration constant, both type and entry (Foo bar).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tEnumeration, Type::tEnumeration8, Type::tEnumeration16, or Type::tEnumeration64)
enumType : smart_ptr< Enumeration > - Enumeration type declaration
value : das_string - Value of the constant expression
- ExprConstBitfield
- ExprConstBitfield implicit.getValue() : uint64()
Returns the pointer value to the LineInfo * associated with the expression, as a void pointer.
- Properties
getValue : uint64
Holds bitfield constant (Foo bar).
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tBitfield, Type::tBitfield8, Type::tBitfield16, or Type::tBitfield64)
value : bitfield<> - Value of the constant expression
bitfieldType : smart_ptr< TypeDecl > - Type declaration of the bitfield
- ExprConstString
Holds string constant.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
baseType : Type - Base type of the constant expression (Type::tString)
value : das_string - Value of the constant expression
- ExprUnsafe
Unsafe expression (unsafe(addr(x)))
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
body : smart_ptr< Expression > - Body expression that is marked as unsafe
- VisitorAdapter
Adapter for the AstVisitor interface.
- FunctionAnnotation
Adapter for the AstFunctionAnnotation.
- StructureAnnotation
Adapter for the AstStructureAnnotation.
- EnumerationAnnotation
Adapater for the AstEnumearationAnnotation.
- PassMacro
Adapter for the AstPassMacro.
- Fields
name : das_string - Name of the macro
- ReaderMacro
Adapter for the AstReaderMacro.
- Fields
name : das_string - Name of the macro
_module : Module ? - Module where the macro is defined
- CommentReader
Adapter for the AstCommentReader.
- CallMacro
Adapter for the AstCallMacro.
- Fields
name : das_string - Name of the macro
_module : Module ? - Module where the macro is defined
- VariantMacro
Adapter for the AstVariantMacro.
- Fields
name : das_string - Name of the macro
- ForLoopMacro
Adapter for the ‘AstForLoopMacro’.
- Fields
name : das_string - Name of the macro
- CaptureMacro
Adapter for the AstCaptureMacro.
- Fields
name : das_string - Name of the macro
- TypeMacro
Compilation time only structure which holds live information about type macro.
- Fields
name : das_string - Name of the macro
- SimulateMacro
Adapter for the AstSimulateMacro.
- Fields
name : das_string - Name of the macro.
- ExprReader
Compilation time only expression which holds temporary information for the AstReaderMacro.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
macro : smart_ptr< ReaderMacro > - Macro which is attached to the context parser.
sequence : das_string - Sequence of characters being read.
- ExprCallMacro
Compilation time only expression which holds temporary infromation for the AstCallMacro.
- Fields
at : LineInfo - Location of the expression in source code
_type : smart_ptr< TypeDecl > - Type of the expression
__rtti : string - Runtime type information of the class of the expression (i.e “ExprConstant”, “ExprCall”, etc)
genFlags : ExprGenFlags - Expression generation flags
flags : ExprFlags - Expression flags
printFlags : ExprPrintFlags - Expression print flags
name : das_string - Name of the macro being called
arguments : vector<smart_ptr<Expression>> - List of argument expressions
argumentsFailedToInfer : bool - If the arguments failed to infer their types
atEnclosure : LineInfo - Location of the expression in source code
macro : CallMacro ? - Call macro, if resolved
12.4. Call macros
- quote
Returns ast expression tree of the input, without evaluating or infering it.
12.5. Typeinfo macros
- ast_typedecl
Returns TypeDeclPtr of the type specified via type<> or subexpression type, for example typeinfo(ast_typedecl type<int?>)
- ast_function
Returns FunctionPtr to the function specified by subexrepssion, for example typeinfo(ast_function @@foo)
12.7. Classes
- AstFunctionAnnotation
Annotation macro which is attached to the Function.
- AstBlockAnnotation
Annotation macro which is attached to the ExprBlock.
- AstStructureAnnotation
Annotation macro which is attached to the Structure.
- AstPassMacro
This macro is used to implement custom infer passes.
- AstVariantMacro
This macro is used to implement custom is, as and ?as expressions.
- AstForLoopMacro
This macro is used to implement custom for-loop handlers. It is similar to visitExprFor callback of the AstVisitor.
- AstCaptureMacro
This macro is used to implement custom lambda capturing functionality.
- AstTypeMacro
Macro which is part of the type declaration, for example $type_macro_name<type_macro_type_args…>(type_macro_args).
- AstSimulateMacro
Macro which is attached to the context simulation.
- AstReaderMacro
This macro is used to implement custom parsing functionality, i.e. anything starting with %NameOfTheMacro~ and ending when the macro says it ends.
- AstCommentReader
This macro is used to implement custom comment parsing function (such as doxygen-style documentation etc).
- AstCallMacro
This macro is used to implement custom call-like expressions ( like foo(bar,bar2,…) ).
- AstTypeInfoMacro
This macro is used to implement type info traits, i.e. typeinfo(YourTraitHere …) expressions.
- AstEnumerationAnnotation
Annotation macro which is attached to Enumeration.
- AstVisitor
This class implements Visitor interface for the ast tree.
12.8. Call generation
- make_call(at: LineInfo implicit; name: string implicit) : smart_ptr<Expression>()
Creates appropriate call expression for the given call function name in the Program.
- Arguments
at : LineInfo implicit
name : string implicit
12.9. Visitor pattern
- visit(program: smart_ptr<Program> implicit; adapter: smart_ptr<VisitorAdapter> implicit)
Invokes visitor for the given object.
- Arguments
program : smart_ptr< Program > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit_modules(program: smart_ptr<Program> implicit; adapter: smart_ptr<VisitorAdapter> implicit)
Invokes visitor for the given list of modules inside the Program.
- Arguments
program : smart_ptr< Program > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit_module(program: smart_ptr<Program> implicit; adapter: smart_ptr<VisitorAdapter> implicit; module: Module? implicit)
Invokes visitor for the given module.
- Arguments
program : smart_ptr< Program > implicit
adapter : smart_ptr< VisitorAdapter > implicit
module : Module ? implicit
- visit(function: smart_ptr<Function> implicit; adapter: smart_ptr<VisitorAdapter> implicit)
Invokes visitor for the given object.
- Arguments
function : smart_ptr< Function > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit_enumeration(program: smart_ptr<Program> implicit; enumeration: smart_ptr<Enumeration> implicit; adapter: smart_ptr<VisitorAdapter> implicit)
Invokes visitor for the given enumeration.
- Arguments
program : smart_ptr< Program > implicit
enumeration : smart_ptr< Enumeration > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit_structure(program: smart_ptr<Program> implicit; structure: smart_ptr<Structure> implicit; adapter: smart_ptr<VisitorAdapter> implicit)
Invokes visitor for the given structure.
- Arguments
program : smart_ptr< Program > implicit
structure : smart_ptr< Structure > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit(expression: smart_ptr<Expression> implicit; adapter: smart_ptr<VisitorAdapter> implicit) : smart_ptr<Expression>()
Invokes visitor for the given object.
- Arguments
expression : smart_ptr< Expression > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit(expression: smart_ptr<TypeDecl> implicit; adapter: smart_ptr<VisitorAdapter> implicit) : smart_ptr<TypeDecl>()
Invokes visitor for the given object.
- Arguments
expression : smart_ptr< TypeDecl > implicit
adapter : smart_ptr< VisitorAdapter > implicit
- visit_finally(expression: smart_ptr<ExprBlock> implicit; adapter: smart_ptr<VisitorAdapter> implicit)
Calls visit on the finally section of the block.
- Arguments
expression : smart_ptr< ExprBlock > implicit
adapter : smart_ptr< VisitorAdapter > implicit
12.10. Expression generation
force_generated (expression: smart_ptr<Expression> const& implicit; value: bool)
force_generated (function: smart_ptr<Function> const& implicit; value: bool)
get_expression_annotation (expr: Expression? implicit) : Annotation?
make_type_info_structure (ctx: Context implicit; type: smart_ptr<TypeDecl> implicit) : TypeInfo?
- force_generated(expression: smart_ptr<Expression> const& implicit; value: bool)
Forces generated flag on subexrepssion.
- Arguments
expression : smart_ptr< Expression >& implicit
value : bool
- force_generated(function: smart_ptr<Function> const& implicit; value: bool)
Forces generated flag on subexrepssion.
- Arguments
function : smart_ptr< Function >& implicit
value : bool
- get_expression_annotation(expr: Expression? implicit) : Annotation?()
Get ‘Annotation’ for the ‘ast::Expression’ and its inherited types.
- Arguments
expr : Expression ? implicit
- make_type_info_structure(ctx: Context implicit; type: smart_ptr<TypeDecl> implicit) : TypeInfo?()
Returns new TypeInfo corresponding to the specific type.
12.11. Adapter generation
make_visitor (class: void? implicit; info: StructInfo const? implicit) : smart_ptr<VisitorAdapter>
make_clone_structure (structure: Structure? implicit) : smart_ptr<Function>
make_block_type (blk: ExprBlock? implicit) : smart_ptr<TypeDecl>
make_function_annotation (name: string; var someClassPtr: auto) : FunctionAnnotationPtr
make_block_annotation (name: string; var someClassPtr: auto) : FunctionAnnotationPtr
make_structure_annotation (name: string; var someClassPtr: auto) : StructureAnnotationPtr
make_enumeration_annotation (name: string; var someClassPtr: auto) : EnumerationAnnotationPtr
make_reader_macro (name: string; var someClassPtr: auto) : ReaderMacroPtr
make_comment_reader (name: string; var someClassPtr: auto) : CommentReaderPtr
make_call_macro (name: string; var someClassPtr: auto) : CallMacroPtr
make_typeinfo_macro (name: string; var someClassPtr: auto) : TypeInfoMacroPtr
make_pass_macro (name: string; var someClassPtr: auto) : PassMacroPtr
make_variant_macro (name: string; var someClassPtr: auto) : VariantMacroPtr
make_for_loop_macro (name: string; var someClassPtr: auto) : ForLoopMacroPtr
make_capture_macro (name: string; var someClassPtr: auto) : CaptureMacroPtr
make_type_macro (name: string; var someClassPtr: auto) : TypeMacroPtr
make_simulate_macro (name: string; var someClassPtr: auto) : SimulateMacroPtr
- make_visitor(class: void? implicit; info: StructInfo const? implicit) : smart_ptr<VisitorAdapter>()
Creates adapter for the AstVisitor interface.
- Arguments
class : void? implicit
info : StructInfo ? implicit
- make_function_annotation(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<FunctionAnnotation>()
Creates adapter for the AstFunctionAnnotation.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_block_annotation(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<FunctionAnnotation>()
Creates adapter for the AstBlockAnnotation.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_structure_annotation(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<StructureAnnotation>()
Creates adapter for the AstStructureAnnotation.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_enumeration_annotation(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<EnumerationAnnotation>()
Creates adapter for the AstEnumearationAnnotation.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_pass_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<PassMacro>()
Creates adapter for the AstPassMacro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_reader_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<ReaderMacro>()
Creates adapter for the AstReaderMacro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_comment_reader(class: void? implicit; info: StructInfo const? implicit) : smart_ptr<CommentReader>()
Creates adapter for the AstCommentReader.
- Arguments
class : void? implicit
info : StructInfo ? implicit
- make_call_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<CallMacro>()
Creates adapter for the AstCallMacro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_typeinfo_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<TypeInfoMacro>()
Creates adapter for the AstTypeInfo macro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_variant_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<VariantMacro>()
Creates adapter for the AstVariantMacro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_for_loop_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<ForLoopMacro>()
Creates adapter for the AstForLoopMacro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_capture_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<CaptureMacro>()
Creates adapter for the AstCaptureMacro.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_type_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<TypeMacro>()
Creates adapter for the ‘AstTypeMacro’ interface.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_simulate_macro(name: string implicit; class: void? implicit; info: StructInfo const? implicit) : smart_ptr<SimulateMacro>()
Creates adapter for the ‘AstSimulateMacro’ interface.
- Arguments
name : string implicit
class : void? implicit
info : StructInfo ? implicit
- make_clone_structure(structure: Structure? implicit) : smart_ptr<Function>()
Generates clone function for the given structure.
- Arguments
structure : Structure ? implicit
- make_type_info(helper: smart_ptr<DebugInfoHelper> implicit; info: TypeInfo? implicit; type: smart_ptr<TypeDecl> const& implicit) : TypeInfo?()
Generates TypeInfo? for the specified type, given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
info : TypeInfo ? implicit
type : smart_ptr< TypeDecl >& implicit
- make_variable_debug_info(helper: smart_ptr<DebugInfoHelper> implicit; var: Variable? implicit) : VarInfo?()
Generates VariableInfo? for the specified variable, given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
var : Variable ? implicit
- make_struct_variable_debug_info(helper: smart_ptr<DebugInfoHelper> implicit; st: Structure const? implicit; var: FieldDeclaration const? implicit) : VarInfo?()
Generates VariableInfo? for the specified structure field, given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
st : Structure ? implicit
var : FieldDeclaration ? implicit
- make_struct_debug_info(helper: smart_ptr<DebugInfoHelper> implicit; st: Structure const? implicit) : StructInfo?()
Generates StructInfo? for the specified structure, given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
st : Structure ? implicit
- make_function_debug_info(helper: smart_ptr<DebugInfoHelper> implicit; fn: Function const? implicit) : FuncInfo?()
Generates FunctInfo? for the specified function, given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
fn : Function ? implicit
- make_enum_debug_info(helper: smart_ptr<DebugInfoHelper> implicit; en: Enumeration const? implicit) : EnumInfo?()
Generates EnumInfo? for the specified enumeration, given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
en : Enumeration ? implicit
- make_invokable_type_debug_info(helper: smart_ptr<DebugInfoHelper> implicit; blk: smart_ptr<TypeDecl> implicit; at: LineInfo implicit) : FuncInfo?()
Generates FuncInfo? for the specified invokable type (lambda, block), given DebugInfoHelper.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
blk : smart_ptr< TypeDecl > implicit
at : LineInfo implicit
- make_block_type(blk: ExprBlock? implicit) : smart_ptr<TypeDecl>()
Generates TypeDeclPtr for the specified block or lambda type.
- Arguments
blk : ExprBlock ? implicit
- make_function_annotation(name: string; someClassPtr: auto) : FunctionAnnotationPtr()
Creates adapter for the AstFunctionAnnotation.
- Arguments
name : string
someClassPtr : auto
- make_block_annotation(name: string; someClassPtr: auto) : FunctionAnnotationPtr()
Creates adapter for the AstBlockAnnotation.
- Arguments
name : string
someClassPtr : auto
- make_structure_annotation(name: string; someClassPtr: auto) : StructureAnnotationPtr()
Creates adapter for the AstStructureAnnotation.
- Arguments
name : string
someClassPtr : auto
- make_enumeration_annotation(name: string; someClassPtr: auto) : EnumerationAnnotationPtr()
Creates adapter for the AstEnumearationAnnotation.
- Arguments
name : string
someClassPtr : auto
- make_visitor(someClass: auto) : smart_ptr<VisitorAdapter>()
Creates adapter for the AstVisitor interface.
- Arguments
someClass : auto
- make_reader_macro(name: string; someClassPtr: auto) : ReaderMacroPtr()
Creates adapter for the AstReaderMacro.
- Arguments
name : string
someClassPtr : auto
- make_comment_reader(name: string; someClassPtr: auto) : CommentReaderPtr()
Creates adapter for the AstCommentReader.
- Arguments
name : string
someClassPtr : auto
- make_call_macro(name: string; someClassPtr: auto) : CallMacroPtr()
Creates adapter for the AstCallMacro.
- Arguments
name : string
someClassPtr : auto
- make_typeinfo_macro(name: string; someClassPtr: auto) : TypeInfoMacroPtr()
Creates adapter for the AstTypeInfo macro.
- Arguments
name : string
someClassPtr : auto
- make_pass_macro(name: string; someClassPtr: auto) : PassMacroPtr()
Creates adapter for the AstPassMacro.
- Arguments
name : string
someClassPtr : auto
- make_variant_macro(name: string; someClassPtr: auto) : VariantMacroPtr()
Creates adapter for the AstVariantMacro.
- Arguments
name : string
someClassPtr : auto
- make_for_loop_macro(name: string; someClassPtr: auto) : ForLoopMacroPtr()
Creates adapter for the AstForLoopMacro.
- Arguments
name : string
someClassPtr : auto
- make_capture_macro(name: string; someClassPtr: auto) : CaptureMacroPtr()
Creates adapter for the AstCaptureMacro.
- Arguments
name : string
someClassPtr : auto
- make_type_macro(name: string; someClassPtr: auto) : TypeMacroPtr()
Creates adapter for the ‘AstTypeMacro’ interface.
- Arguments
name : string
someClassPtr : auto
- make_simulate_macro(name: string; someClassPtr: auto) : SimulateMacroPtr()
Creates adapter for the ‘AstSimulateMacro’ interface.
- Arguments
name : string
someClassPtr : auto
12.12. Adapter application
add_infer_macro (module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
add_dirty_infer_macro (module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
add_lint_macro (module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
add_global_lint_macro (module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
add_optimization_macro (module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
add_reader_macro (module: Module? implicit; annotation: smart_ptr<ReaderMacro>& implicit)
add_comment_reader (module: Module? implicit; reader: smart_ptr<CommentReader>& implicit)
add_call_macro (module: Module? implicit; annotation: smart_ptr<CallMacro>& implicit)
add_typeinfo_macro (module: Module? implicit; annotation: smart_ptr<TypeInfoMacro>& implicit)
add_variant_macro (module: Module? implicit; annotation: smart_ptr<VariantMacro>& implicit)
add_for_loop_macro (module: Module? implicit; annotation: smart_ptr<ForLoopMacro>& implicit)
add_capture_macro (module: Module? implicit; annotation: smart_ptr<CaptureMacro>& implicit)
add_type_macro (module: Module? implicit; annotation: smart_ptr<TypeMacro>& implicit)
add_simulate_macro (module: Module? implicit; annotation: smart_ptr<SimulateMacro>& implicit)
add_module_option (module: Module? implicit; option: string implicit; type: Type)
add_new_block_annotation (name: string; var someClassPtr: auto) : auto
add_new_function_annotation (name: string; var someClassPtr: auto) : auto
add_new_contract_annotation (name: string; var someClassPtr: auto) : auto
add_new_structure_annotation (name: string; var someClassPtr: auto) : auto
add_new_enumeration_annotation (name: string; var someClassPtr: auto) : auto
add_new_variant_macro (name: string; var someClassPtr: auto) : auto
add_new_for_loop_macro (name: string; var someClassPtr: auto) : auto
add_new_capture_macro (name: string; var someClassPtr: auto) : auto
add_new_type_macro (name: string; var someClassPtr: auto) : auto
add_new_simulate_macro (name: string; var someClassPtr: auto) : auto
add_new_reader_macro (name: string; var someClassPtr: auto) : auto
add_new_comment_reader (name: string; var someClassPtr: auto) : auto
add_new_call_macro (name: string; var someClassPtr: auto) : auto
add_new_typeinfo_macro (name: string; var someClassPtr: auto) : auto
add_new_infer_macro (name: string; var someClassPtr: auto) : auto
add_new_dirty_infer_macro (name: string; var someClassPtr: auto) : auto
add_new_lint_macro (name: string; var someClassPtr: auto) : auto
add_new_global_lint_macro (name: string; var someClassPtr: auto) : auto
add_new_optimization_macro (name: string; var someClassPtr: auto) : auto
- add_function_annotation(module: Module? implicit; annotation: smart_ptr<FunctionAnnotation>& implicit)
Adds function annotation to the given object. Calls apply if applicable.
- Arguments
module : Module ? implicit
annotation : smart_ptr< FunctionAnnotation >& implicit
- add_function_annotation(function: smart_ptr<Function> implicit; annotation: smart_ptr<FunctionAnnotation>& implicit)
Adds function annotation to the given object. Calls apply if applicable.
- Arguments
function : smart_ptr< Function > implicit
annotation : smart_ptr< FunctionAnnotation >& implicit
- add_function_annotation(function: smart_ptr<Function> implicit; annotation: smart_ptr<AnnotationDeclaration>& implicit)
Adds function annotation to the given object. Calls apply if applicable.
- Arguments
function : smart_ptr< Function > implicit
annotation : smart_ptr< AnnotationDeclaration >& implicit
- add_block_annotation(block: smart_ptr<ExprBlock> implicit; annotation: smart_ptr<FunctionAnnotation>& implicit)
Adds annotation declaration to the block.
- Arguments
block : smart_ptr< ExprBlock > implicit
annotation : smart_ptr< FunctionAnnotation >& implicit
- add_block_annotation(block: smart_ptr<ExprBlock> implicit; annotation: smart_ptr<AnnotationDeclaration>& implicit)
Adds annotation declaration to the block.
- Arguments
block : smart_ptr< ExprBlock > implicit
annotation : smart_ptr< AnnotationDeclaration >& implicit
- add_structure_annotation(module: Module? implicit; annotation: smart_ptr<StructureAnnotation>& implicit)
Adds structure annotation to the given object. Calls apply if applicable.
- Arguments
module : Module ? implicit
annotation : smart_ptr< StructureAnnotation >& implicit
- add_structure_annotation(structure: smart_ptr<Structure> implicit; annotation: smart_ptr<StructureAnnotation>& implicit)
Adds structure annotation to the given object. Calls apply if applicable.
- Arguments
structure : smart_ptr< Structure > implicit
annotation : smart_ptr< StructureAnnotation >& implicit
- add_structure_annotation(structure: smart_ptr<Structure> implicit; annotation: smart_ptr<AnnotationDeclaration>& implicit)
Adds structure annotation to the given object. Calls apply if applicable.
- Arguments
structure : smart_ptr< Structure > implicit
annotation : smart_ptr< AnnotationDeclaration >& implicit
- add_enumeration_annotation(module: Module? implicit; annotation: smart_ptr<EnumerationAnnotation>& implicit)
Adds enumeration annotation to the given object. Calls apply if applicable.
- Arguments
module : Module ? implicit
annotation : smart_ptr< EnumerationAnnotation >& implicit
- add_infer_macro(module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
Adds AstPassMacro adapter to the infer` pass.
- add_dirty_infer_macro(module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
Adds AstPassMacro adapter to the dirty infer pass.
- add_lint_macro(module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
Adds AstPassMacro adapter to the lint pass.
- add_global_lint_macro(module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
Adds AstPassMacro adapter to the global lint pass.
- add_optimization_macro(module: Module? implicit; annotation: smart_ptr<PassMacro>& implicit)
Adds AstPassMacro adapter to the optimization pass.
- add_reader_macro(module: Module? implicit; annotation: smart_ptr<ReaderMacro>& implicit)
Adds AstReaderMacro adapter to the specific module.
- Arguments
module : Module ? implicit
annotation : smart_ptr< ReaderMacro >& implicit
- add_comment_reader(module: Module? implicit; reader: smart_ptr<CommentReader>& implicit)
Adds AstCommentReader adapter to the specific module.
- Arguments
module : Module ? implicit
reader : smart_ptr< CommentReader >& implicit
- add_call_macro(module: Module? implicit; annotation: smart_ptr<CallMacro>& implicit)
Adds AstCallMacro adapter to the specific module.
- add_typeinfo_macro(module: Module? implicit; annotation: smart_ptr<TypeInfoMacro>& implicit)
Adds AstTypeInfo adapter to the specific module.
- Arguments
module : Module ? implicit
annotation : smart_ptr< TypeInfoMacro >& implicit
- add_variant_macro(module: Module? implicit; annotation: smart_ptr<VariantMacro>& implicit)
Adds AstVariantMacro to the specific module.
- Arguments
module : Module ? implicit
annotation : smart_ptr< VariantMacro >& implicit
- add_for_loop_macro(module: Module? implicit; annotation: smart_ptr<ForLoopMacro>& implicit)
Adds AstForLoopMacro to the specific module.
- Arguments
module : Module ? implicit
annotation : smart_ptr< ForLoopMacro >& implicit
- add_capture_macro(module: Module? implicit; annotation: smart_ptr<CaptureMacro>& implicit)
Adds AstCaptureMacro to the specific module.
- Arguments
module : Module ? implicit
annotation : smart_ptr< CaptureMacro >& implicit
- add_type_macro(module: Module? implicit; annotation: smart_ptr<TypeMacro>& implicit)
Adds ‘AstTypeMacro’ to the specific module.
- add_simulate_macro(module: Module? implicit; annotation: smart_ptr<SimulateMacro>& implicit)
Adds AstSimulateMacro to the specific module.
- Arguments
module : Module ? implicit
annotation : smart_ptr< SimulateMacro >& implicit
- add_module_option(module: Module? implicit; option: string implicit; type: Type)
Add module-specific option, which is accessible via “options” keyword.
- add_new_block_annotation(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstBlockAnnotation and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_function_annotation(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstFunctionAnnotation and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_contract_annotation(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstContractAnnotation and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_structure_annotation(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstStructureAnnotation and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_enumeration_annotation(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstEnumerationAnnotation and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_variant_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstVariantMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_for_loop_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstForLoopMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_capture_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstCaptureMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_type_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the ‘AstTypeMacro’ and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_simulate_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstSimulateMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_reader_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstReaderMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_comment_reader(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstCommentReader and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_call_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstCallMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_typeinfo_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstTypeInfoMacro and adds it to the current module.
- Arguments
name : string
someClassPtr : auto
- add_new_infer_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstPassMacro and adds it to the current module infer pass.
- Arguments
name : string
someClassPtr : auto
- add_new_dirty_infer_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstPassMacro and adds it to the current module dirty infer pass.
- Arguments
name : string
someClassPtr : auto
- add_new_lint_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstPassMacro and adds it to the current module lint pass.
- Arguments
name : string
someClassPtr : auto
- add_new_global_lint_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstPassMacro and adds it to the current module global lint pass.
- Arguments
name : string
someClassPtr : auto
- add_new_optimization_macro(name: string; someClassPtr: auto) : auto()
Makes adapter to the AstPassMacro and adds it to the current module optimization pass.
- Arguments
name : string
someClassPtr : auto
12.13. Adding objects to objects
add_enumeration_entry (enum: smart_ptr<Enumeration> implicit; name: string implicit) : int
add_function (module: Module? implicit; function: smart_ptr<Function>& implicit) : bool
add_generic (module: Module? implicit; function: smart_ptr<Function>& implicit) : bool
add_variable (module: Module? implicit; variable: smart_ptr<Variable>& implicit) : bool
add_keyword (module: Module? implicit; keyword: string implicit; needOxfordComma: bool) : bool
add_type_function (module: Module? implicit; keyword: string implicit) : bool
add_structure (module: Module? implicit; structure: smart_ptr<Structure>& implicit) : bool
add_alias (module: Module? implicit; structure: smart_ptr<TypeDecl>& implicit) : bool
add_module_require (module: Module? implicit; publicModule: Module? implicit; pub: bool) : bool
- add_enumeration_entry(enum: smart_ptr<Enumeration> implicit; name: string implicit) : int()
Adds entry to enumeration annotation.
- Arguments
enum : smart_ptr< Enumeration > implicit
name : string implicit
- add_function(module: Module? implicit; function: smart_ptr<Function>& implicit) : bool()
Adds function to a Module. Will return false on duplicates.
- add_generic(module: Module? implicit; function: smart_ptr<Function>& implicit) : bool()
Adds generic function to a Module. Will return false on duplicates.
- add_variable(module: Module? implicit; variable: smart_ptr<Variable>& implicit) : bool()
Adds variable to a Module. Will return false on duplicates.
- add_keyword(module: Module? implicit; keyword: string implicit; needOxfordComma: bool) : bool()
Adds new keyword. It can appear in the keyword <type> expr or keyword expr block syntax. See daslib/match as implementation example.
- Arguments
module : Module ? implicit
keyword : string implicit
needOxfordComma : bool
- add_type_function(module: Module? implicit; keyword: string implicit) : bool()
Adds type function keyword, i.e allow function call to have several type arguments first via the following syntax some_call<type_args>(regular_args).
- Arguments
module : Module ? implicit
keyword : string implicit
- add_structure(module: Module? implicit; structure: smart_ptr<Structure>& implicit) : bool()
Adds structure to a Module. Will return false on duplicates.
- add_alias(module: Module? implicit; structure: smart_ptr<TypeDecl>& implicit) : bool()
Adds type alias to the specified module.
- add_module_require(module: Module? implicit; publicModule: Module? implicit; pub: bool) : bool()
Add module dependencies similar to “require” keyword.
- add_structure_alias(structure: Structure? implicit; aliasName: string implicit; alias: smart_ptr<TypeDecl> const& implicit) : bool()
Adds an alias to a structure type in the AST. Its the ‘typedef’ in the structure body.
12.14. Program and module access
- this_program() : smart_ptr<Program>()
Program attached to the current context (or null if RTTI is disabled).
- this_module() : Module?()
Main module attached to the current context (will through if RTTI is disabled).
- compiling_program() : smart_ptr<Program>()
Currently compiling program.
- compiling_module() : Module?()
Currently compiling module.
12.15. Textual descriptions of the objects
- describe_typedecl(type: smart_ptr<TypeDecl> implicit; extra: bool; contracts: bool; module: bool) : string()
Returns description of the TypeDecl which should match corresponding Daslang type declaration.
- Arguments
type : smart_ptr< TypeDecl > implicit
extra : bool
contracts : bool
module : bool
- describe_typedecl_cpp(type: smart_ptr<TypeDecl> implicit; substitueRef: bool; skipRef: bool; skipConst: bool; redundantConst: bool; choose_smart_ptr: bool) : string()
Returns description of the TypeDecl which should match corresponding C++ type declaration.
- Arguments
type : smart_ptr< TypeDecl > implicit
substitueRef : bool
skipRef : bool
skipConst : bool
redundantConst : bool
choose_smart_ptr : bool
- describe_expression(expression: smart_ptr<Expression> implicit) : string()
Returns description of the Expression which should match corresponding Daslang code.
- Arguments
expression : smart_ptr< Expression > implicit
- describe_function(function: smart_ptr<Function> implicit) : string()
Returns description of the Function which should match corresponding Daslang function declaration.
- Arguments
function : smart_ptr< Function > implicit
- das_to_string(type: Type) : string()
Returns description (name) of the corresponding Type.
- Arguments
type : Type
- describe(decl: smart_ptr<TypeDecl>; extra: bool = true; contracts: bool = true; modules: bool = true) : auto()
Describes object and produces corresponding Daslang code as string.
- Arguments
decl : smart_ptr< TypeDecl >
extra : bool
contracts : bool
modules : bool
- describe_cpp(decl: smart_ptr<TypeDecl>; substitureRef: bool = false; skipRef: bool = false; skipConst: bool = false; redundantConst: bool = true; chooseSmartPtr: bool = true) : auto()
Describes TypeDecl and produces corresponding C++ code as a string.
- Arguments
decl : smart_ptr< TypeDecl >
substitureRef : bool
skipRef : bool
skipConst : bool
redundantConst : bool
chooseSmartPtr : bool
- describe(expr: smart_ptr<Expression>) : auto()
Describes object and produces corresponding Daslang code as string.
- Arguments
expr : smart_ptr< Expression >
- describe(expr: smart_ptr<Function>) : auto()
Describes object and produces corresponding Daslang code as string.
- Arguments
expr : smart_ptr< Function >
12.16. Searching
find_call_macro (module: Module? implicit; name: string implicit) : CallMacro?
find_module_via_rtti (program: smart_ptr<Program> implicit; name: string implicit) : Module?
find_variable (module: Module? implicit; variable: string implicit) : smart_ptr<Variable>
find_bitfield_name (bit: smart_ptr<TypeDecl> implicit; value: bitfield) : string
find_enum_name (enum: Enumeration? implicit; value: int64) : string
find_enum_value (enum: smart_ptr<Enumeration> implicit; value: string implicit) : int64
find_enum_value (enum: Enumeration? implicit; value: string implicit) : int64
find_structure_field (structPtr: Structure? implicit; field: string implicit) : FieldDeclaration?
find_unique_structure (program: smart_ptr<Program> implicit; name: string implicit) : Structure?
find_module (prog: smart_ptr<Program>; name: string) : Module?
- find_call_macro(module: Module? implicit; name: string implicit) : CallMacro?()
Find CallMacro by name in the Module.
- Arguments
module : Module ? implicit
name : string implicit
- find_module_via_rtti(program: smart_ptr<Program> implicit; name: string implicit) : Module?()
Find module by name in the Program.
- Arguments
program : smart_ptr< Program > implicit
name : string implicit
- find_module_function_via_rtti(module: Module? implicit; function: function<():void>) : smart_ptr<Function>()
Find function by name in the Module.
- Arguments
module : Module ? implicit
function : function<void>
- find_variable(module: Module? implicit; variable: string implicit) : smart_ptr<Variable>()
Finds variable in the Module.
- Arguments
module : Module ? implicit
variable : string implicit
- find_matching_variable(program: Program? implicit; function: Function? implicit; name: string implicit; seePrivate: bool; block: block<(array<smart_ptr<Variable>>#):void>)
Finds global or shared variable in the given function, according to visibility and privacy rules.
- Arguments
- find_bitfield_name(bit: smart_ptr<TypeDecl> implicit; value: bitfield) : string()
Finds name of the corresponding bitfield value in the specified type.
- Arguments
bit : smart_ptr< TypeDecl > implicit
value : bitfield<>
- find_enum_name(enum: Enumeration? implicit; value: int64) : string()
Finds name of the corresponding enumeration value in the specified type.
- Arguments
enum : Enumeration ? implicit
value : int64
- find_enum_value(enum: smart_ptr<Enumeration> implicit; value: string implicit) : int64()
Finds name of the corresponding enumeration value in the specified type.
- Arguments
enum : smart_ptr< Enumeration > implicit
value : string implicit
- find_enum_value(enum: Enumeration? implicit; value: string implicit) : int64()
Finds name of the corresponding enumeration value in the specified type.
- Arguments
enum : Enumeration ? implicit
value : string implicit
- find_structure_field(structPtr: Structure? implicit; field: string implicit) : FieldDeclaration?()
Returns FieldDeclaration for the specific field of the structure type, or null if not found.
- Arguments
structPtr : Structure ? implicit
field : string implicit
- find_unique_structure(program: smart_ptr<Program> implicit; name: string implicit) : Structure?()
Find structure in the program with the specified name. If its unique - return it, otherwise null.
- Arguments
program : smart_ptr< Program > implicit
name : string implicit
- find_struct_field_parent(structure: smart_ptr<Structure> implicit; name: string implicit) : Structure const?()
Finds parent structure of the specified field declaration.
- Arguments
structure : smart_ptr< Structure > implicit
name : string implicit
- find_module(prog: smart_ptr<Program>; name: string) : Module?()
Finds Module in the Program.
- Arguments
prog : smart_ptr< Program >
name : string
- find_module(name: string) : Module?()
Finds Module in the Program.
- Arguments
name : string
- find_compiling_module(name: string) : Module?()
Finds Module in the currently compiling Program.
- Arguments
name : string
12.17. Iterating
for_each_module (program: Program? implicit; block: block<(Module?):void>)
for_each_module_no_order (program: Program? implicit; block: block<(Module?):void>)
any_array_foreach (array: void? implicit; stride: int; block: block<(void?):void>)
for_each_typedef (module: Module? implicit; block: block<(string#;smart_ptr<TypeDecl>):void>)
for_each_enumeration (module: Module? implicit; block: block<(smart_ptr<Enumeration>):void>)
for_each_structure (module: Module? implicit; block: block<(smart_ptr<Structure>):void>)
for_each_generic (module: Module? implicit; block: block<(smart_ptr<Function>):void>)
for_each_global (module: Module? implicit; block: block<(smart_ptr<Variable>):void>)
for_each_annotation_ordered (module: Module? implicit; block: block<(uint64;uint64):void>)
for_each_call_macro (module: Module? implicit; block: block<(string#):void>)
for_each_reader_macro (module: Module? implicit; block: block<(string#):void>)
for_each_variant_macro (module: Module? implicit; block: block<(smart_ptr<VariantMacro>):void>)
for_each_for_loop_macro (module: Module? implicit; block: block<(smart_ptr<ForLoopMacro>):void>)
for_each_typeinfo_macro (module: Module? implicit; block: block<(smart_ptr<TypeInfoMacro>):void>)
for_each_module_function (module: Module? implicit; blk: block<(smart_ptr<Function>):void>)
for_each_structure_alias (structure: Structure? implicit; block: block<(smart_ptr<TypeDecl>):void>)
- for_each_module(program: Program? implicit; block: block<(Module?):void>)
Iterates through each module in the program.
- for_each_module_no_order(program: Program? implicit; block: block<(Module?):void>)
Iterates through each module in the program in no particular order (in order they appear in libgroup).
- for_each_function(module: Module? implicit; name: string implicit; block: block<(smart_ptr<Function>):void>)
Iterates through each function in the given Module. If the name is empty matches all functions.
- Arguments
- for_each_generic(module: Module? implicit; name: string implicit; block: block<(smart_ptr<Function>):void>)
Iterates through each generic function in the given Module.
- Arguments
- any_table_foreach(table: void? implicit; keyStride: int; valueStride: int; block: block<(void?;void?):void>)
Iterates through any table<> type in a typeless fasion (via void?)
- Arguments
table : void? implicit
keyStride : int
valueStride : int
block : block<(void?;void?):void> implicit
- any_array_foreach(array: void? implicit; stride: int; block: block<(void?):void>)
Iterates through any array<> type in a typeless fasion (via void?)
- Arguments
array : void? implicit
stride : int
block : block<(void?):void> implicit
- for_each_typedef(module: Module? implicit; block: block<(string#;smart_ptr<TypeDecl>):void>)
Iterates through every typedef in the Module.
- for_each_enumeration(module: Module? implicit; block: block<(smart_ptr<Enumeration>):void>)
Iterates through every enumeration in the Module.
- Arguments
module : Module ? implicit
block : block<(smart_ptr< Enumeration >):void> implicit
- for_each_structure(module: Module? implicit; block: block<(smart_ptr<Structure>):void>)
Iterates through every structure in the Module.
- for_each_generic(module: Module? implicit; block: block<(smart_ptr<Function>):void>)
Iterates through each generic function in the given Module.
- for_each_global(module: Module? implicit; block: block<(smart_ptr<Variable>):void>)
Iterates through every global variable in the Module.
- for_each_annotation_ordered(module: Module? implicit; block: block<(uint64;uint64):void>)
Iterates through each annotation in the given module in the order they were added.
- Arguments
module : Module ? implicit
block : block<(uint64;uint64):void> implicit
- for_each_call_macro(module: Module? implicit; block: block<(string#):void>)
Iterates through every CallMacro adapter in the Module.
- Arguments
module : Module ? implicit
block : block<(string#):void> implicit
- for_each_reader_macro(module: Module? implicit; block: block<(string#):void>)
Iterates through each reader macro in the given Module.
- Arguments
module : Module ? implicit
block : block<(string#):void> implicit
- for_each_variant_macro(module: Module? implicit; block: block<(smart_ptr<VariantMacro>):void>)
Iterates through each variant macro in the given Module.
- Arguments
module : Module ? implicit
block : block<(smart_ptr< VariantMacro >):void> implicit
- for_each_for_loop_macro(module: Module? implicit; block: block<(smart_ptr<ForLoopMacro>):void>)
Iterates through each for loop macro in the given Module.
- Arguments
module : Module ? implicit
block : block<(smart_ptr< ForLoopMacro >):void> implicit
- for_each_typeinfo_macro(module: Module? implicit; block: block<(smart_ptr<TypeInfoMacro>):void>)
Iterates through each typeinfo macro in the given Module.
- Arguments
module : Module ? implicit
block : block<(smart_ptr< TypeInfoMacro >):void> implicit
- for_each_field(annotation: BasicStructureAnnotation implicit; block: block<(string;string;smart_ptr<TypeDecl>;uint):void>)
Iterates through every field in the BuiltinStructure handled type.
- Arguments
annotation : BasicStructureAnnotation implicit
block : block<(string;string;smart_ptr< TypeDecl >;uint):void> implicit
- for_each_module_function(module: Module? implicit; blk: block<(smart_ptr<Function>):void>)
Iterates through each function in the given module.
- for_each_structure_alias(structure: Structure? implicit; block: block<(smart_ptr<TypeDecl>):void>)
Iterates over all structure aliases defined in the given structure type and invokes the provided block for each alias.
12.18. Cloning
clone_structure (structure: Structure const? implicit) : smart_ptr<Structure>
clone_expression (expression: smart_ptr<Expression> implicit) : smart_ptr<Expression>
clone_function (function: smart_ptr<Function> implicit) : smart_ptr<Function>
clone_variable (variable: smart_ptr<Variable> implicit) : smart_ptr<Variable>
clone_type (type: smart_ptr<TypeDecl> implicit) : smart_ptr<TypeDecl>
clone_file_info (name: string implicit; tab_size: int) : FileInfo?
- clone_structure(structure: Structure const? implicit) : smart_ptr<Structure>()
Returns clone of the Structure.
- Arguments
structure : Structure ? implicit
- clone_expression(expression: smart_ptr<Expression> implicit) : smart_ptr<Expression>()
Clones Expression with subexpressions, including corresponding type.
- Arguments
expression : smart_ptr< Expression > implicit
- clone_function(function: smart_ptr<Function> implicit) : smart_ptr<Function>()
Clones Function and everything in it.
- Arguments
function : smart_ptr< Function > implicit
- clone_variable(variable: smart_ptr<Variable> implicit) : smart_ptr<Variable>()
Clones Variable and everything in it.
- Arguments
variable : smart_ptr< Variable > implicit
- clone_type(type: smart_ptr<TypeDecl> implicit) : smart_ptr<TypeDecl>()
Clones TypeDecl with subtypes.
- Arguments
type : smart_ptr< TypeDecl > implicit
- clone_file_info(name: string implicit; tab_size: int) : FileInfo?()
Clones FileInfo structure.
- Arguments
name : string implicit
tab_size : int
- clone_function(fn: Function?) : FunctionPtr()
Clones Function and everything in it.
- Arguments
fn : Function ?
12.19. Mangled name
- parse_mangled_name(txt: string implicit; lib: ModuleGroup implicit; thisModule: Module? implicit) : smart_ptr<TypeDecl>()
Parses mangled name and creates corresponding TypeDecl.
- Arguments
txt : string implicit
lib : ModuleGroup implicit
thisModule : Module ? implicit
- get_mangled_name(function: smart_ptr<Function> implicit) : string()
Returns mangled name of the object.
- Arguments
function : smart_ptr< Function > implicit
- get_mangled_name(type: smart_ptr<TypeDecl> implicit) : string()
Returns mangled name of the object.
- Arguments
type : smart_ptr< TypeDecl > implicit
- get_mangled_name(variable: smart_ptr<Variable> implicit) : string()
Returns mangled name of the object.
- Arguments
variable : smart_ptr< Variable > implicit
- get_mangled_name(variable: smart_ptr<ExprBlock> implicit) : string()
Returns mangled name of the object.
- Arguments
variable : smart_ptr< ExprBlock > implicit
- get_mangled_name(fn: Function?) : auto()
Returns mangled name of the object.
- Arguments
fn : Function ?
- get_mangled_name(decl: TypeDecl?) : auto()
Returns mangled name of the object.
- Arguments
decl : TypeDecl ?
- get_mangled_name(decl: Variable?) : auto()
Returns mangled name of the object.
- Arguments
decl : Variable ?
- get_mangled_name(decl: ExprBlock?) : auto()
Returns mangled name of the object.
- Arguments
decl : ExprBlock ?
12.20. Size and offset
- get_variant_field_offset(variant: smart_ptr<TypeDecl> implicit; index: int) : int()
Returns offset of the variant field in bytes.
- Arguments
variant : smart_ptr< TypeDecl > implicit
index : int
- get_tuple_field_offset(typle: smart_ptr<TypeDecl> implicit; index: int) : int()
Returns offset of the tuple field in bytes.
- Arguments
typle : smart_ptr< TypeDecl > implicit
index : int
- any_array_size(array: void? implicit) : int()
Returns array size from pointer to array<> object.
- Arguments
array : void? implicit
- any_table_size(table: void? implicit) : int()
Returns table size from pointer to the table<> object.
- Arguments
table : void? implicit
- get_handled_type_field_offset(type: smart_ptr<TypeAnnotation> implicit; field: string implicit) : uint()
Returns offset of the field in the ManagedStructure handled type.
- Arguments
type : smart_ptr< TypeAnnotation > implicit
field : string implicit
12.21. Evaluations
- eval_single_expression(expr: smart_ptr<Expression> const& implicit; ok: bool& implicit) : float4()
Warning
This is unsafe operation.
Simulates and evaluates single expression on the separate context.
- Arguments
expr : smart_ptr< Expression >& implicit
ok : bool& implicit
12.22. Error reporting
- macro_error(porogram: smart_ptr<Program> implicit; at: LineInfo implicit; message: string implicit)
Reports error to the currently compiling program to whatever current pass is.
12.23. Location and context
- force_at(expression: smart_ptr<Expression> const& implicit; at: LineInfo implicit)
Replaces line info in the expression, its subexpressions, and its types.
- Arguments
expression : smart_ptr< Expression >& implicit
at : LineInfo implicit
- force_at(function: smart_ptr<Function> const& implicit; at: LineInfo implicit)
Replaces line info in the expression, its subexpressions, and its types.
- collect_dependencies(function: smart_ptr<Function> implicit; block: block<(array<Function?>;array<Variable?>):void>)
Collects dependencies of the given function (other functions it calls, global variables it accesses).
- Arguments
- get_ast_context(program: smart_ptr<Program> implicit; expression: smart_ptr<Expression> implicit; block: block<(bool;AstContext):void>)
Returns AstContext for the given expression. It includes current function (if applicable), loops, blocks, scopes, and with sections.
- Arguments
program : smart_ptr< Program > implicit
expression : smart_ptr< Expression > implicit
block : block<(bool; AstContext ):void> implicit
12.24. Use queries
- get_use_global_variables(func: smart_ptr<Function> implicit; block: block<(smart_ptr<Variable>):void>)
Provides invoked block with the list of all global variables, used by a function.
- Arguments
- get_use_functions(func: smart_ptr<Function> implicit; block: block<(smart_ptr<Function>):void>)
Provides invoked block with the list of all functions, used by a function.
12.25. Log
- to_compilation_log(text: string implicit)
Writes to compilation log from macro during compilation.
- Arguments
text : string implicit
12.26. Removal
- remove_structure(module: Module? implicit; structure: smart_ptr<Structure>& implicit) : bool()
Removes structure declaration from the specified module.
12.27. Properties
is_temp_type (type: smart_ptr<TypeDecl> implicit; refMatters: bool) : bool
get_underlying_value_type (type: smart_ptr<TypeDecl> implicit) : smart_ptr<TypeDecl>
get_vector_ptr_at_index (vec: void? implicit; type: TypeDecl? implicit; idx: int) : void?
get_vector_length (vec: void? implicit; type: smart_ptr<TypeDecl> implicit) : int
has_field (type: smart_ptr<TypeDecl> implicit; fieldName: string implicit; constant: bool) : bool
is_visible_directly (from_module: Module? implicit; which_module: Module? implicit) : bool
is_expr_like_call (expression: smart_ptr<Expression> const& implicit) : bool
is_expr_const (expression: smart_ptr<Expression> const& implicit) : bool
get_function_aot_hash (fun: Function const? implicit) : uint64
get_function_hash_by_id (fun: Function? implicit; id: int; pctx: void? implicit) : uint64
get_aot_arg_suffix (func: Function? implicit; call: ExprCallFunc? implicit; argIndex: int) : string
get_aot_arg_prefix (func: Function? implicit; call: ExprCallFunc? implicit; argIndex: int) : string
get_aot_name (func: Function? implicit; call: ExprCallFunc? implicit) : string
- get_current_search_module(program: Program? implicit; function: Function? implicit; moduleName: string implicit) : Module?()
Returns the module which is currently being searched for the function, given module name. Resolves “”, “_”, “*”, and “__” correctly.
- can_access_global_variable(variable: smart_ptr<Variable> const& implicit; module: Module? implicit; thisModule: Module? implicit) : bool()
Returns true if global variable is accessible from the specified module.
- Arguments
- is_temp_type(type: smart_ptr<TypeDecl> implicit; refMatters: bool) : bool()
Returns true if type can be temporary.
- Arguments
type : smart_ptr< TypeDecl > implicit
refMatters : bool
- is_same_type(leftType: smart_ptr<TypeDecl> implicit; rightType: smart_ptr<TypeDecl> implicit; refMatters: RefMatters; constMatters: ConstMatters; tempMatters: TemporaryMatters) : bool()
Compares two types given comparison parameters and returns true if they match.
- Arguments
leftType : smart_ptr< TypeDecl > implicit
rightType : smart_ptr< TypeDecl > implicit
refMatters : RefMatters
constMatters : ConstMatters
tempMatters : TemporaryMatters
- get_underlying_value_type(type: smart_ptr<TypeDecl> implicit) : smart_ptr<TypeDecl>()
Returns Daslang type which is aliased with ManagedValue handled type.
- Arguments
type : smart_ptr< TypeDecl > implicit
- get_handled_type_field_type(type: smart_ptr<TypeAnnotation> implicit; field: string implicit) : TypeInfo?()
Returns type of the field in the ManagedStructure handled type.
- Arguments
type : smart_ptr< TypeAnnotation > implicit
field : string implicit
- get_handled_type_field_type_declaration(type: smart_ptr<TypeAnnotation> implicit; field: string implicit; isConst: bool) : smart_ptr<TypeDecl>()
Returns type declaration of the field in the ManagedStructure handled type.
- Arguments
type : smart_ptr< TypeAnnotation > implicit
field : string implicit
isConst : bool
- get_handled_type_index_type_declaration(type: TypeAnnotation? implicit; src: Expression? implicit; idx: Expression? implicit) : smart_ptr<TypeDecl>()
Returns type declaration of the index type in the handled type.
- Arguments
type : TypeAnnotation ? implicit
src : Expression ? implicit
idx : Expression ? implicit
- get_vector_ptr_at_index(vec: void? implicit; type: TypeDecl? implicit; idx: int) : void?()
Returns pointer to the vector element at the specified index, given pointer to the vector object and TypeDeclPtr.
- Arguments
vec : void? implicit
type : TypeDecl ? implicit
idx : int
- get_vector_length(vec: void? implicit; type: smart_ptr<TypeDecl> implicit) : int()
Returns length of the vector, given pointer to the vector object and TypeDeclPtr.
- Arguments
vec : void? implicit
type : smart_ptr< TypeDecl > implicit
- has_field(type: smart_ptr<TypeDecl> implicit; fieldName: string implicit; constant: bool) : bool()
Returns if structure, variant, tuple, or handled type or pointer to either of those has specific field.
- Arguments
type : smart_ptr< TypeDecl > implicit
fieldName : string implicit
constant : bool
- get_field_type(type: smart_ptr<TypeDecl> implicit; fieldName: string implicit; constant: bool) : smart_ptr<TypeDecl>()
Returns type of the field if structure, variant, tuple, or handled type or pointer to either of those has it. It’s null otherwise.
- Arguments
type : smart_ptr< TypeDecl > implicit
fieldName : string implicit
constant : bool
- is_visible_directly(from_module: Module? implicit; which_module: Module? implicit) : bool()
Returns true if module is visible directly from the other module.
- is_expr_like_call(expression: smart_ptr<Expression> const& implicit) : bool()
Returns true if expression is or inherited from ExprLooksLikeCall
- Arguments
expression : smart_ptr< Expression >& implicit
- is_expr_const(expression: smart_ptr<Expression> const& implicit) : bool()
Returns true if expression is or inherited from ExprConst
- Arguments
expression : smart_ptr< Expression >& implicit
- get_function_aot_hash(fun: Function const? implicit) : uint64()
Returns hash of the function for the AOT matching.
- Arguments
fun : Function ? implicit
- get_function_hash_by_id(fun: Function? implicit; id: int; pctx: void? implicit) : uint64()
Returns hash of the function by its unique id.
- Arguments
fun : Function ? implicit
id : int
pctx : void? implicit
- get_aot_arg_suffix(func: Function? implicit; call: ExprCallFunc? implicit; argIndex: int) : string()
Returns AOT argument suffix for the specified function.
- Arguments
func : Function ? implicit
call : ExprCallFunc ? implicit
argIndex : int
- get_aot_arg_prefix(func: Function? implicit; call: ExprCallFunc? implicit; argIndex: int) : string()
Returns AOT argument prefix for the specified function.
- Arguments
func : Function ? implicit
call : ExprCallFunc ? implicit
argIndex : int
- get_func_aot_prefix(ann: FunctionAnnotation? implicit; stg: StringBuilderWriter? implicit; call: ExprCallFunc? implicit)
Returns AOT function prefix for the specified function.
- Arguments
ann : FunctionAnnotation ? implicit
stg : StringBuilderWriter ? implicit
call : ExprCallFunc ? implicit
- get_struct_aot_prefix(ann: StructureAnnotation? implicit; structure: Structure? implicit; args: AnnotationArgumentList implicit; stg: StringBuilderWriter? implicit)
Returns AOT structure prefix for the specified structure.
- Arguments
ann : StructureAnnotation ? implicit
structure : Structure ? implicit
args : AnnotationArgumentList implicit
stg : StringBuilderWriter ? implicit
- get_aot_name(func: Function? implicit; call: ExprCallFunc? implicit) : string()
Returns AOT name for the specified function.
- Arguments
func : Function ? implicit
call : ExprCallFunc ? implicit
- is_same_type(argType: smart_ptr<TypeDecl> implicit; passType: smart_ptr<TypeDecl> implicit; refMatters: bool; constMatters: bool; temporaryMatters: bool; allowSubstitute: bool) : bool()
Compares two types given comparison parameters and returns true if they match.
- Arguments
- get_structure_alias(structure: Structure? implicit; aliasName: string implicit) : smart_ptr<TypeDecl>()
Finds and returns the structure alias type given alias name.
- Arguments
structure : Structure ? implicit
aliasName : string implicit
12.28. Infer
- infer_generic_type(type: smart_ptr<TypeDecl> implicit; passType: smart_ptr<TypeDecl> implicit; topLevel: bool; isPassType: bool) : smart_ptr<TypeDecl>()
Infers generic type for the specified type and pass type.
- Arguments
- update_alias_map(program: smart_ptr<Program> implicit; argType: smart_ptr<TypeDecl> implicit; passType: smart_ptr<TypeDecl> implicit)
Updates alias map for the specified infer.
12.29. Uncategorized
- module_find_annotation(module: Module const? implicit; name: string implicit) : smart_ptr<Annotation>()
Finds annotation of the specified type in the given module.
- Arguments
module : Module ? implicit
name : string implicit
- module_find_type_annotation(module: Module const? implicit; name: string implicit) : TypeAnnotation?()
Finds type annotation of the specified type in the given module.
- Arguments
module : Module ? implicit
name : string implicit
- not_inferred(function: Function? implicit)
Specifies that function has been modified via macro and should be inferred again.
- Arguments
function : Function ? implicit
- module_find_structure(program: Module const? implicit; name: string implicit) : Structure?()
Finds structure by name in the specified module.
- Arguments
program : Module ? implicit
name : string implicit
- debug_helper_iter_structs(helper: smart_ptr<DebugInfoHelper> implicit; blk: block<(string;StructInfo?):void>)
Iterates through all structures in the DebugInfoHelper, calling the provided block with each structure.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
blk : block<(string; StructInfo ?):void> implicit
- debug_helper_iter_types(helper: smart_ptr<DebugInfoHelper> implicit; blk: block<(string;TypeInfo?):void>)
Iterates through all types in the DebugInfoHelper, calling the provided block with each type.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
blk : block<(string; TypeInfo ?):void> implicit
- debug_helper_iter_vars(helper: smart_ptr<DebugInfoHelper> implicit; blk: block<(string;VarInfo?):void>)
Iterates through all variables in the DebugInfoHelper, calling the provided block with each variable.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
blk : block<(string; VarInfo ?):void> implicit
- debug_helper_iter_funcs(helper: smart_ptr<DebugInfoHelper> implicit; blk: block<(string;FuncInfo?):void>)
Iterates through all functions in the DebugInfoHelper, calling the provided block with each function.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
blk : block<(string; FuncInfo ?):void> implicit
- debug_helper_iter_enums(helper: smart_ptr<DebugInfoHelper> implicit; blk: block<(string;EnumInfo?):void>)
Iterates through all enumerations in the DebugInfoHelper, calling the provided block with each enumeration.
- Arguments
helper : smart_ptr< DebugInfoHelper > implicit
blk : block<(string; EnumInfo ?):void> implicit
- debug_helper_find_type_cppname(helper: smart_ptr<DebugInfoHelper> const& implicit; type_info: TypeInfo? implicit) : string()
Finds type in the DebugInfoHelper and returns it C++ name.
- Arguments
helper : smart_ptr< DebugInfoHelper >& implicit
type_info : TypeInfo ? implicit
- debug_helper_find_struct_cppname(helper: smart_ptr<DebugInfoHelper> const& implicit; struct_info: StructInfo? implicit) : string()
Finds structure in the DebugInfoHelper and returns it C++ name.
- Arguments
helper : smart_ptr< DebugInfoHelper >& implicit
struct_info : StructInfo ? implicit
- macro_aot_infix(macro: TypeInfoMacro? implicit; ss: StringBuilderWriter? implicit; expr: smart_ptr<Expression> implicit) : bool()
Returns true if macro requires AOT infix for the specified handled type.
- Arguments
macro : TypeInfoMacro ? implicit
ss : StringBuilderWriter ? implicit
expr : smart_ptr< Expression > implicit
- getInitSemanticHashWithDep(program: smart_ptr<Program> implicit; init: uint64) : uint64()
Returns initialization semantic hash including dependencies for the entire program.
- Arguments
program : smart_ptr< Program > implicit
init : uint64
- aot_require(mod: Module? implicit; ss: StringBuilderWriter? implicit) : bool()
Write data to the ‘require’ section of the AOT module.
- Arguments
mod : Module ? implicit
ss : StringBuilderWriter ? implicit
- aot_type_ann_get_field_ptr(ann: TypeAnnotation? implicit; ss: StringBuilderWriter? implicit; name: string implicit)
Returns string with access symbol for the field (like -> for the pointer types, or . for the value types).
- Arguments
ann : TypeAnnotation ? implicit
ss : StringBuilderWriter ? implicit
name : string implicit
- aot_need_type_info(macro: TypeInfoMacro const? implicit; expr: smart_ptr<Expression> implicit) : bool()
Returns true if TypeInfo? is needed for the specified type in ‘typeinfo’ expression.
- Arguments
macro : TypeInfoMacro ? implicit
expr : smart_ptr< Expression > implicit
- write_aot_body(structure: StructureAnnotation? implicit; st: smart_ptr<Structure> implicit; args: AnnotationArgumentList implicit; writer: StringBuilderWriter? implicit)
Writes AOT body for the specified StructureAnnotation.
- Arguments
structure : StructureAnnotation ? implicit
st : smart_ptr< Structure > implicit
args : AnnotationArgumentList implicit
writer : StringBuilderWriter ? implicit
- write_aot_suffix(structure: StructureAnnotation? implicit; st: smart_ptr<Structure> implicit; args: AnnotationArgumentList implicit; writer: StringBuilderWriter? implicit)
Writes AOT suffix for the specified StructureAnnotation.
- Arguments
structure : StructureAnnotation ? implicit
st : smart_ptr< Structure > implicit
args : AnnotationArgumentList implicit
writer : StringBuilderWriter ? implicit
- write_aot_macro_suffix(macro: TypeInfoMacro? implicit; ss: StringBuilderWriter? implicit; expr: smart_ptr<Expression> implicit)
Writes AOT macro suffix for the specified TypeInfoMacro.
- Arguments
macro : TypeInfoMacro ? implicit
ss : StringBuilderWriter ? implicit
expr : smart_ptr< Expression > implicit
- write_aot_macro_prefix(macro: TypeInfoMacro? implicit; ss: StringBuilderWriter? implicit; expr: smart_ptr<Expression> implicit)
Writes AOT macro prefix for the specified TypeInfoMacro.
- Arguments
macro : TypeInfoMacro ? implicit
ss : StringBuilderWriter ? implicit
expr : smart_ptr< Expression > implicit
- aot_previsit_get_field_ptr(ann: TypeAnnotation? implicit; ss: StringBuilderWriter? implicit; name: string implicit)
Previsit for getting field pointer in AOT generation.
- Arguments
ann : TypeAnnotation ? implicit
ss : StringBuilderWriter ? implicit
name : string implicit
- aot_previsit_get_field(ann: TypeAnnotation? implicit; ss: StringBuilderWriter? implicit; name: string implicit)
Previsit for getting field in AOT generation.
- Arguments
ann : TypeAnnotation ? implicit
ss : StringBuilderWriter ? implicit
name : string implicit
- aot_visit_get_field(ann: TypeAnnotation? implicit; ss: StringBuilderWriter? implicit; name: string implicit)
Visit for getting field in AOT generation.
- Arguments
ann : TypeAnnotation ? implicit
ss : StringBuilderWriter ? implicit
name : string implicit
- string_builder_str(ss: StringBuilderWriter? implicit) : string()
Returns string from the StringBuilder expression, given pointer to the StringBuilder object.
- Arguments
ss : StringBuilderWriter ? implicit
- string_builder_clear(ss: StringBuilderWriter? implicit)
Clears the StringBuilder object, given pointer to the StringBuilder object.
- Arguments
ss : StringBuilderWriter ? implicit