UNPKG

dt-python-parser

Version:

There are some python parsers built with antlr4, and it's mainly for the **BigData** domain.

35 lines (34 loc) 950 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenReg = exports.TokenType = void 0; var TokenType; (function (TokenType) { /** * Enclosed in single/double/back quotation, `` Symbol * 'abc', "abc", `abc` */ TokenType["SingleQuotation"] = "SingleQuotation"; TokenType["DoubleQuotation"] = "DoubleQuotation"; TokenType["BackQuotation"] = "BackQuotation"; /** * Language element type */ TokenType["Comment"] = "Comment"; /** * Statement */ TokenType["StatementTerminator"] = "StatementTerminator"; /** * Others */ TokenType["Error"] = "Error"; })(TokenType = exports.TokenType || (exports.TokenType = {})); /** * Token recognition rules */ exports.TokenReg = { [TokenType.StatementTerminator]: /[;]/, [TokenType.SingleQuotation]: /[']/, [TokenType.DoubleQuotation]: /["]/, [TokenType.BackQuotation]: /[`]/, };