X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fsyntax%2Fjulia.yaml;h=9c33560d6c1724fd75f9a8821661fc432816ba08;hb=54c23cae72d7237bc898a59f79aad0acffdf0ffe;hp=ecda7c8127e85366f08515279ff8b9fb958f4c60;hpb=cef32d4ac7f7bbc1f57fc67f8a1788edddfbe771;p=micro.git diff --git a/runtime/syntax/julia.yaml b/runtime/syntax/julia.yaml index ecda7c81..9c33560d 100644 --- a/runtime/syntax/julia.yaml +++ b/runtime/syntax/julia.yaml @@ -8,20 +8,22 @@ rules: # built-in objects - constant.bool: "\\b(true|false)\\b" + - constant: "\\b(nothing|missing)\\b" # built-in attributes - constant: "__[A-Za-z0-9_]+__" # definitions - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" # keywords - - statement: "\\b(begin|break|catch|continue|function|elseif|struct|else|end|finally|for|global|local|let|const|if|import|using|macro|println|return|try|while|module)\\b" + - statement: "\\b(baremodule|begin|break|catch|const|continue|do|else|elseif|end|export|finally|for|function|global|if|import|let|local|macro|module|quote|return|struct|try|using|while)\\b" + - statement: "\\b(abstract\\s+type|primitive\\s+type|mutable\\s+struct)\\b" # decorators - identifier.macro: "@[A-Za-z0-9_]+" # operators - - symbol.operator: "[-+*/|=%<>&~^]|\\b(isa|in)\\b" + - symbol.operator: "[-+*/|=%<>&~^]|\\b(in|isa|where)\\b" # parentheses - symbol.brackets: "([(){}]|\\[|\\])" # numbers - - constant.number: "\\b([0-9]+(_[0-9]+)*|0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*|0b[01]+(_[01]+)*|0o[0-7]+(_[0-7]+)*)\\b" + - constant.number: "\\b([0-9]+(_[0-9]+)*|0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*|0b[01]+(_[01]+)*|0o[0-7]+(_[0-7]+)*|Inf(16|32|64)?|NaN(16|32|64)?)\\b" - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^']){1}'" @@ -31,11 +33,16 @@ rules: rules: [] - constant.string: - start: "'''" - end: "'''" + start: "\"[^\"]|\"$" + end: "\"" rules: [] - comment: - start: "#" + start: "#[^=]|#$" end: "$" rules: [] + + - comment: + start: "#=" + end: "=#" + rules: []