UNPKG

rawsql-ts

Version:

[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.

15 lines 731 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentifierParser = void 0; const FullNameParser_1 = require("./FullNameParser"); const ValueComponent_1 = require("../models/ValueComponent"); class IdentifierParser { static parseFromLexeme(lexemes, index) { // Use FullNameParser to robustly parse qualified identifiers, including wildcards and escaped names. const { namespaces, name, newIndex } = FullNameParser_1.FullNameParser.parseFromLexeme(lexemes, index); const value = new ValueComponent_1.ColumnReference(namespaces, name); return { value, newIndex }; } } exports.IdentifierParser = IdentifierParser; //# sourceMappingURL=IdentifierParser.js.map