cordbuilder
Version:
Simple dsl to create discord builders simple.
24 lines (23 loc) • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LEXER_SPEC = void 0;
const ast_1 = require("../types/ast");
exports.LEXER_SPEC = [
// Skippable
[/^\s+/, ast_1.TokenKind.Skippable],
// String
[/^\"[^"]*\"/, ast_1.TokenKind.String],
// Boolean
[/^(true|false)/, ast_1.TokenKind.Boolean],
// Identifier
[/^\w+/, ast_1.TokenKind.Identifier],
// Operators
[/^\@/, ast_1.TokenKind.At],
[/^\:/, ast_1.TokenKind.Colon],
// Delimiters
[/^\(/, ast_1.TokenKind.OpenParen],
[/^\)/, ast_1.TokenKind.CloseParen],
[/^\[/, ast_1.TokenKind.OpenBracket],
[/^\]/, ast_1.TokenKind.CloseBracket],
[/^\,/, ast_1.TokenKind.Comma],
];