You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Afterwards, for the full parse, it would be nice to reuse the already calculated tokens. Something like so
vartree=parser.Parse(tokenlist);
I already played around a little bit, but I was not successful. I managed to supply a list of tokens, but it seems that during parsing, some additional state is stored with the tokens. This state seems not to be there when just calling VsReadToken().
Am I missing something?
The text was updated successfully, but these errors were encountered:
You are right, there's no such direct facility, unfortunately. You can try workaround.
Add token list to ParseContext.BufferedTokens; it is internal but you can reach it using Reflection. And then provide empty source text to Parser. The parser would consume all bufferred tokens first and then empty actual source.
For performance reasons, I'm starting with just the lexer (so the app is really responsive to user inputs):
Afterwards, for the full parse, it would be nice to reuse the already calculated tokens. Something like so
I already played around a little bit, but I was not successful. I managed to supply a list of tokens, but it seems that during parsing, some additional state is stored with the tokens. This state seems not to be there when just calling
VsReadToken()
.Am I missing something?
The text was updated successfully, but these errors were encountered: