Give multiple times to enable a list of certain types of logs to stderr help debugging, e.g.:Note that this follows commander.js' shorthand variadic argumentso syntax, and thus the
./ourbigbook --log ast tokens -- index.bigb-- is required above. If you want to omit it for a single value you have to add the = sign as in:./ourbigbook --log=ast index.bigbValues not documented in other sections:
ast: the full final parsed abstract syntax tree as JSONast-simple: a simplified view of the abstract syntax tree with one AstNode or AstArgument per line and showing only the most important fieldsast-pp-simple: view snapshots of the various abstract syntax tree post process stages, more info at: conversion process overviewast-inside: print the AST from inside theourbigbook.convertcall before it returns.This is useful to debug the program ifourbigbook.convertblows up on the next stages before returning.db: show database transactions done by OurBigBook, to help debug stuff like cross file internal linksmem: show process memory usage as per Node.js'process.memoryUsage()after each--log perfstep: stackoverflow.com/questions/12023359/what-do-the-return-values-of-node-js-process-memoryusage-stand-for. Implies--log perf.To use this options, you must run OurBigBook with the--expose-gccommand line option, e.g. with:node --expose-gc $(which ourbigbook) myfile.bigbparse: parsing stepstokenize: tokenization stepstokens: final parsed token streamtokens-inside: likeast-insidebut for tokens.Also adds token index to the output, which makes debugging the parser way easier.