Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    rff3b0249 r1387ea0  
    99// Author           : Thierry Delisle
    1010// Created On       : Thu May 09 15::37::05 2019
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb  2 13:19:22 2022
    13 // Update Count     : 41
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Jul 14 16:15:00 2021
     13// Update Count     : 37
    1414//
    1515
     
    393393                auto stmt = new IfStmt(
    394394                        get<Expression>().accept1( node->cond ),
    395                         get<Statement>().accept1( node->then ),
    396                         get<Statement>().accept1( node->else_ ),
     395                        get<Statement>().accept1( node->thenPart ),
     396                        get<Statement>().accept1( node->elsePart ),
    397397                        get<Statement>().acceptL( node->inits )
    398398                );
     
    419419        }
    420420
    421         const ast::Stmt * visit( const ast::WhileDoStmt * node ) override final {
     421        const ast::Stmt * visit( const ast::WhileStmt * node ) override final {
    422422                if ( inCache( node ) ) return nullptr;
    423423                auto inits = get<Statement>().acceptL( node->inits );
    424                 auto stmt = new WhileDoStmt(
     424                auto stmt = new WhileStmt(
    425425                        get<Expression>().accept1( node->cond ),
    426426                        get<Statement>().accept1( node->body ),
    427                         get<Statement>().accept1( node->else_ ),
    428427                        inits,
    429428                        node->isDoWhile
     
    438437                        get<Expression>().accept1( node->cond ),
    439438                        get<Expression>().accept1( node->inc ),
    440                         get<Statement>().accept1( node->body ),
    441                         get<Statement>().accept1( node->else_ )
     439                        get<Statement>().accept1( node->body )
    442440                );
    443441                return stmtPostamble( stmt, node );
     
    18741872                        old->location,
    18751873                        GET_ACCEPT_1(condition, Expr),
    1876                         GET_ACCEPT_1(then, Stmt),
    1877                         GET_ACCEPT_1(else_, Stmt),
     1874                        GET_ACCEPT_1(thenPart, Stmt),
     1875                        GET_ACCEPT_1(elsePart, Stmt),
    18781876                        GET_ACCEPT_V(initialization, Stmt),
    18791877                        GET_LABELS_V(old->labels)
     
    19041902        }
    19051903
    1906         virtual void visit( const WhileDoStmt * old ) override final {
     1904        virtual void visit( const WhileStmt * old ) override final {
    19071905                if ( inCache( old ) ) return;
    1908                 this->node = new ast::WhileDoStmt(
     1906                this->node = new ast::WhileStmt(
    19091907                        old->location,
    19101908                        GET_ACCEPT_1(condition, Expr),
    19111909                        GET_ACCEPT_1(body, Stmt),
    1912                         GET_ACCEPT_1(else_, Stmt),
    19131910                        GET_ACCEPT_V(initialization, Stmt),
    19141911                        old->isDoWhile,
     
    19261923                        GET_ACCEPT_1(increment, Expr),
    19271924                        GET_ACCEPT_1(body, Stmt),
    1928                         GET_ACCEPT_1(else_, Stmt),
    19291925                        GET_LABELS_V(old->labels)
    19301926                );
Note: See TracChangeset for help on using the changeset viewer.