* string2ATerm -> overloaded toATerm.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user