IConstructor prod = TreeAdapter.getProduction(tree);
IConstructor sym = ProductionAdapter.getDefined(prod);
sym = SymbolAdapter.delabel(sym);
IValueFactory vf = eval.getValueFactory();
prod = ProductionAdapter.setDefined(prod, vf.constructor(Factory.Symbol_Label, vf.string("$parsed"), sym));
return TreeAdapter.setProduction(TreeAdapter.setArg(tree, "parts", fragment), prod);
}
catch (ParseError e) {
ISourceLocation loc = TreeAdapter.getLocation(tree);
ISourceLocation src = eval.getValueFactory().sourceLocation(loc.getURI(), loc.getOffset() + e.getOffset(), loc.getLength(), loc.getBeginLine() + e.getBeginLine() - 1, loc.getEndLine() + e.getEndLine() - 1, loc.getBeginColumn() + e.getBeginColumn(), loc.getBeginColumn() + e.getEndColumn());