Changes in src/Parser/ExpressionNode.cc [7f5566b:1869adf]
- File:
-
- 1 edited
-
src/Parser/ExpressionNode.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cc
r7f5566b r1869adf 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:17:07 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 30 14:53:23201513 // Update Count : 1 8811 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jun 24 16:20:00 2015 13 // Update Count : 158 14 14 // 15 15 … … 42 42 } 43 43 44 ExpressionNode * ExpressionNode::set_a rgName( const std::string *aName ) {44 ExpressionNode * ExpressionNode::set_asArgName( const std::string *aName ) { 45 45 argName = new VarRefNode( aName ); 46 46 return this; 47 47 } 48 48 49 ExpressionNode * ExpressionNode::set_a rgName( ExpressionNode *aDesignator ) {49 ExpressionNode * ExpressionNode::set_asArgName( ExpressionNode *aDesignator ) { 50 50 argName = aDesignator; 51 51 return this; … … 210 210 assert( type == String ); 211 211 212 // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string.212 // "abc" "def" "ghi" => "abcdefghi", so remove new text from quotes and insert before last quote in old string. 213 213 value.insert( value.length() - 1, newValue->substr( 1, newValue->length() - 2 ) ); 214 214 … … 330 330 //############################################################################## 331 331 332 CompositeExprNode::CompositeExprNode( ) : ExpressionNode(), function( 0 ), arguments( 0 ) {332 CompositeExprNode::CompositeExprNode( void ) : ExpressionNode(), function( 0 ), arguments( 0 ) { 333 333 } 334 334 … … 541 541 { 542 542 assert( args.size() == 3); 543 std::list< Expression * >::const_iterator i = args.begin();543 std::list< Expression* >::const_iterator i = args.begin(); 544 544 Expression *arg1 = notZeroExpr( *i++ ); 545 545 Expression *arg2 = *i++; … … 552 552 { 553 553 assert( args.size() == 2); 554 std::list< Expression * >::const_iterator i = args.begin();554 std::list< Expression* >::const_iterator i = args.begin(); 555 555 Expression *ret = *i++; 556 556 while ( i != args.end() ) { … … 617 617 set_args( arg ); 618 618 } 619 620 //##############################################################################621 622 Expression *AsmExprNode::build() const {623 return new AsmExpr( maybeBuild< Expression >( inout ), (ConstantExpr *)constraint->build(), operand->build() );624 }625 626 void AsmExprNode::print( std::ostream &os, int indent ) const {627 os << string( indent, ' ' ) << "Assembler Expression:" << endl;628 if ( inout ) {629 os << string( indent, ' ' ) << "inout: " << std::endl;630 inout->print( os, indent + 2 );631 } // if632 if ( constraint ) {633 os << string( indent, ' ' ) << "constraint: " << std::endl;634 constraint->print( os, indent + 2 );635 } // if636 if ( operand ) {637 os << string( indent, ' ' ) << "operand: " << std::endl;638 operand->print( os, indent + 2 );639 } // if640 }641 642 void AsmExprNode::printOneLine( std::ostream &os, int indent ) const {643 printDesignation( os );644 os << "( ";645 if ( inout ) inout->printOneLine( os, indent + 2 );646 os << ", ";647 if ( constraint ) constraint->printOneLine( os, indent + 2 );648 os << ", ";649 if ( operand ) operand->printOneLine( os, indent + 2 );650 os << ") ";651 }652 653 //##############################################################################654 655 void LabelNode::print( std::ostream &os, int indent ) const {}656 657 void LabelNode::printOneLine( std::ostream &os, int indent ) const {}658 619 659 620 //##############################################################################
Note:
See TracChangeset
for help on using the changeset viewer.