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
In its current implementation, the parser works recursively, which is fine if you are doing simple expression parsing. But once you start parsing a long series of tokens, a stack overflow may occur (such is the case in #162).
What I propose is to start reimplementing the parser in small logical chunks. This includes:
eliminating recursive calls and making the parsing iterative
trying to keep the expressions as linear as possible (e.g. binary operators being represented in reverse polish notation, instead of a tree)
As I said, the work can be split into small chunks, such as:
var
let
const
return
functions
blocks
new
if, else if, else & ternary
loops
objects
arrays
switch
typeof
binary operators
unary operators
regular expressions
Note: this list might not be exhaustive
The text was updated successfully, but these errors were encountered:
@IovoslavIovchev whats the state of this issue now that the parser has been rebuilt?
There is conversation on how we break the parser up happening jasonwilliams#281 (comment)
In its current implementation, the parser works recursively, which is fine if you are doing simple expression parsing. But once you start parsing a long series of tokens, a stack overflow may occur (such is the case in #162).
What I propose is to start reimplementing the parser in small logical chunks. This includes:
As I said, the work can be split into small chunks, such as:
var
let
const
return
new
if
,else if
,else
& ternaryswitch
typeof
The text was updated successfully, but these errors were encountered: