diff options
author | Shea Levy <shea@shealevy.com> | 2015-02-19 08:51:21 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2015-02-19 08:51:21 -0500 |
commit | e3e38a048e3dbe6d0e8beff7023a05113fe36fe8 (patch) | |
tree | df88db8d415c366142872abd3c21bcccdb3840dd | |
parent | 4b7c9f834c6e861ced90558a13fe4b78b584b710 (diff) |
tilde paths: construct the entire path at parse time
-rw-r--r-- | src/libexpr/parser.y | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 010024de5..1ab84c045 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -376,12 +376,7 @@ expr_simple $$ = stripIndentation(CUR_POS, data->symbols, *$2); } | PATH { $$ = new ExprPath(absPath($1, data->basePath)); } - | HPATH { - auto path = string{$1 + 1}; - $$ = new ExprConcatStrings(CUR_POS, false, new vector<Expr *>{ - new ExprPath(getEnv("HOME", "/")), - new ExprString(data->symbols.create(path))}); - } + | HPATH { $$ = new ExprPath(getEnv("HOME", "/") + string{$1 + 1}); } | SPATH { string path($1 + 1, strlen($1) - 2); $$ = new ExprApp(CUR_POS, |