31 Mai
2018
31 Mai
'18
14:05
+ | Block (_ , s, _) -> + (* I think this code breaks what Blocks are. *) + (* We delay parsing but parse with default_stt and default_grammar... *) + let rctx = ctx_blk in + let toks = Lexer.lex default_stt s in + let s = sexp_parse_all_to_list default_grammar toks (Some ";") in + eval blk (add_rte_variable None (o2v_list s) rctx)
Your comment is right. The idea is that Sexp_dispatch should not parse the block but pass its content as-is. Then it would be the macro which would call Lexer.lex and sexp_parse (which hence need to be exported to Typer as builtins). Stefan