-
Hello everyone And I made My CLI base on #861, so every time my CLI transpile the files, It calls I'm wondering why |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hey @negahama, Can you share some of your code with us? Without more info, it's very hard to figure out how to fix your performance issue. Have you tried profiling your CLI yet? There are often times performance bottlenecks im the scoping and validation implementations. |
Beta Was this translation helpful? Give feedback.
-
@msujew Thank you so much... |
Beta Was this translation helpful? Give feedback.
Looking at this through a profiler, it seems like the parser is taking a very long time on your files - mainly with attempting to perform the lookahead. This indicates very long common prefixes in the grammar:
Looking at your grammar, it seems like your language features a lot of ambiguity in the first few tokens. For example
ForOf
andForTo
can be joined into a single rule, and everything that starts with(Annotation)? (export?='export')? (private?='private')? (static?='static')?
can be moved into a single prefixed rule that then fans out into different branches. Also, the lookahead creates a warning in your code saying thatBlock
is completely ambiguous: