Repository navigation
v4.0.0 - Incremental parsing and Walk traces
Now you can re-parse the AST using incremental parsing:
var ast = parser.Parse(input);
Console.WriteLine(ast.Version); // Outputs: 0
var changedAst = ast.Reparsed(changedInput);
Console.WriteLine(changedAst.Version); // Outputs: 1
// But children that remain untouched will have the '0' versionAnd you can enable the walk traces:
builder.Settings
.RecordWalkTrace();
// Or use the bundle 'UseDebug' method that includes walk trace
builder.Settings
.UseDebug(maxWalkStepsDisplay: 30);If you enabled them, they will be displayed in the exceptions, also you can render them manually:
var ast = parser.Parse(input);
var walkTrace = ast.Context.walkTrace;
var rendered = walkTrace.Render(maxCount: 50);
var entireTrace = walkTrace.Render();