Pragmas are annotations in the code to be used by the Gobstones lexer to modify the behavior of some parts of the code processing components (e.g. the Lexer itself, or the Parser or Compiler). Pragmas follow a regular structure to allow easy detection by the lexer: an open sigil, followed by a particular identifier -- the pragma name -- followed optionally by groups of characters -- the pragma arguments -- separated by a separator sigil, and ended by a closing sigil. One particular pragma, LANGUAGEOPTION, offers only a limited number of arguments, listed separately. This interface establishes the concrete strings to use for those parts. The specific purpose of each pragma have to be consulted either in the documentation of the Gobstones lexer, the Gobstones parser, or the Gobstones linter. It constitutes one of the elements of the WordsDef interface.

interface PragmaElements {
    LanguageMods: {
        ALLOWRECURSION: string;
        DESTRUCTURINGFOREACH: string;
    };
    PragmaNames: {
        ATTRIBUTE: string;
        BEGINREGION: string;
        ENDREGION: string;
        EXTRASYMBOLS: string;
        LANGUAGEDOMAIN: string;
        LANGUAGELOCALE: string;
        LANGUAGEMOD: string;
        LANGUAGEVARIANT: string;
        LANGUAGEVERSION: string;
    };
    SEPARATORSIGIL: string;
}

Properties

LanguageMods: {
    ALLOWRECURSION: string;
    DESTRUCTURINGFOREACH: string;
}

Type declaration

  • ALLOWRECURSION: string
  • DESTRUCTURINGFOREACH: string
PragmaNames: {
    ATTRIBUTE: string;
    BEGINREGION: string;
    ENDREGION: string;
    EXTRASYMBOLS: string;
    LANGUAGEDOMAIN: string;
    LANGUAGELOCALE: string;
    LANGUAGEMOD: string;
    LANGUAGEVARIANT: string;
    LANGUAGEVERSION: string;
}

Type declaration

  • ATTRIBUTE: string
  • BEGINREGION: string
  • ENDREGION: string
  • EXTRASYMBOLS: string
  • LANGUAGEDOMAIN: string
  • LANGUAGELOCALE: string
  • LANGUAGEMOD: string
  • LANGUAGEVARIANT: string
  • LANGUAGEVERSION: string
SEPARATORSIGIL: string