tilde paths: get HOME at parse time

This commit is contained in:
Shea Levy 2015-02-19 08:49:10 -05:00
parent 4646e94610
commit 4b7c9f834c

View file

@ -379,9 +379,7 @@ expr_simple
| HPATH { | HPATH {
auto path = string{$1 + 1}; auto path = string{$1 + 1};
$$ = new ExprConcatStrings(CUR_POS, false, new vector<Expr *>{ $$ = new ExprConcatStrings(CUR_POS, false, new vector<Expr *>{
new ExprPath("/"), new ExprPath(getEnv("HOME", "/")),
new ExprApp(new ExprVar(data->symbols.create("__getEnv")),
new ExprString(data->symbols.create("HOME"))),
new ExprString(data->symbols.create(path))}); new ExprString(data->symbols.create(path))});
} }
| SPATH { | SPATH {