Class CompileState

A SQRL CompileState represents the state of the SQRL compiler during a single compilation.

Hierarchy

  • CompileState

Methods

  • Creates a node with a hash of the given properties for a node type.

    Parameters

    • sourceAst: Ast
    • entityType: string
    • props: {
          [key: string]: any;
      }
      • [key: string]: any

    Returns {
        entityAst: SlotAst;
        entityId: EntityId;
    }

  • Combines a WHERE statement with the current global WHERE state. Returns a slot as well as hashable truth table for the boolean condition

    Parameters

    Returns {
        combinedAst: Ast;
        whereAst: Ast;
        whereFeatures: string[];
        whereTruth: string;
    }

    • combinedAst: Ast
    • whereAst: Ast
    • whereFeatures: string[]
    • whereTruth: string
  • Creates a new global slot if it doesn't already exist. Ensures that the slot is a ConstantSlot and returns an object that can be used to update the value.

    Parameters

    • sourceAst: Ast
    • name: string
    • initialValue: any

    Returns ConstantSlot

  • Creates a new global slot. If there is a problem creating the slot the error message will point to the code in sourceAst.

    Parameters

    • sourceAst: Ast
    • valueAst: Ast
    • Optional name: string

    Returns SlotAst

Generated using TypeDoc