reader reports tokenizer errors through normal return
This commit is contained in:
parent
c0587aa4fb
commit
781adeb0d3
10 changed files with 149 additions and 20 deletions
|
|
@ -104,7 +104,8 @@ namespace xo {
|
|||
* $varname(n) : $typename(n)) [-> $typename[ret]]
|
||||
* body-expr
|
||||
* [ end $functionname ]
|
||||
* literal-expr = integer-literal
|
||||
* literal-expr = boolean-literal
|
||||
* | integer-literal
|
||||
* | fp-literal
|
||||
* | string-literal
|
||||
* | symbol-literal
|
||||
|
|
@ -211,6 +212,13 @@ namespace xo {
|
|||
**/
|
||||
rp<Expression> include_token(const token_type & tk);
|
||||
|
||||
/** reset to starting parsing state.
|
||||
* use this after encountering an error, to avoid cascade of
|
||||
* spurious secondary errors.. particularly important when
|
||||
* invoked asa part of a REPL.
|
||||
**/
|
||||
void reset_to_idle_toplevel();
|
||||
|
||||
/** print human-readable representation on stream @p os **/
|
||||
void print(std::ostream & os) const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue