10 lines
10 KiB
JavaScript
10 lines
10 KiB
JavaScript
|
import javascript from './javascript.mjs';
|
||
|
|
||
|
const lang = Object.freeze({ "displayName": "Jison", "fileTypes": ["jison"], "injections": { "L:(meta.action.jison - (comment | string)), source.js.embedded.jison - (comment | string), source.js.embedded.source - (comment | string.quoted.double | string.quoted.single)": { "patterns": [{ "match": "\\${2}", "name": "variable.language.semantic-value.jison" }, { "match": "@\\$", "name": "variable.language.result-location.jison" }, { "match": "##\\$|\\byysp\\b", "name": "variable.language.stack-index-0.jison" }, { "match": "#\\S+#", "name": "support.variable.token-reference.jison" }, { "match": "#\\$", "name": "variable.language.result-id.jison" }, { "match": "\\$(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)", "name": "support.variable.token-value.jison" }, { "match": "@(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)", "name": "support.variable.token-location.jison" }, { "match": "##(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)", "name": "support.variable.stack-index.jison" }, { "match": "#(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)", "name": "support.variable.token-id.jison" }, { "match": "\\byy(?:l(?:eng|ineno|oc|stack)|rulelength|s(?:tate|s?tack)|text|vstack)\\b", "name": "variable.language.jison" }, { "match": "\\byy(?:clearin|erro[kr])\\b", "name": "keyword.other.jison" }] } }, "name": "jison", "patterns": [{ "begin": "%%", "beginCaptures": { "0": { "name": "meta.separator.section.jison" } }, "end": "\\z", "patterns": [{ "begin": "%%", "beginCaptures": { "0": { "name": "meta.separator.section.jison" } }, "end": "\\z", "patterns": [{ "begin": "\\G", "contentName": "source.js.embedded.jison", "end": "\\z", "name": "meta.section.epilogue.jison", "patterns": [{ "include": "#epilogue_section" }] }] }, { "begin": "\\G", "end": "(?=%%)", "name": "meta.section.rules.jison", "patterns": [{ "include": "#rules_section" }] }] }, { "begin": "^", "end": "(?=%%)", "name": "meta.section.declarations.jison", "patterns": [{ "include": "#declarations_section" }] }], "repository": { "actions": { "patterns": [{ "begin": "\\{\\{", "beginCaptures": { "0": { "name": "punctuation.definition.action.begin.jison" } }, "contentName": "source.js.embedded.jison", "end": "\\}\\}", "endCaptures": { "0": { "name": "punctuation.definition.action.end.jison" } }, "name": "meta.action.jison", "patterns": [{ "include": "source.js" }] }, { "begin": "(?=%\\{)", "end": "(?<=%\\})", "name": "meta.action.jison", "patterns": [{ "include": "#user_code_blocks" }] }] }, "comments": { "patterns": [{ "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.jison" } }, "end": "$", "name": "comment.line.double-slash.jison" }, { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.jison" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.jison" } }, "name": "comment.block.jison" }] }, "declarations_section": { "patterns": [{ "include": "#comments" }, { "begin": "^\\s*(%lex)\\s*$", "beginCaptures": { "1": { "name": "entity.name.tag.lexer.begin.jison" } }, "end": "^\\s*(/lex)\\b", "endCaptures": { "1": { "name": "entity.name.tag.lexer.end.jison" } }, "patterns": [{ "begin": "%%", "beginCaptures": { "0": { "name": "meta.separator.section.jisonlex" } }, "end": "(?=/lex)", "patterns": [{ "begin": "^%%", "beginCaptures": { "0": { "name": "meta.separator.section.jisonlex" } }, "end": "(?=/lex)", "patterns": [{ "begin": "\\G", "contentName": "source.js.embedded.jisonlex", "end": "(?=/lex)", "name": "meta.section.user-code.jisonlex", "patterns": [{ "include": "source.jisonlex#user_code_section" }] }] }, { "begin": "\\G", "end": "^(?=%%|/lex)", "name": "meta.section.rules.jisonlex", "patterns": [{ "include": "source.jisonlex#rules_section" }] }] }, { "begin": "^", "end": "(?=%%|/lex)", "name": "meta.section.definitions.jisonlex", "patterns": [{ "include": "source.jisonlex#definitions_section" }] }] }, { "begin": "(?=%\\{)", "end": "(?<=%\\})", "name": "meta.section.prologue.jison", "patterns": [{ "include": "#user_code_blocks" }] }, { "include": "#options_declarations" }, { "match": "%(ebnf|left|nonassoc|parse-par
|
||
|
var jison = [
|
||
|
...javascript,
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { jison as default };
|