{ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "Bjolang", "scopeName": "source.bjolang", "fileTypes": [ "bjo", "protobjo" ], "patterns": [ { "include": "#forms" } ], "repository": { "forms": { "patterns": [ { "include": "#comment" }, { "include": "#character" }, { "include": "#boolean" }, { "include": "#interpolated-string" }, { "include": "#string" }, { "include": "#hash-forms" }, { "include": "#signature" }, { "include": "#definition" }, { "include": "#special-form" }, { "include": "#keyword" }, { "include": "#arrow" }, { "include": "#member" }, { "include": "#number" }, { "include": "#type-variable" }, { "include": "#quoted-symbol" }, { "include": "#quote" }, { "include": "#primitive-type" }, { "include": "#type-name" }, { "include": "#braces" }, { "include": "#delimiter" } ] }, "comment": { "comment": "A ; comment runs to the end of the line. There are no block comments.", "match": "(;+).*$", "name": "comment.line.semicolon.bjolang", "captures": { "1": { "name": "punctuation.definition.comment.bjolang" } } }, "character": { "comment": "#\\c, #\\space, #\\x41, #\\( — a name when more than one symbol character follows, otherwise the one character.", "match": "(?event|record-ref|record-set|struct-ref|struct-set|yield-from|bjoroutine|with-open|spawn-evt|let/mono|when-let|with-run|time-it|unless|letrec|if-let|some->|match|begin|yield|spawn|when|case|else|let\\*|loop|seql|set!|cast|cond|let|seq|try|fun|and|not|bjo|if|do|or)(?![^\\s()\\[\\]{},:\"';])", "captures": { "1": { "name": "keyword.control.bjolang" } } } ] }, "keyword": { "comment": "#:keyword and :keyword, which is also how loop clauses and def's failure parts are written.", "match": "#?:[^\\s()\\[\\]{},:\"';]+", "name": "variable.parameter.keyword.bjolang" }, "arrow": { "comment": "->, -bjo-> (a bjoroutine), -?-> (either colour), and =>.", "match": "(?|-bjo->|-\\?->|=>)(?![^\\s()\\[\\]{},:\"';])", "name": "storage.type.function.arrow.bjolang" }, "member": { "patterns": [ { "match": "(?