- Timestamp:
- Mar 24, 2023, 4:44:50 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 75d874a
- Parents:
- d30e3eb (diff), 056bee8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Print.cpp
rd30e3eb r1633e04 369 369 --indent; 370 370 } 371 } 372 373 if ( ! node->withExprs.empty() ) { 374 // Not with a clause, but the 'with clause'. 375 ++indent; 376 os << " with clause" << endl << indent; 377 printAll( node->withExprs ); 378 --indent; 371 379 } 372 380 -
src/Common/module.mk
rd30e3eb r1633e04 20 20 Common/CodeLocationTools.hpp \ 21 21 Common/CodeLocationTools.cpp \ 22 Common/Debug.h \23 22 Common/DeclStats.hpp \ 24 23 Common/DeclStats.cpp \ -
src/Common/utility.h
rd30e3eb r1633e04 190 190 } 191 191 192 template< typename... Params >193 void warn( const Params & ... params ) {194 std::cerr << "Warning: ";195 toString_single( std::cerr, params... );196 std::cerr << std::endl;197 }198 199 192 // determines if pref is a prefix of str 200 193 static inline bool isPrefix( const std::string & str, const std::string & pref, unsigned int start = 0 ) { -
src/InitTweak/FixInit.cc
rd30e3eb r1633e04 1233 1233 } 1234 1234 1235 template< typename Visitor, typename... Params >1236 void error( Visitor & v, CodeLocation loc, const Params &... params ) {1237 SemanticErrorException err( loc, toString( params... ) );1238 v.errors.append( err );1239 }1240 1241 1235 template< typename... Params > 1242 1236 void GenStructMemberCalls::emit( CodeLocation loc, const Params &... params ) { 1243 // toggle warnings vs. errors here. 1244 // warn( params... ); 1245 error( *this, loc, params... ); 1237 SemanticErrorException err( loc, toString( params... ) ); 1238 errors.append( err ); 1246 1239 } 1247 1240 -
src/InitTweak/FixInitNew.cpp
rd30e3eb r1633e04 1303 1303 } 1304 1304 1305 template< typename Visitor, typename... Params >1306 void error( Visitor & v, CodeLocation loc, const Params &... params ) {1307 SemanticErrorException err( loc, toString( params... ) );1308 v.errors.append( err );1309 }1310 1311 1305 template< typename... Params > 1312 1306 void GenStructMemberCalls::emit( CodeLocation loc, const Params &... params ) { 1313 // toggle warnings vs. errors here. 1314 // warn( params... ); 1315 error( *this, loc, params... ); 1307 SemanticErrorException err( loc, toString( params... ) ); 1308 errors.append( err ); 1316 1309 } 1317 1310 -
src/Parser/parser.yy
rd30e3eb r1633e04 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 21 19:01:00202313 // Update Count : 599012 // Last Modified On : Wed Mar 22 21:26:01 2023 13 // Update Count : 6002 14 14 // 15 15 … … 270 270 SemanticError( yylloc, ::toString( "Identifier \"", identifier, "\" cannot appear before a ", kind, ".\n" 271 271 "Possible cause is misspelled storage/CV qualifier, misspelled typename, or missing generic parameter." ) ); 272 } // IdentifierBeforeType 273 274 static bool TypedefForall( DeclarationNode * decl ) { 275 if ( decl->type->forall || (decl->type->kind == TypeData::Aggregate && decl->type->aggregate.params) ) { 276 SemanticError( yylloc, "forall qualifier in typedef is currently unimplemented." ); 277 return true; 278 } // if 279 return false; 272 280 } // IdentifierBeforeType 273 281 … … 1958 1966 TYPEDEF type_specifier declarator 1959 1967 { 1960 // if type_specifier is an anon aggregate => name1961 1968 typedefTable.addToEnclosingScope( *$3->name, TYPEDEFname, "4" ); 1962 $$ = $3->addType( $2 )->addTypedef(); // watchout frees $2 and $3 1969 if ( TypedefForall( $2 ) ) $$ = nullptr; 1970 else $$ = $3->addType( $2 )->addTypedef(); // watchout frees $2 and $3 1963 1971 } 1964 1972 | typedef_declaration pop ',' push declarator … … 1970 1978 { 1971 1979 typedefTable.addToEnclosingScope( *$4->name, TYPEDEFname, "6" ); 1972 $$ = $4->addQualifiers( $1 )->addType( $3 )->addTypedef(); 1980 if ( TypedefForall( $1 ) ) $$ = nullptr; 1981 else $$ = $4->addQualifiers( $1 )->addType( $3 )->addTypedef(); 1973 1982 } 1974 1983 | type_specifier TYPEDEF declarator 1975 1984 { 1976 1985 typedefTable.addToEnclosingScope( *$3->name, TYPEDEFname, "7" ); 1977 $$ = $3->addType( $1 )->addTypedef(); 1986 if ( TypedefForall( $1 ) ) $$ = nullptr; 1987 else $$ = $3->addType( $1 )->addTypedef(); 1978 1988 } 1979 1989 | type_specifier TYPEDEF type_qualifier_list declarator 1980 1990 { 1981 1991 typedefTable.addToEnclosingScope( *$4->name, TYPEDEFname, "8" ); 1982 $$ = $4->addQualifiers( $1 )->addType( $1 )->addTypedef(); 1992 if ( TypedefForall( $3 ) ) $$ = nullptr; 1993 else $$ = $4->addQualifiers( $1 )->addType( $1 )->addTypedef(); 1983 1994 } 1984 1995 ; -
src/SynTree/FunctionDecl.cc
rd30e3eb r1633e04 87 87 } // if 88 88 89 if ( !withExprs.empty() ) { 90 os << indent << "... with clause" << std::endl; 91 os << indent + 1; 92 printAll( withExprs, os, indent + 1 ); 93 } 94 89 95 if ( statements ) { 90 96 os << indent << "... with body" << endl << indent+1;
Note:
See TracChangeset
for help on using the changeset viewer.