moonrockz/krueger/dialect does not have a README file

    AttributeSyntax

    pub(all) enum AttributeSyntax {
    Off
    DocComment
    } derive(Eq,
    Debug
    )

    Whether attributes in doc comments are parsed.

    Dialect

    pub(all) struct Dialect {
    name : String
    rules :
    HashSet
    [Rule]
    operators : Array[OperatorDef]
    reserved_words : Array[String]
    operator_symbols : Array[String]
    attributes : AttributeSyntax
    core_package : Bool
    }

    A variant of Elm: which rejection rules run, and the extension data (operator table, extra reserved words, extra operator symbols) the scanner and the parser read. The AST shape is elm-syntax 7.3.9 in every dialect.

    • An extra operator symbol must start with a character the lexer already treats as a symbol (+ - / * = . < > : & | ^ ?) and must not start with -- (a line comment).
    • An extra reserved word must not be alias, infix or effect: the parser reads those by name.
    • { ..d, field: value } shares rules and operators with d; copy them before changing either.

    Dialect::elm_0_19_1

    fn Dialect::elm_0_19_1() -> Dialect

    The default dialect: rejects what elm make 0.19.1 rejects as syntax.

    Dialect::elm_syntax_7_3_9

    fn Dialect::elm_syntax_7_3_9() -> Dialect

    Rejects exactly what elm-syntax 7.3.9 rejects.

    Dialect::has

    fn Dialect::has(self : Dialect, rule : Rule) -> Bool

    Whether the dialect enables rule.

    Dialect::operator

    fn Dialect::operator(self : Dialect, symbol : String) -> OperatorDef?

    The operator table entry for symbol, if the dialect has one.

    Dialect::validate

    fn Dialect::validate(self : Dialect) -> Array[String]

    Problems with the dialect's extension data, as messages (empty when it is valid). The scanner and parser do not check these; call this when a dialect comes from outside (a config file, a CLI flag).

    OperatorDef

    pub(all) struct OperatorDef {
    symbol : String
    precedence : Int
    direction :
    InfixDirection

    } derive(Eq,
    Debug
    )

    An infix operator: its symbol, precedence (1 to 9) and direction.

    Rule

    pub(all) enum Rule {
    LeadingZero
    EmptyHex
    BadUnicodeEscape
    CharLength
    IndentedContinuation
    LetDeclarationColumn
    ModuleLevelColumn
    SpacedOperatorName
    UppercaseHexPrefix
    ExponentWithoutDigits
    ImportColumn
    NonAsciiDigitInName
    TitlecaseNameStart
    EffectModule
    InfixDeclaration
    DuplicateEffectKey
    PortInNormalModule
    } derive(Eq, Hash,
    Debug
    )

    A rejection rule: one class of syntax that a dialect rejects. A rule only runs when the dialect enables it.

    Rule::name

    fn Rule::name(self : Rule) -> String

    Kebab-case name, shown in diagnostics as [rule: <name>].

    standard_operators

    fn standard_operators() -> Array[OperatorDef]

    The infix operators of Elm 0.19.1 as elm-syntax 7.3.9 knows them, including </> and <?> from elm/url.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io