Keywords are particular identifiers used to define language constructions with special syntax. This interface defines the keywords of Gobstones.

It constitutes one of the elements of the WordsDef interface.

An identifier is a maximal group of contiguous regular characters (i.e. that are not line separator, whitespace, nor symbol chars) in the input -- see WordsDef for an explanation of different types of chars. Identifiers are the basic readable words of the language, and keywords provide the structure of constructions. As keywords are identifiers, they must be conformed by regular chars, that is, they cannot contain any of the line separator, whitespace, nor symbol chars either. Keywords must not be repeated, because the lexer uses the concrete strings to recognize abstract words.

Keywords are organized accordingly with Gobstones main language constructions (definitions, statements -- also called commands --, and expressions).

interface Keywords {
    Definitions: {
        CASE: string;
        FIELD: string;
        FUNCTION: string;
        INTERACTIVE: string;
        IS: string;
        PROCEDURE: string;
        PROGRAM: string;
        RECORD: string;
        TYPE: string;
        VARIANT: string;
    };
    Expressions: {
        CHOOSE: string;
        MATCHING: string;
        ON: string;
        OTHERWISE: string;
        SELECT: string;
        UNDERSCORE: string;
        WHEN: string;
    };
    Statements: {
        ELSE: string;
        ELSEIF: string;
        FOREACH: string;
        IF: string;
        IN: string;
        LET: string;
        REPEAT: string;
        RETURN: string;
        SWITCH: string;
        THEN: string;
        TO: string;
        WHILE: string;
    };
}

Properties

Definitions: {
    CASE: string;
    FIELD: string;
    FUNCTION: string;
    INTERACTIVE: string;
    IS: string;
    PROCEDURE: string;
    PROGRAM: string;
    RECORD: string;
    TYPE: string;
    VARIANT: string;
}

Type declaration

  • CASE: string
  • FIELD: string
  • FUNCTION: string
  • INTERACTIVE: string
  • IS: string
  • PROCEDURE: string
  • PROGRAM: string
  • RECORD: string
  • TYPE: string
  • VARIANT: string
Expressions: {
    CHOOSE: string;
    MATCHING: string;
    ON: string;
    OTHERWISE: string;
    SELECT: string;
    UNDERSCORE: string;
    WHEN: string;
}

Type declaration

  • CHOOSE: string
  • MATCHING: string
  • ON: string
  • OTHERWISE: string
  • SELECT: string
  • UNDERSCORE: string
  • WHEN: string
Statements: {
    ELSE: string;
    ELSEIF: string;
    FOREACH: string;
    IF: string;
    IN: string;
    LET: string;
    REPEAT: string;
    RETURN: string;
    SWITCH: string;
    THEN: string;
    TO: string;
    WHILE: string;
}

Type declaration

  • ELSE: string
  • ELSEIF: string
  • FOREACH: string
  • IF: string
  • IN: string
  • LET: string
  • REPEAT: string
  • RETURN: string
  • SWITCH: string
  • THEN: string
  • TO: string
  • WHILE: string