kei-lisp - v3.0.1
    Preparing search index...

    Class Table

    Class that manages bindings of interpreted symbols.

    Keisuke Ikeda

    Hierarchy

    Index
    • Constructor.

      Parameters

      • aTable: Table | null = null

        the environment in which this environment was created

      Returns Table

    "[toStringTag]": string
    root: boolean

    Whether this environment is the root of its chain.

    size: number

    the number of elements in the Map.

    source: Table | null

    The enclosing (parent) environment, or null when this is the root.

    structAccessors: Map<unknown, number>

    Positions (1-based, as used by nth) of struct fields keyed by the accessor symbol generated by defstruct. Consulted by setf to make struct accessors usable as places. Only meaningful on the root table.

    "[species]": MapConstructor
    • Returns an iterable of entries in the map.

      Returns MapIterator<[unknown, LispValue]>

    • Removes all elements from the Map.

      Returns void

    • Parameters

      • key: unknown

      Returns boolean

      true if an element in the Map existed and has been removed, or false if the element does not exist.

    • Returns an iterable of key, value pairs for every entry in the map.

      Returns MapIterator<[unknown, LispValue]>

    • Returns whether this instance equals the given object.

      Parameters

      • _anObject: unknown

        the object to compare against (unused; this always throws)

      Returns boolean

      never returns; always throws a TypeError

    • Executes a provided function once per each key/value pair in the Map, in insertion order.

      Parameters

      • callbackfn: (value: LispValue, key: unknown, map: Map<unknown, LispValue>) => void
      • OptionalthisArg: any

      Returns void

    • Returns the value bound to the given interpreted symbol, walking up the scope chain.

      Parameters

      • aSymbol: unknown

        the symbol to look up

      Returns LispValue

      the bound value, or null when no binding exists

    • Returns whether anything is bound to the given property (key).

      Parameters

      • aSymbol: unknown

        the symbol to look up

      Returns boolean

      true if a binding exists in this scope or any enclosing scope

    • Returns whether this instance is the root of the environment chain.

      Returns boolean

      true if this is the root environment

    • Returns an iterable of keys in the map

      Returns MapIterator<unknown>

    • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

      Parameters

      Returns this

    • Reassigns the symbol bound in the innermost scope (equivalent to Common Lisp's setq). If a binding exists in the current scope, update it and return; otherwise recurse into the parent scope.

      Parameters

      • aSymbol: unknown

        the symbol to update

      • anObject: LispValue

        the new bound value

      Returns LispValue

      the new bound value, or null when no enclosing scope has a binding

    • Sets whether this instance is the root of its environment chain.

      Parameters

      • aBoolean: boolean

        the new root flag

      Returns null

      null

    • Returns a formatted string representation of this instance.

      Returns string

      the formatted string

    • Returns an iterable of values in the map

      Returns MapIterator<LispValue>