summaryrefslogtreecommitdiff
path: root/src/ast/ast.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-10 15:37:02 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-10 15:37:02 +0800
commite71fccd80610bc05b0a90338b2b3beb9a0b94c22 (patch)
tree22162a90d614a200483bd0ceae629671ff798e41 /src/ast/ast.hpp
parent65558948954daaa2aec68b76814b043bf829d608 (diff)
downloadmrust-e71fccd80610bc05b0a90338b2b3beb9a0b94c22.tar.gz
Rework macro handling to support correct repetitions
Diffstat (limited to 'src/ast/ast.hpp')
-rw-r--r--src/ast/ast.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index c1c9c283..1da79696 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -159,8 +159,9 @@ class MetaItem;
class MetaItems:
public Serialisable
{
- ::std::vector<MetaItem> m_items;
public:
+ ::std::vector<MetaItem> m_items;
+
MetaItems() {}
MetaItems(::std::vector<MetaItem> items):
m_items(items)
@@ -197,6 +198,8 @@ public:
void mark_used() {}
const ::std::string& name() const { return m_name; }
+ bool has_sub_items() const { return m_sub_items.m_items.size() > 0; }
+ MetaItems& items() { return m_sub_items; }
SERIALISABLE_PROTOTYPES();
};