diff options
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r-- | src/libexpr/parser.y | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 8573697b634d..1f204a228009 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -31,9 +31,14 @@ void yyerror(YYLTYPE * loc, yyscan_t scanner, void * data, char * s) parseError(data, s, loc->first_line, loc->first_column); } +ATerm toATerm(const char * s) +{ + return (ATerm) ATmakeAppl0(ATmakeAFun((char *) s, 0, ATtrue)); +} + static Pos makeCurPos(YYLTYPE * loc, void * data) { - return makePos(string2ATerm(getPath(data)), + return makePos(toATerm(getPath(data)), loc->first_line, loc->first_column); } @@ -122,7 +127,7 @@ expr_simple /* Let expressions `let {..., body = ...}' are just desugared into `(rec {..., body = ...}).body'. */ | LET '{' binds '}' - { $$ = makeSelect(fixAttrs(1, $3), string2ATerm("body")); } + { $$ = makeSelect(fixAttrs(1, $3), toATerm("body")); } | REC '{' binds '}' { $$ = fixAttrs(1, $3); } | '{' binds '}' |