Files

6 lines
18 KiB
JavaScript
Raw Permalink Normal View History

2026-05-03 12:12:57 -04:00
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Odin\",\"name\":\"odin\",\"patterns\":[{\"include\":\"#file-tags\"},{\"include\":\"#package-name-declaration\"},{\"include\":\"#import-declaration\"},{\"include\":\"#statements\"}],\"repository\":{\"assignments\":{\"patterns\":[{\"include\":\"#procedure-assignment\"},{\"include\":\"#type-assignment\"},{\"include\":\"#distinct-type-assignment\"},{\"include\":\"#constant-assignment\"},{\"include\":\"#variable-assignment\"},{\"include\":\"#type-annotation\"}]},\"attribute\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.attribute.odin\"},\"2\":{\"name\":\"entity.other.attribute-name.odin\"}},\"match\":\"(@)\\\\s*([A-Z_a-z]\\\\w*)\\\\b\",\"name\":\"meta.attribute.odin\"},{\"begin\":\"(@)\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.attribute.odin\"},\"2\":{\"name\":\"meta.brace.round.odin\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.round.odin\"}},\"name\":\"meta.attribute.odin\",\"patterns\":[{\"match\":\"\\\\b([A-Z_a-z]\\\\w*)\\\\b\",\"name\":\"entity.other.attribute-name.odin\"},{\"match\":\",\",\"name\":\"punctuation.odin\"},{\"begin\":\"=\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.operator.assignment.odin\"}},\"end\":\"(?=[),])\",\"patterns\":[{\"include\":\"#expressions\"}]}]}]},\"basic-types\":{\"patterns\":[{\"match\":\"\\\\b(i(?:8|16|32|64|128|nt))\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(u(?:8|16|32|64|128|int|intptr))\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b((?:u16|u32|u64|u128|i16|i32|i64|i128)le)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b((?:i16|i32|i64|i128|u16|u32|u64|u128)be)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(f(?:16|32|64))\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(f(?:16|32|64)le)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(f(?:16|32|64)be)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(complex(?:32|64|128))\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(quaternion(?:64|128|256))\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(b(?:ool|8|16|32|64))\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(string|cstring|rune)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(rawptr)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(any|typeid)\\\\b\",\"name\":\"support.type.primitive.odin\"},{\"match\":\"\\\\b(byte)\\\\b\",\"name\":\"support.type.primitive.odin\"}]},\"block-comment\":{\"begin\":\"/\\\\*\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.begin.odin\"}},\"end\":\"\\\\*/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.end.odin\"}},\"name\":\"comment.block.odin\",\"patterns\":[{\"include\":\"#block-comment\"}]},\"block-definition\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.odin\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.odin\"}},\"name\":\"meta.block.odin\",\"patterns\":[{\"include\":\"#statements\"}]},\"block-label\":{\"captures\":{\"1\":{\"name\":\"entity.name.label.odin\"},\"2\":{\"name\":\"punctuation.definition.label.odin\"}},\"match\":\"(\\\\w+)(:)\\\\s*(?=for|switch|if|\\\\{)\",\"name\":\"meta.block.label.odin\"},\"case-clause\":{\"begin\":\"\\\\b(case)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.case.odin\"}},\"end\":\":\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.section.case-statement.odin\"}},\"name\":\"meta.case-clause.expr.odin\",\"patterns\":[{\"include\":\"#expressions\"}]},\"comments\":{\"patterns\":[{\"include\":\"#block-comment\"},{\"begin\":\"//\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.odin\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.double-slash.odin\"},{\"begin\":\"#!\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.odin\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.shebang.odin\"}]}
export default [
lang
]