diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-11-03T18·12+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-11-03T18·12+0000 |
commit | cb7ccb528bbaeb30d09fbb41e57ab75d3121e1bc (patch) | |
tree | d27270a2b3c6abc86f56956d906899374778f028 /src/libexpr/parser.y | |
parent | 4cbd845aa491b5cf534f8c031d285fc454933868 (diff) |
* string2ATerm -> overloaded toATerm.
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 '}' |