a = string(parse("1 + 1"))
On Tue, Jun 23, 2015 at 10:52 PM, jiyinyiyong <[email protected]> wrote:
> That would be nice. But it turns out to be "not defined" when I call `a =
> parse("1 + 1"); inverse(a)`. Is that a package or something?
>
> On Wed, Jun 24, 2015 at 4:44 AM Steven G. Johnson <[email protected]>
> wrote:
>
>>
>> On Sunday, June 21, 2015 at 1:31:22 AM UTC-4, Jiyin Yiyong wrote:
>>
>>> As described in http://blog.leahhanson.us/julia-introspects.html Julia
>>> parses code to AST.
>>> But is there function provided to generate code back?
>>>
>>
>> If you just want a parseable string from an AST, i.e. the "inverse" of
>> the ast=parse(string) function, you can just use string(ast).
>>
>