Changeset ea9b9d3


Ignore:
Timestamp:
Jun 11, 2015, 1:38:57 PM (10 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
b5b0907
Parents:
a8541d9
Message:

fix dimension of string literals, reformat Constant AST node output format

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/Parser/ExpressionNode.cc

    ra8541d9 rea9b9d3  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:17:07 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jun  8 17:33:40 2015
    13 // Update Count     : 147
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Jun 10 14:57:52 2015
     13// Update Count     : 151
    1414//
    1515
     
    252252                                                                                   new ConstantExpr(
    253253                                                                                           Constant( new BasicType( q, BasicType::UnsignedInt ),
    254                                                                                                                  toString( value.size() + 1 ) ) ),  // account for '\0'
     254                                                                                                                 toString( value.size()+1-2 ) ) ),  // +1 for '\0' and -2 for '"'
    255255                                                                                   false, false );
    256256                        return new ConstantExpr( Constant( at, value ), maybeBuild< Expression >( get_argName() ) );
  • TabularUnified src/SynTree/Constant.cc

    ra8541d9 rea9b9d3  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jun  7 08:45:30 2015
    13 // Update Count     : 5
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Jun 10 14:41:03 2015
     13// Update Count     : 8
    1414//
    1515
     
    2727
    2828void Constant::print( std::ostream &os ) const {
    29         os << value;
     29        os << "(" << value;
    3030        if ( type ) {
    31                 os << " ";
     31                os << ": ";
    3232                type->print( os );
    3333        } // if
     34  os << ")";
    3435}
    3536
Note: See TracChangeset for help on using the changeset viewer.