当前位置: 首页>>代码示例>>C++>>正文


C++ readASTExpr函数代码示例

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


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


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