• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ readASTExpr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中readASTExpr函数的典型用法代码示例。如果您正苦于以下问题:C++ readASTExpr函数的具体用法?C++ readASTExpr怎么用?C++ readASTExpr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了readASTExpr函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: read_assert

AST_Assert* read_assert(BufferedReader* reader) {
    AST_Assert* rtn = new AST_Assert();

    rtn->col_offset = readColOffset(reader);
    rtn->lineno = reader->readULL();
    rtn->msg = readASTExpr(reader);
    rtn->test = readASTExpr(reader);
    return rtn;
}
开发者ID:josephwinston,项目名称:pyston,代码行数:9,代码来源:parser.cpp


示例2: read_dictcomp

AST_DictComp* read_dictcomp(BufferedReader* reader) {
    AST_DictComp* rtn = new AST_DictComp();
    rtn->col_offset = readColOffset(reader);
    readMiscVector(rtn->generators, reader);
    rtn->key = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    rtn->value = readASTExpr(reader);
    return rtn;
}
开发者ID:josephwinston,项目名称:pyston,代码行数:9,代码来源:parser.cpp


示例3: read_ifexp

AST_IfExp* read_ifexp(BufferedReader *reader) {
    AST_IfExp *rtn = new AST_IfExp();

    rtn->body = readASTExpr(reader);
    rtn->col_offset = readColOffset(reader);
    rtn->lineno = reader->readULL();
    rtn->orelse = readASTExpr(reader);
    rtn->test = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:10,代码来源:parser.cpp


示例4: read_augassign

AST_AugAssign* read_augassign(BufferedReader *reader) {
    AST_AugAssign *rtn = new AST_AugAssign();

    rtn->col_offset = readColOffset(reader);
    rtn->lineno = reader->readULL();
    rtn->op_type = (AST_TYPE::AST_TYPE)reader->readByte();
    rtn->target = readASTExpr(reader);
    rtn->value = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:10,代码来源:parser.cpp


示例5: read_excepthandler

AST_ExceptHandler* read_excepthandler(BufferedReader* reader) {
    AST_ExceptHandler* rtn = new AST_ExceptHandler();

    readStmtVector(rtn->body, reader);
    rtn->col_offset = readColOffset(reader);
    rtn->lineno = reader->readULL();
    rtn->name = readASTExpr(reader);
    rtn->type = readASTExpr(reader);

    return rtn;
}
开发者ID:josephwinston,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例6: read_with

AST_With* read_with(BufferedReader *reader) {
    AST_With *rtn = new AST_With();

    readStmtVector(rtn->body, reader);
    rtn->col_offset = readColOffset(reader);
    rtn->context_expr = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    rtn->optional_vars = readASTExpr(reader);

    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例7: read_exec

AST_Exec* read_exec(BufferedReader* reader) {
    AST_Exec* rtn = new AST_Exec();

    rtn->body = readASTExpr(reader);
    rtn->col_offset = readColOffset(reader);
    rtn->globals = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    rtn->locals = readASTExpr(reader);

    return rtn;
}
开发者ID:lyzardiar,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例8: read_binop

AST_expr* read_binop(BufferedReader *reader) {
    AST_BinOp *rtn = new AST_BinOp();

    rtn->col_offset = readColOffset(reader);
    rtn->left = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    rtn->op_type = (AST_TYPE::AST_TYPE)reader->readByte();
    rtn->right = readASTExpr(reader);

    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例9: read_for

AST_For* read_for(BufferedReader *reader) {
    AST_For *rtn = new AST_For();

    readStmtVector(rtn->body, reader);
    rtn->col_offset = readColOffset(reader);
    rtn->iter = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    readStmtVector(rtn->orelse, reader);
    rtn->target = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例10: read_slice

AST_Slice* read_slice(BufferedReader *reader) {
    AST_Slice *rtn = new AST_Slice();

    rtn->col_offset = -1;
    rtn->lineno = -1;
    rtn->lower = readASTExpr(reader);
    rtn->step = readASTExpr(reader);
    rtn->upper = readASTExpr(reader);

    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例11: read_subscript

AST_Subscript* read_subscript(BufferedReader *reader) {
    AST_Subscript *rtn = new AST_Subscript();

    rtn->col_offset = readColOffset(reader);
    rtn->ctx_type = (AST_TYPE::AST_TYPE)reader->readByte();
    rtn->lineno = reader->readULL();
    rtn->slice = readASTExpr(reader);
    rtn->value = readASTExpr(reader);

    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:11,代码来源:parser.cpp


示例12: read_comprehension

AST_comprehension* read_comprehension(BufferedReader *reader) {
    AST_comprehension *rtn = new AST_comprehension();

    readExprVector(rtn->ifs, reader);
    rtn->iter = readASTExpr(reader);
    rtn->target = readASTExpr(reader);

    rtn->col_offset = -1;
    rtn->lineno = -1;

    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:12,代码来源:parser.cpp


示例13: read_raise

AST_Raise* read_raise(BufferedReader* reader) {
    AST_Raise* rtn = new AST_Raise();

    // "arg0" "arg1" "arg2" are called "type", "inst", and "tback" in the python ast,
    // so that's the order we have to read them:
    rtn->col_offset = readColOffset(reader);
    rtn->arg1 /*inst*/ = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    rtn->arg2 /*tback*/ = readASTExpr(reader);
    rtn->arg0 /*type*/ = readASTExpr(reader);
    return rtn;
}
开发者ID:josephwinston,项目名称:pyston,代码行数:12,代码来源:parser.cpp


示例14: read_call

AST_Call* read_call(BufferedReader *reader) {
    AST_Call *rtn = new AST_Call();

    readExprVector(rtn->args, reader);
    rtn->col_offset = readColOffset(reader);
    rtn->func = readASTExpr(reader);

    readMiscVector(rtn->keywords, reader);

    rtn->kwargs = readASTExpr(reader);
    rtn->lineno = reader->readULL();
    rtn->starargs = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:14,代码来源:parser.cpp


示例15: read_return

AST_Return* read_return(BufferedReader *reader) {
    AST_Return *rtn = new AST_Return();

    rtn->col_offset = readColOffset(reader);
    rtn->lineno = reader->readULL();
    rtn->value = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:8,代码来源:parser.cpp


示例16: readExprVector

static void readExprVector(std::vector<AST_expr*> &vec, BufferedReader *reader) {
    int num_elts = reader->readShort();
    if (VERBOSITY("parsing") >= 2)
        printf("%d elts to read\n", num_elts);
    for (int i = 0; i < num_elts; i++) {
        vec.push_back(readASTExpr(reader));
    }
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:8,代码来源:parser.cpp


示例17: read_keyword

AST_keyword* read_keyword(BufferedReader *reader) {
    AST_keyword *rtn = new AST_keyword();

    rtn->arg = readString(reader);
    rtn->col_offset = -1;
    rtn->lineno = -1;
    rtn->value = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:9,代码来源:parser.cpp


示例18: read_index

AST_Index* read_index(BufferedReader *reader) {
    AST_Index *rtn = new AST_Index();

    rtn->col_offset = -1;
    rtn->lineno = -1;
    rtn->value = readASTExpr(reader);
    assert(rtn->value);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:9,代码来源:parser.cpp


示例19: read_assign

AST_Assign* read_assign(BufferedReader *reader) {
    AST_Assign *rtn = new AST_Assign();

    rtn->col_offset = readColOffset(reader);
    rtn->lineno = reader->readULL();
    readExprVector(rtn->targets, reader);
    rtn->value = readASTExpr(reader);
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:9,代码来源:parser.cpp


示例20: read_listcomp

AST_ListComp* read_listcomp(BufferedReader *reader) {
    AST_ListComp *rtn = new AST_ListComp();

    rtn->col_offset = readColOffset(reader);
    rtn->elt = readASTExpr(reader);
    readMiscVector(rtn->generators, reader);
    rtn->lineno = reader->readULL();
    return rtn;
}
开发者ID:HerculesShek,项目名称:pyston,代码行数:9,代码来源:parser.cpp



注:本文中的readASTExpr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ readAll函数代码示例发布时间:2022-05-30
下一篇:
C++ read8_delegate函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap