xo-reader: distinguish interactive sessions
+ allow top-level i64 literals
This commit is contained in:
parent
2025969068
commit
a12a236bc1
16 changed files with 196 additions and 13 deletions
|
|
@ -29,6 +29,16 @@ namespace xo {
|
|||
return !xs_stack_.empty();
|
||||
}
|
||||
|
||||
void
|
||||
parser::begin_interactive_session() {
|
||||
/* note: not using emit expr here */
|
||||
parserstatemachine psm(&xs_stack_,
|
||||
&env_stack_,
|
||||
nullptr /*p_emit_expr*/);
|
||||
|
||||
exprseq_xs::start(exprseqtype::toplevel_interactive, &psm);
|
||||
}
|
||||
|
||||
void
|
||||
parser::begin_translation_unit() {
|
||||
/* note: not using emit expr here */
|
||||
|
|
@ -36,7 +46,7 @@ namespace xo {
|
|||
&env_stack_,
|
||||
nullptr /*p_emit_expr*/);
|
||||
|
||||
exprseq_xs::start(&psm);
|
||||
exprseq_xs::start(exprseqtype::toplevel_batch, &psm);
|
||||
}
|
||||
|
||||
rp<Expression>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue