UNPKG

cookeylang-ts

Version:
13 lines (12 loc) 504 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tokenPrinter = void 0; const token_1 = require("../token"); function tokenPrinter(tokens) { let out = tokens.map(tok => `<${tok.file}> [ ${tok.line} : ${tok.col} ] << ${token_1.TType[tok.type]} >> "${tok.value == '' || tok.value == null ? "no value" : tok.value}"`); return `== LEXER == <FILE> [ LINE : COL ] << TYPE >> "VALUE" ${out.join("\n")} == REXEL ==`; } exports.tokenPrinter = tokenPrinter;