UNPKG

cm-tarnation

Version:

An alternative parser for CodeMirror 6

44 lines 1.79 kB
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { NodeType } from "@lezer/common"; export var Wrapping; (function (Wrapping) { /** The {@link Node} in this match contains the entirety of the branch. */ Wrapping[Wrapping["FULL"] = 0] = "FULL"; /** The {@link Node} in this match begins the branch. */ Wrapping[Wrapping["BEGIN"] = 1] = "BEGIN"; /** The {@link Node} in this match ends the branch. */ Wrapping[Wrapping["END"] = 2] = "END"; })(Wrapping || (Wrapping = {})); export var NodeID; (function (NodeID) { NodeID[NodeID["NONE"] = 0] = "NONE"; NodeID[NodeID["TOP"] = 1] = "TOP"; NodeID[NodeID["ERROR_ADVANCE"] = 2] = "ERROR_ADVANCE"; NodeID[NodeID["ERROR_INCOMPLETE"] = 3] = "ERROR_INCOMPLETE"; NodeID[NodeID["SAFE"] = 4] = "SAFE"; })(NodeID || (NodeID = {})); export const CHUNK_ARRAY_INTERVAL = 16; export const COMPILER_STACK_SIZE = 64; export const COMPILER_ARRAY_INTERVAL = 32768; export const FINISH_INCOMPLETE_NODES = true; export const DISABLED_NESTED = true; export const REUSE_LEFT = true; export const REUSE_RIGHT = true; export const MARGIN_BEFORE = 32; export const MARGIN_AFTER = 128; // disabled as it doesn't seem to be needed for performance export const LIMIT_TO_VIEWPORT = false; // node types export const NODE_ERROR_ADVANCE = NodeType.define({ name: "⚠️ ERROR_ADVANCE", id: NodeID.ERROR_ADVANCE, error: true }); export const NODE_ERROR_INCOMPLETE = NodeType.define({ name: "⚠️ ERROR_INCOMPLETE", id: NodeID.ERROR_INCOMPLETE, error: true }); //# sourceMappingURL=constants.js.map