summaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast')
-rw-r--r--src/ast/ast.hpp5
-rw-r--r--src/ast/attrs.hpp1
-rw-r--r--src/ast/path.hpp4
3 files changed, 10 insertions, 0 deletions
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index 0a43cc71..19f0c66b 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -8,6 +8,9 @@
#ifndef AST_HPP_INCLUDED
#define AST_HPP_INCLUDED
+#define TARGETVER_1_19 true
+#define TARGETVER_1_29 true
+
#include <string>
#include <vector>
#include <stdexcept>
@@ -44,6 +47,8 @@ enum eItemType
{
ITEM_TRAIT,
ITEM_STRUCT,
+ ITEM_ENUM,
+ ITEM_UNION,
ITEM_FN,
ITEM_STATIC,
};
diff --git a/src/ast/attrs.hpp b/src/ast/attrs.hpp
index 1926e96a..860e75ee 100644
--- a/src/ast/attrs.hpp
+++ b/src/ast/attrs.hpp
@@ -77,6 +77,7 @@ class Attribute
::std::string m_name;
AttributeData m_data;
mutable bool m_is_used;
+ // TODO: Parse as a TT then expand?
public:
Attribute(Span sp, ::std::string name):
m_span(::std::move(sp)),
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index c2d13d73..2693a070 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -271,6 +271,10 @@ public:
return Path(*this) += x;
}
Path& operator+=(const Path& x);
+ Path& operator+=(PathNode pn) {
+ this->nodes().push_back( mv$(pn) );
+ return *this;
+ }
void append(PathNode node) {
assert( !m_class.is_Invalid() );