Changeset 572547c
- Timestamp:
- Mar 15, 2017, 9:20:57 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bf4ac09
- Parents:
- e61a35e
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
re61a35e r572547c 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 14 14:45:52201713 // Update Count : 97 312 // Last Modified On : Tue Mar 14 22:42:54 2017 13 // Update Count : 974 14 14 // 15 15 … … 118 118 void DeclarationNode::print_StorageClass( std::ostream & output, StorageClasses storageClasses ) { 119 119 if ( storageClasses.val != 0 ) { // storage classes ? 120 for ( unsigned int i = 0; i < DeclarationNode::N oStorageClass; i += 1 ) {120 for ( unsigned int i = 0; i < DeclarationNode::NumStorageClass; i += 1 ) { 121 121 if ( storageClasses[i] ) { 122 122 output << DeclarationNode::storageClassNames[i] << ' '; … … 128 128 void DeclarationNode::print_FuncSpec( std::ostream & output, DeclarationNode::FuncSpecifiers funcSpec ) { 129 129 if ( funcSpec.val != 0 ) { // function specifiers ? 130 for ( unsigned int i = 0; i < DeclarationNode::N oFuncSpecifier; i += 1 ) {130 for ( unsigned int i = 0; i < DeclarationNode::NumFuncSpecifier; i += 1 ) { 131 131 if ( funcSpec[i] ) { 132 132 output << DeclarationNode::funcSpecifierNames[i] << ' '; … … 460 460 461 461 if ( (qsrc.val & qdst.val) != 0 ) { // duplicates ? 462 for ( unsigned int i = 0; i < N oTypeQualifier; i += 1 ) { // find duplicates462 for ( unsigned int i = 0; i < NumTypeQualifier; i += 1 ) { // find duplicates 463 463 if ( qsrc[i] && qdst[i] ) { 464 464 appendError( error, string( "duplicate " ) + DeclarationNode::typeQualifierNames[i] ); … … 470 470 void DeclarationNode::checkSpecifiers( DeclarationNode * src ) { 471 471 if ( (funcSpecs.val & src->funcSpecs.val) != 0 ) { // duplicates ? 472 for ( unsigned int i = 0; i < N oFuncSpecifier; i += 1 ) { // find duplicates472 for ( unsigned int i = 0; i < NumFuncSpecifier; i += 1 ) { // find duplicates 473 473 if ( funcSpecs[i] && src->funcSpecs[i] ) { 474 474 appendError( error, string( "duplicate " ) + DeclarationNode::funcSpecifierNames[i] ); … … 479 479 if ( storageClasses.val != 0 && src->storageClasses.val != 0 ) { // any reason to check ? 480 480 if ( (storageClasses.val & src->storageClasses.val ) != 0 ) { // duplicates ? 481 for ( unsigned int i = 0; i < N oStorageClass; i += 1 ) { // find duplicates481 for ( unsigned int i = 0; i < NumStorageClass; i += 1 ) { // find duplicates 482 482 if ( storageClasses[i] && src->storageClasses[i] ) { 483 483 appendError( error, string( "duplicate " ) + storageClassNames[i] ); -
src/Parser/ParseNode.h
re61a35e r572547c 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 14 16:53:19201713 // Update Count : 75 712 // Last Modified On : Tue Mar 14 22:41:37 2017 13 // Update Count : 758 14 14 // 15 15 … … 203 203 // These must remain in the same order as the corresponding DeclarationNode names. 204 204 205 enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, N oStorageClass = 5 };205 enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NumStorageClass = 5 }; 206 206 union StorageClasses { 207 207 unsigned int val; … … 218 218 }; // StorageClasses 219 219 220 enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, N oFuncSpecifier = 3 };220 enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NumFuncSpecifier = 3 }; 221 221 union FuncSpecifiers { 222 222 unsigned int val; … … 231 231 }; // FuncSpecifiers 232 232 233 enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, N oTypeQualifier = 6 };233 enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NumTypeQualifier = 6 }; 234 234 union TypeQualifiers { 235 235 unsigned int val; -
src/Parser/TypeData.cc
re61a35e r572547c 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 14 15:01:44201713 // Update Count : 54 812 // Last Modified On : Tue Mar 14 22:43:20 2017 13 // Update Count : 549 14 14 // 15 15 … … 226 226 227 227 void TypeData::print( ostream &os, int indent ) const { 228 for ( int i = 0; i < DeclarationNode::N oTypeQualifier; i += 1 ) {228 for ( int i = 0; i < DeclarationNode::NumTypeQualifier; i += 1 ) { 229 229 if ( typeQualifiers[i] ) os << DeclarationNode::typeQualifierNames[ i ] << ' '; 230 230 } // for
Note: See TracChangeset
for help on using the changeset viewer.