Closed EagleoutIce closed 7 months ago
Maybe a speed comparison with the old xmlparsedata would be interesting ;) (+ we should include unicode tests from the failed MSR suite).
Additionally we can kill the lexeme as it is linked to the R-id as well!
Like the r languageserver we originally used
xmlparsedata
to retrieve the AST roughly like this:Yet, this requires 1)
xmlparsedata
to be present, 2) taking care ofxmlparsedata::xml_parse_token_map
to revert the automatic replacements.We know want a change to the following:
Using
write.table
like this:This produces something akin to this:
Using this, you can use a function like
parseCSV
(already in use for the tokenMap retrieval) to retrieve the AST table within Typescript.When creating the tree, however, please keep in mind that you have to handle the ordering of tokens based on their location, not on the order within the table. To speed things up you may use something similar to xmlparsedata's
start
andend
tags (they appear to work fine).Please keep the ids alive so that we
Furthermore, we may consider on optimizing some things during the re-parsing already (we could, e.g., drop expr layers, map multiplications etc.) but this may be of interest for future issues (important issues :3).
Please implement it so that we can use the new behavior with the
RShell
and theRShellExecutor
.