Changes in src/Parser/ParseNode.h [e994912:3a5131ed]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
re994912 r3a5131ed 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 9 14:45:28201713 // Update Count : 6 5812 // Last Modified On : Thu Feb 16 13:15:55 2017 13 // Update Count : 661 14 14 // 15 15 … … 39 39 //############################################################################## 40 40 41 extern char* yyfilename; 42 extern int yylineno; 43 41 44 class ParseNode { 42 45 public: … … 65 68 ParseNode * next = nullptr; 66 69 std::string * name = nullptr; 70 CodeLocation location = { yyfilename, yylineno }; 67 71 }; // ParseNode 68 72 … … 410 414 while ( cur ) { 411 415 try { 412 // SynTreeType * result = dynamic_cast< SynTreeType * >( maybeBuild< typename std::result_of< decltype(&NodeType::build)(NodeType)>::type >( cur ) );413 416 SynTreeType * result = dynamic_cast< SynTreeType * >( maybeBuild< typename std::pointer_traits< decltype(cur->build())>::element_type >( cur ) ); 414 417 if ( result ) { 418 result->location = cur->location; 415 419 * out++ = result; 416 420 } // if 417 421 } catch( SemanticError &e ) { 422 e.set_location( cur->location ); 418 423 errors.append( e ); 419 424 } // try … … 432 437 template< typename SynTreeType, typename NodeType > 433 438 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > &outputList ) { 434 buildList( firstNode, outputList);439 buildList( firstNode, outputList ); 435 440 delete firstNode; 436 441 }
Note:
See TracChangeset
for help on using the changeset viewer.