diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-14 14:35:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-14 14:35:19 +0200 |
commit | a32d89c25b80f443d93a050a979e465f4d1dc39e (patch) | |
tree | 9e168504996951118230d24056811c4c48bd938d /xsde/cxx/parser/driver-source.cxx | |
parent | 62cadf03af778b508bd684be19c6e6958b2fe52f (diff) |
Fix bug in aggregate generation for derived lists
Diffstat (limited to 'xsde/cxx/parser/driver-source.cxx')
-rw-r--r-- | xsde/cxx/parser/driver-source.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/xsde/cxx/parser/driver-source.cxx b/xsde/cxx/parser/driver-source.cxx index 516b836..6c85cd1 100644 --- a/xsde/cxx/parser/driver-source.cxx +++ b/xsde/cxx/parser/driver-source.cxx @@ -29,10 +29,12 @@ namespace CXX // For base types we only want member's types, but not the // base itself. // - struct BaseType: Traversal::Complex, Context + struct BaseType: Traversal::Complex, + Traversal::List, + Context { - BaseType (Context& c) - : Context (c) + BaseType (Context& c, Traversal::NodeBase& def) + : Context (c), def_ (def) { } @@ -47,6 +49,15 @@ namespace CXX contains_compositor (c); } } + + virtual Void + traverse (SemanticGraph::List& l) + { + def_.dispatch (l.argumented ().type ()); + } + + private: + Traversal::NodeBase& def_; }; struct ParserDef: Traversal::Type, @@ -112,7 +123,7 @@ namespace CXX Context { ParserDef (Context& c, TypeInstanceMap& map, InstanceSet& set) - : Context (c), map_ (map), set_ (set), base_ (c) + : Context (c), map_ (map), set_ (set), base_ (c, *this) { *this >> inherits_ >> base_ >> inherits_; @@ -641,7 +652,7 @@ namespace CXX Context { ParserConnect (Context& c, TypeInstanceMap& map) - : Context (c), map_ (map), base_ (c) + : Context (c), map_ (map), base_ (c, *this) { *this >> inherits_ >> base_ >> inherits_; |