summaryrefslogtreecommitdiff
path: root/parse/root.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parse/root.cpp')
-rw-r--r--parse/root.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/parse/root.cpp b/parse/root.cpp
index f78e9c1f..642c538c 100644
--- a/parse/root.cpp
+++ b/parse/root.cpp
@@ -6,9 +6,8 @@
#include "common.hpp"
#include <cassert>
-AST::Path Parse_Path(TokenStream& lex, bool is_abs, bool generic_ok)
+AST::Path Parse_PathFrom(TokenStream& lex, AST::Path path, bool generic_ok)
{
- AST::Path path;
Token tok;
do
{
@@ -27,6 +26,14 @@ AST::Path Parse_Path(TokenStream& lex, bool is_abs, bool generic_ok)
return path;
}
+AST::Path Parse_Path(TokenStream& lex, bool is_abs, bool generic_ok)
+{
+ if( is_abs )
+ return Parse_PathFrom(lex, AST::Path(AST::Path::TagAbsolute()), generic_ok);
+ else
+ return Parse_PathFrom(lex, AST::Path(), generic_ok);
+}
+
static const struct {
const char* name;
enum eCoreType type;