sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    • Class for a database of entity names (variables, procedures, etc).

      Parameters

      • reservedWords: string

        A comma-separated string of words that are illegal for use as names in a language (e.g. 'new,if,this,...').

      • Optionalopt_variablePrefix: string

        Some languages need a '$' or a namespace before all variable names (but not procedure names).

      Returns Blockly.Names

    Methods

    • Convert a Blockly entity name to a legal exportable entity name. Ensure that this is a new name not overlapping any previously defined name. Also check against list of reserved words for the current language and ensure name doesn't collide.

      Parameters

      • name: string

        The Blockly entity name (no constraints).

      • realm: string

        The realm of entity in Blockly ('VARIABLE', 'PROCEDURE', 'DEVELOPER_VARIABLE', etc...).

      Returns string

      An entity name that is legal in the exported language.

    • Convert a Blockly entity name to a legal exportable entity name.

      Parameters

      • nameOrId: string

        The Blockly entity name (no constraints) or variable ID.

      • realm: string

        The realm of entity in Blockly ('VARIABLE', 'PROCEDURE', 'DEVELOPER_VARIABLE', etc...).

      Returns string

      An entity name that is legal in the exported language.

    • Return a list of all known user-created names in a specified realm.

      Parameters

      • realm: string

        The realm of entity in Blockly ('VARIABLE', 'PROCEDURE', 'DEVELOPER_VARIABLE', etc...).

      Returns string[]

      A list of Blockly entity names (no constraints).

    • Generate names for user variables, but only ones that are being used.

      Parameters

      Returns void

    • Empty the database and start from scratch. The reserved words are kept.

      Returns void

    • Set the variable map that maps from variable name to variable object.

      Parameters

      Returns void