diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-22 18:37:20 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-22 18:37:20 +0800 |
commit | 5c61e0955197adb58fdf7911ccf7e05c13f2263d (patch) | |
tree | ec216818778c9351f850bb4044a58c0cc6e691a4 /src/parse/types.cpp | |
parent | fc9a04403eb5b694d37f77baa0de2f8e363f46f1 (diff) | |
download | mrust-5c61e0955197adb58fdf7911ccf7e05c13f2263d.tar.gz |
Clean up local path resolution, add internal 'str' type
Diffstat (limited to 'src/parse/types.cpp')
-rw-r--r-- | src/parse/types.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parse/types.cpp b/src/parse/types.cpp index 57c1bad8..bbbdd4f8 100644 --- a/src/parse/types.cpp +++ b/src/parse/types.cpp @@ -87,6 +87,11 @@ TypeRef Parse_Type(TokenStream& lex) if( tok.str() == CORETYPES[i].name ) return TypeRef(TypeRef::TagPrimitive(), CORETYPES[i].type); } + if( tok.str() == "str" ) + { + // TODO: Create an internal newtype for 'str' + return TypeRef(TypeRef::TagPath(), AST::Path({ AST::PathNode("#",{}), AST::PathNode("str",{}) })); + } // - Fall through to path handling // '::' - Absolute path case TOK_DOUBLE_COLON: { |