Changeset cf0941d


Ignore:
Timestamp:
Jun 4, 2015, 11:08:06 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
44b5ca0
Parents:
c7ed6d0
Message:

adjust printing for AST dump, formatting

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    rc7ed6d0 rcf0941d  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 29 16:17:02 2015
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jun  4 21:29:57 2015
     13// Update Count     : 9
    1414//
    1515
     
    6060        for ( typename Container::const_iterator i = container.begin(); i != container.end(); ++i ) {
    6161                if ( *i ) {
    62                         os << std::string(indent,  ' ');
     62                        os << std::string( indent,  ' ' );
    6363                        (*i)->print( os, indent + 2 );
    6464                        os << std::endl;
     
    151151template< typename T >
    152152void replace( std::list< T > &org, typename std::list< T >::iterator pos, std::list< T > &with ) {
    153         // TIter should secretly be a typename std::list< T >::iterator
    154         //   ( g++ 3.2 issues a 'is implicitly a typename' warning if I make this explicit )
    155153        typename std::list< T >::iterator next = pos; advance( next, 1 );
    156154
  • src/Parser/parser.yy

    rc7ed6d0 rcf0941d  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun  3 22:03:06 2015
    13 // Update Count     : 1020
     12// Last Modified On : Thu Jun  4 21:38:06 2015
     13// Update Count     : 1021
    1414//
    1515
  • src/SynTree/ArrayType.cc

    rc7ed6d0 rcf0941d  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 07:52:08 2015
    13 // Update Count     : 2
     12// Last Modified On : Thu Jun  4 21:16:46 2015
     13// Update Count     : 7
    1414//
    1515
     
    2525
    2626ArrayType::ArrayType( const ArrayType &other )
    27         : Type( other ), base( maybeClone( other.base ) ), dimension( maybeClone( other.dimension ) ),
    28           isVarLen( other.isVarLen ), isStatic( other.isStatic ) {
     27                : Type( other ), base( maybeClone( other.base ) ), dimension( maybeClone( other.dimension ) ),
     28                  isVarLen( other.isVarLen ), isStatic( other.isStatic ) {
    2929}
    3030
     
    4343        } else if ( dimension ) {
    4444                os << "array of ";
    45                 dimension->print( os, indent );
    4645        } else {
    4746                os << "open array of ";
     
    4948        if ( base ) {
    5049                base->print( os, indent );
     50        } // if
     51        if ( dimension ) {
     52                dimension->print( os, indent );
    5153        } // if
    5254}
  • src/SynTree/Expression.cc

    rc7ed6d0 rcf0941d  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 08:27:07 2015
    13 // Update Count     : 2
     12// Last Modified On : Thu Jun  4 21:42:55 2015
     13// Update Count     : 10
    1414//
    1515
     
    5252void Expression::print(std::ostream &os, int indent) const {
    5353        if ( env ) {
    54                 os << std::string(indent, ' ') << "with environment:" << std::endl;
     54                os << std::string( indent, ' ' ) << "with environment:" << std::endl;
    5555                env->print( os, indent+2 );
    5656        } // if
    5757
    5858        if ( argName ) {
    59                 os << std::string(indent, ' ') << "with designator:";
     59                os << std::string( indent, ' ' ) << "with designator:";
    6060                argName->print( os, indent+2 );
    6161        } // if
     
    7272
    7373void ConstantExpr::print( std::ostream &os, int indent ) const {
    74         os << std::string(indent, ' ') << "Constant Expression: " ;
    75         constant.print(os);
    76         os << std::endl;
     74        os << std::endl;
     75        os << std::string( indent, ' ' ) << "dimension of constant expression: " ;
     76        constant.print( os );
    7777        Expression::print( os, indent );
    7878}
  • src/SynTree/ObjectDecl.cc

    rc7ed6d0 rcf0941d  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu May 28 14:10:02 2015
    13 // Update Count     : 8
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jun  4 21:21:12 2015
     13// Update Count     : 10
    1414//
    1515
     
    3636void ObjectDecl::print( std::ostream &os, int indent ) const {
    3737        if ( get_name() != "" ) {
    38                 os << get_name() << ": a ";
     38                os << get_name() << ": ";
    3939        } // if
    4040
     
    6767#if 0
    6868        if ( get_mangleName() != "") {
    69                 os << get_mangleName() << ": a ";
     69                os << get_mangleName() << ": ";
    7070        } else
    7171#endif
    7272        if ( get_name() != "" ) {
    73                 os << get_name() << ": a ";
     73                os << get_name() << ": ";
    7474        } // if
    7575
  • src/Tests/SynTree/Array.c

    rc7ed6d0 rcf0941d  
    11int a1[];
    22int a2[*];
    3 int a4[3];
     3double a4[3.0];
    44
    55int m1[][3];
Note: See TracChangeset for help on using the changeset viewer.