Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
16
node_modules/chevrotain/lib/src/diagrams/render_public.js
generated
vendored
Normal file
16
node_modules/chevrotain/lib/src/diagrams/render_public.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createSyntaxDiagramsCode = void 0;
|
||||
var version_1 = require("../version");
|
||||
function createSyntaxDiagramsCode(grammar, _a) {
|
||||
var _b = _a === void 0 ? {} : _a, _c = _b.resourceBase, resourceBase = _c === void 0 ? "https://unpkg.com/chevrotain@".concat(version_1.VERSION, "/diagrams/") : _c, _d = _b.css, css = _d === void 0 ? "https://unpkg.com/chevrotain@".concat(version_1.VERSION, "/diagrams/diagrams.css") : _d;
|
||||
var header = "\n<!-- This is a generated file -->\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n";
|
||||
var cssHtml = "\n<link rel='stylesheet' href='".concat(css, "'>\n");
|
||||
var scripts = "\n<script src='".concat(resourceBase, "vendor/railroad-diagrams.js'></script>\n<script src='").concat(resourceBase, "src/diagrams_builder.js'></script>\n<script src='").concat(resourceBase, "src/diagrams_behavior.js'></script>\n<script src='").concat(resourceBase, "src/main.js'></script>\n");
|
||||
var diagramsDiv = "\n<div id=\"diagrams\" align=\"center\"></div> \n";
|
||||
var serializedGrammar = "\n<script>\n window.serializedGrammar = ".concat(JSON.stringify(grammar, null, " "), ";\n</script>\n");
|
||||
var initLogic = "\n<script>\n var diagramsDiv = document.getElementById(\"diagrams\");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n</script>\n";
|
||||
return (header + cssHtml + scripts + diagramsDiv + serializedGrammar + initLogic);
|
||||
}
|
||||
exports.createSyntaxDiagramsCode = createSyntaxDiagramsCode;
|
||||
//# sourceMappingURL=render_public.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue