summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-22 20:30:38 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-22 20:30:38 +0800
commitea8009fe09439842219655ba207875aefc55e162 (patch)
tree232b12aa4658c9b34bf5ff0699b62a60a63a8077 /src/parse
parentcc4c5fbe0c4980d4a0a7350c82f6f586bbcd38b5 (diff)
downloadmrust-ea8009fe09439842219655ba207875aefc55e162.tar.gz
Parse Types - Allow 'self' to start a path
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/types.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parse/types.cpp b/src/parse/types.cpp
index 74565d52..4f17dec1 100644
--- a/src/parse/types.cpp
+++ b/src/parse/types.cpp
@@ -95,7 +95,9 @@ TypeRef Parse_Type_Int(TokenStream& lex, bool allow_trait_list)
case TOK_DOUBLE_COLON:
PUTBACK(tok, lex);
return Parse_Type_Path(lex, {}, allow_trait_list);
+ // 'self' - This relative path
// 'super' - Parent relative path
+ case TOK_RWORD_SELF:
case TOK_RWORD_SUPER:
PUTBACK(tok, lex);
return Parse_Type_Path(lex, {}, allow_trait_list);