1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* string2ATerm -> overloaded toATerm.

This commit is contained in:
Eelco Dolstra 2004-11-03 18:12:03 +00:00
parent 4cbd845aa4
commit cb7ccb528b
10 changed files with 61 additions and 43 deletions

View file

@ -27,3 +27,15 @@ Error badTerm(const format & f, ATerm t)
}
return Error(format("%1%, in `%2%'") % f.str() % (string) s);
}
ATerm toATerm(const char * s)
{
return (ATerm) ATmakeAppl0(ATmakeAFun((char *) s, 0, ATtrue));
}
ATerm toATerm(const string & s)
{
return toATerm(s.c_str());
}

View file

@ -41,4 +41,9 @@ public:
Error badTerm(const format & f, ATerm t);
/* Convert strings to ATerms. */
ATerm toATerm(const char * s);
ATerm toATerm(const string & s);
#endif /* !__ATERM_H */