|
|
|
|
|
by ohazi
2020 days ago
|
|
Your IDE parser will be unusable if it goes bananas while you're typing the characters needed to get from one fully, correctly parseable state to the next. It needs to be able to handle: printf("hello");
and also: prin
and also: printf("He
It also needs to be able to autocomplete function signatures that exist below the current line being edited, so the parser can't simply bail out as soon as it reaches the first incomplete or incorrect line. |
|
The solution is to pick synchronisation points to start parsing again, i.e. ; at the end of a statement or } at the end of a block.