21 lines
44 KiB
JavaScript
21 lines
44 KiB
JavaScript
|
import cpp from './cpp.mjs';
|
|||
|
import python from './python.mjs';
|
|||
|
import javascript from './javascript.mjs';
|
|||
|
import r from './r.mjs';
|
|||
|
import sql from './sql.mjs';
|
|||
|
import './cpp-macro.mjs';
|
|||
|
import './glsl.mjs';
|
|||
|
import './c.mjs';
|
|||
|
|
|||
|
const lang = Object.freeze({ "displayName": "Julia", "name": "julia", "patterns": [{ "include": "#operator" }, { "include": "#array" }, { "include": "#string" }, { "include": "#parentheses" }, { "include": "#bracket" }, { "include": "#function_decl" }, { "include": "#function_call" }, { "include": "#for_block" }, { "include": "#keyword" }, { "include": "#number" }, { "include": "#comment" }, { "include": "#type_decl" }, { "include": "#symbol" }, { "include": "#punctuation" }], "repository": { "array": { "patterns": [{ "begin": "\\[", "beginCaptures": { "0": { "name": "meta.bracket.julia" } }, "end": "(\\])((?:\\.)?'*)", "endCaptures": { "1": { "name": "meta.bracket.julia" }, "2": { "name": "keyword.operator.transpose.julia" } }, "name": "meta.array.julia", "patterns": [{ "match": "\\bbegin\\b", "name": "constant.numeric.julia" }, { "match": "\\bend\\b", "name": "constant.numeric.julia" }, { "include": "#self_no_for_block" }] }] }, "bracket": { "patterns": [{ "begin": "\\{", "beginCaptures": { "0": { "name": "meta.bracket.julia" } }, "end": "(\\})((?:\\.)?'*)", "endCaptures": { "1": { "name": "meta.bracket.julia" }, "2": { "name": "keyword.operator.transpose.julia" } }, "patterns": [{ "include": "#self_no_for_block" }] }] }, "comment": { "patterns": [{ "include": "#comment_block" }, { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.julia" } }, "end": "\\n", "name": "comment.line.number-sign.julia", "patterns": [{ "include": "#comment_tags" }] }] }, "comment_block": { "patterns": [{ "begin": "#=", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.julia" } }, "end": "=#", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.julia" } }, "name": "comment.block.number-sign-equals.julia", "patterns": [{ "include": "#comment_tags" }, { "include": "#comment_block" }] }] }, "comment_tags": { "patterns": [{ "match": "\\bTODO\\b", "name": "keyword.other.comment-annotation.julia" }, { "match": "\\bFIXME\\b", "name": "keyword.other.comment-annotation.julia" }, { "match": "\\bCHANGED\\b", "name": "keyword.other.comment-annotation.julia" }, { "match": "\\bXXX\\b", "name": "keyword.other.comment-annotation.julia" }] }, "for_block": { "comment": "for blocks need to be special-cased to support tokenizing 'outer' properly", "patterns": [{ "begin": "\\b(for)\\b", "beginCaptures": { "0": { "name": "keyword.control.julia" } }, "end": "(?<!,|\\s)(\\s*\\n)", "patterns": [{ "match": "\\bouter\\b", "name": "keyword.other.julia" }, { "include": "$self" }] }] }, "function_call": { "patterns": [{ "begin": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}\u2140-\u2144\u223F\u22BE\u22BF\u22A4\u22A5\u2202\u2205-\u2207\u220E\u220F\u2210\u2211\u221E\u221F\u222B-\u2233\u22C0-\u22C3\u25F8-\u25FF\u266F\u27D8\u27D9\u27C0\u27C1\u29B0-\u29B4\u2A00-\u2A06\u2A09-\u2A16\u2A1B\u2A1C\u{1D6C1}\u{1D6DB}\u{1D6FB}\u{1D715}\u{1D735}\u{1D74F}\u{1D76F}\u{1D789}\u{1D7A9}\u{1D7C3}\u2071-\u207E\u2081-\u208E\u2220-\u2222\u299B-\u29AF\u2118\u212E\u309B-\u309C\u{1D7CE}-\u{1D7E1}]|[^\\P{So}\u2190-\u21FF])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}\u2140-\u2144\u223F\u22BE\u22BF\u22A4\u22A5\u2202\u2205-\u2207\u220E\u220F\u2210\u2211\u221E\u221F\u222B-\u2233\u22C0-\u22C3\u25F8-\u25FF\u266F\u27D8\u27D9\u27C0\u27C1\u29B0-\u29B4\u2A00-\u2A06\u2A09-\u2A16\u2A1B\u2A1C\u{1D6C1}\u{1D6DB}\u{1D6FB}\u{1D715}\u{1D735}\u{1D74F}\u{1D76F}\u{1D789}\u{1D7A9}\u{1D7C3}\u2071-\u207E\u2081-\u208E\u2220-\u2222\u299B-\u29AF\u2118\u212E\u309B-\u309C\u{1D7CE}-\u{1D7E1}]|[^\\P{Mn}-\xA1]|[^\\P{Mc}-\xA1]|[^\\P{Nd}-\xA1]|[^\\P{Pc}-\xA1]|[^\\P{Sk}-\xA1]|[^\\P{Me}-\xA1]|[^\\P{No}-\xA1]|[\u2032-\u2037\u2057]|[^\\P{So}\u2190-\u21FF])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(\\()", "beginCaptures": { "1": { "name": "support.function.julia" }, "2": { "name": "support.type.julia" }, "3": { "name": "meta.bracket.julia" } }, "end": "\\)(('|(\\.'))*\\.?')?", "endCaptures": { "0": { "name": "meta.bracket.julia" }, "1": { "name": "keyword.operator.transposed-func.julia" } }, "patterns": [{ "include": "#self_
|
|||
|
var julia = [
|
|||
|
...cpp,
|
|||
|
...python,
|
|||
|
...javascript,
|
|||
|
...r,
|
|||
|
...sql,
|
|||
|
lang
|
|||
|
];
|
|||
|
|
|||
|
export { julia as default };
|