-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
new featureNew feature or requestNew feature or request
Description
SourcePosition{ column, row, offset }PositionSection{ SourcePosition position; }
// usage
*compose << "{" << pos(node->startPos()) << slice(node, source) << pos(node->endPos()) << "}";When calling flatten, instead of using parts.push_back(content), implement a new class: SectionCollector.
el::JSSection* section = new el::JSSection;
section->from = 0;
section->to = static_cast<int>(contents.size());
LanguageNodesToJs lnt;
lnt.convert(node, contents, section->m_children, 0, ctx);
auto sc = new SectionCollector(SectionCollector::Minified);
section->collect(contents, sc);
sc->getSourceMap();
sc->getSource();sc->append(content);
sc->appendPosition(position); // here, section collector will know the positionTesting
Add .m.json files for readability:
ParserTest01.lv
ParserTest01.lv.m.json
{
"file" : "generated_file",
"sources": ["source_file"],
"mappings" : [
{ "o": { "line": 1, "column" : 1 }, "g": { "line" : 1, "column" : 12 } }
]
}Metadata
Metadata
Assignees
Labels
new featureNew feature or requestNew feature or request