diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-25 17:35:00 +1100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-25 17:35:00 +1100 |
commit | 69537686be13f6ff84ce79e84374351e943ab21b (patch) | |
tree | de4bef9b5ace623b59751447b9131046483d2388 /src/ast/pattern.cpp | |
parent | 27b0292ca6828eed7e782a57ad4d641f0ebf7357 (diff) | |
parent | 753a2f44cc4c00b952cddae2ceed066ebb18a470 (diff) | |
download | mrust-69537686be13f6ff84ce79e84374351e943ab21b.tar.gz |
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'src/ast/pattern.cpp')
-rw-r--r-- | src/ast/pattern.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ast/pattern.cpp b/src/ast/pattern.cpp index 3128fd91..bfcc6eeb 100644 --- a/src/ast/pattern.cpp +++ b/src/ast/pattern.cpp @@ -123,7 +123,7 @@ namespace AST { os << ent.leading; needs_comma = true; } - + if( needs_comma ) { os << ", "; } @@ -131,7 +131,7 @@ namespace AST { os << ent.extra_bind.m_name; os << ".."; needs_comma = true; - + if(ent.trailing.size()) { if( needs_comma ) { os << ", "; @@ -167,7 +167,7 @@ AST::Pattern AST::Pattern::clone() const AST::Pattern rv; rv.m_span = m_span; rv.m_binding = PatternBinding(m_binding); - + struct H { static ::std::unique_ptr<Pattern> clone_sp(const ::std::unique_ptr<Pattern>& p) { return ::std::make_unique<Pattern>( p->clone() ); @@ -198,7 +198,7 @@ AST::Pattern AST::Pattern::clone() const throw ""; } }; - + TU_MATCH(Pattern::Data, (m_data), (e), (Any, rv.m_data = Data::make_Any(e); @@ -237,7 +237,7 @@ AST::Pattern AST::Pattern::clone() const rv.m_data = Data::make_SplitSlice({ H::clone_list(e.leading), e.extra_bind, H::clone_list(e.trailing) }); ) ) - + return rv; } |