UNPKG

antlr4ng

Version:

Alternative JavaScript/TypeScript runtime for ANTLR4

18 lines (17 loc) 948 B
import type { ATNState } from "./ATNState.js"; import type { Transition } from "./Transition.js"; /** * Utility class to create {@link AtomTransition}, {@link RangeTransition}, * and {@link SetTransition} appropriately based on the range of the input. * * Previously, we distinguished between atom and range transitions for * Unicode code points <= U+FFFF and those above. We used a set * transition for a Unicode code point > U+FFFF. Now that we can serialize * 32-bit int/chars in the ATN serialization, this is no longer necessary. */ export declare abstract class CodePointTransitions { /** @returns new {@link AtomTransition} */ static createWithCodePoint(target: ATNState, codePoint: number): Transition; /** @returns new {@link AtomTransition} if range represents one atom else {@link SetTransition}. */ static createWithCodePointRange(target: ATNState, codePointFrom: number, codePointTo: number): Transition; }