{ "fileTypes": [ "nim", "nims" ], "name": "Nim", "patterns": [ { "begin": "(\\#\\[\\s*(TODO|todo)?)", "captures": { "1": { "name": "punctuation.definition.multi-comment.nim" }, "2": { "name": "invalid.illegal.TODO.nim" } }, "comment": "A multiline comment.", "end": "(.*]\\#)", "name": "comment.line.number-sign.multi-comment.nim" }, { "captures": { "1": { "name": "punctuation.definition.doc-comment.nim" }, "2": { "name": "invalid.illegal.TODO.nim" } }, "comment": "A documentation comment.", "match": "(##\\s*(TODO|todo)?).+$\\n?", "name": "comment.line.number-sign.doc-comment.nim" }, { "captures": { "1": { "name": "punctuation.definition.doc-comment.empty.nim" } }, "comment": "An empty documentation comment.", "match": "(##\\s*)$\\n?", "name": "comment.line.number-sign.doc-comment.empty.nim" }, { "captures": { "1": { "name": "punctuation.definition.comment.nim" }, "2": { "name": "invalid.illegal.TODO.nim" } }, "comment": "A regular comment", "match": "(#\\s*(TODO|todo)?).*$\\n?", "name": "comment.line.number-sign.comment.nim" }, { "comment": "C", "name": "source.c.embedded.nim", "patterns": [ { "begin": "\\{\\.(emit:) ?(\\\"\\\"\\\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "comment.syntax.nim" } }, "end": "(\\\"\\\"\\\")\\.?", "endCaptures": { "1": { "name": "comment.syntax.nim" } }, "patterns": [ { "begin": "\\`", "end": "\\`", "name": "keyword.operator.nim" }, { "include": "source.c" } ] } ] }, { "comment": "assembly", "name": "source.asm.embedded.nim", "patterns": [ { "begin": "(asm )(\\\"\\\"\\\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "comment.syntax.nim" } }, "end": "\\\"\\\"\\\"", "endCaptures": { "0": { "name": "comment.syntax.nim" } }, "patterns": [ { "begin": "\\`", "end": "\\`", "name": "keyword.operator.nim" }, { "include": "source.asm" } ] } ] }, { "comment": "A nim procedure or method declaration", "name": "meta.proc.nim", "patterns": [ { "begin": "(?|@|\\$|~|&|%|!|\\?|\\^|\\.|:|\\\\)+)", "name": "keyword.operator.nim" }, { "begin": "(for)\\s+", "captures": { "1": { "name": "keyword.control.nim" } }, "comment": "in keyword in a 'for' loop", "end": "(?=:)", "name": "meta.forloop.nim", "patterns": [ { "captures": { "1": { "name": "keyword.control.nim" } }, "match": "\\ [\\w\\x{80}-\\x{10FFFF},]+\\s+(in)\\s+" }, { "include": "source.nim" } ] }, { "captures": { "2": { "name": "keyword.control.nim" } }, "comment": "Import syntax", "match": "((import)\\s+[\\/\\w]+,?)" }, { "captures": { "1": { "name": "keyword.control.nim" } }, "match": "(from)\\s+[\\/\\w]+\\s+(?=import)" }, { "begin": "(var|let)\\s*\\(", "captures": { "1": { "name": "keyword.other.nim" } }, "comment": "Destructure syntax", "end": "\\)" }, { "comment": "Invalid and unused keywords.", "match": "((?