Ólafur Páll Geirsson

Results 361 comments of Ólafur Páll Geirsson

> Alternatively we could also drop traverser and only allow to explore the tree via the children method. Is it possible to implement the traverser API with the children method?

I recall an experiment that showed that the current traverser API has bad performance, and it’s much faster to go via children. I think the contrib module uses children to...

Thanks for reporting and providing such a detailed and minimal reproduction! Nice job tracking the root cause down 👍 I have wondered if we should stop emitting a type occurrence...

Sounds good! I think the range will still point to the name instead of `Term.New` for consistency with how we have placed positions before. In libraries like Scalafix we can...

That's an extension method in the Scalafix library API https://scalacenter.github.io/scalafix/docs/developers/symbol-information.html#get-symbol-of-a-tree

Related notes on how the PHP parser recovers from errors using "Missing token" and "Skipped token" https://github.com/Microsoft/tolerant-php-parser/blob/master/docs/HowItWorks.md#error-tokens this strategy is apparently inspired/guided by how Roslyn recovers from errors in C#....

I did another experiment that preserves binary compatibility and preserves `.parent` links for parser/quasiquote generated trees and still delivers 35% speedups. The parser processes 84k lines/s with this change instead...

Here is the branch implementing the change https://github.com/scalameta/scalameta/compare/master...olafurpg:parent?expand=1

The this proposed approach it becomes optional to set parent links, if you choose not to set them then you can squeeze out further 6% ``` [info] Benchmark Mode Cnt...