tests/test_script.cpp
// Check parsing into AST and dumping back to code
Check parsing into AST and dumping back to code
Check parsing into AST and dumping back to code
std::string parse(const std::string& input)
{
    SourceManager src_man;
    auto src_id = src_man.add_source("<input>", input);
    Parser parser {src_man};
    ast::Module ast;
    parser.parse(src_id, ast);
    fold_tuple(ast.body);
    std::ostringstream os;
    os << ast;
    return os.str();
}
std :: string parse ( const std :: string & input ) { SourceManager src_man ; auto src_id = src_man . add_source ( " " , input ) ; Parser parser { src_man } ; ast :: Module ast ; parser . parse ( src_id , ast ) ; fold_tuple ( ast . body ) ; std :: ostringstream os ; os << ast ; return os . str ( ) ; }
Check parsing into AST and dumping back to code
Check parsing into AST and dumping back to code