diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-22 09:28:56 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-22 09:28:56 +0800 |
commit | 5aac662e859d10f42b541405fa0b8d14a1c1e2a8 (patch) | |
tree | a80f9e0d18a3fdd0c16a2244e204d29b474d0fe5 /src/ast/path.hpp | |
parent | 7944c18843cb82b21973521b6007a3d490e92318 (diff) | |
download | mrust-5aac662e859d10f42b541405fa0b8d14a1c1e2a8.tar.gz |
Hack in UFCS <Type as Trait> syntax
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r-- | src/ast/path.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp index 447ff0a0..4701b03a 100644 --- a/src/ast/path.hpp +++ b/src/ast/path.hpp @@ -80,6 +80,7 @@ private: RELATIVE, ABSOLUTE, LOCAL, + UFCS, }; /// The crate defining the root of this path (used for path resolution) @@ -89,7 +90,9 @@ private: /// - Absolute is "relative" to the crate root /// - Relative doesn't have a set crate (and can't be resolved) /// - Local is a special case to handle possible use of local varaibles + /// - UFCS is relative to a type Class m_class; + ::std::vector<TypeRef> m_ufcs; ::std::vector<PathNode> m_nodes; BindingType m_binding_type = UNBOUND; @@ -114,6 +117,8 @@ public: Path(TagAbsolute): m_class(ABSOLUTE) {} + struct TagUfcs {}; + Path(TagUfcs, TypeRef type, TypeRef trait); struct TagLocal {}; Path(TagLocal, ::std::string name): m_class(LOCAL), |