[IronPython] ToyScript - Parses code twice?

Dino Viehland dinov at exchange.microsoft.com
Wed Jul 2 00:36:47 CEST 2008

IF you haven't figured this out yet I think it's due to the fact that it gets parsed once to get the source code properties (by the console) and once to compile it.  It should only be interactive code that this is happening to.  If it's happening to all code then there's probably a bug somewhere that should be fixed.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ben Hall
Sent: Sunday, June 29, 2008 2:07 PM
To: Discussion of IronPython
Subject: [IronPython] ToyScript - Parses code twice?


I was just looking at ToyScript and how it generates the DLR Trees,
and i've found that ParseSourceCode is called twice for a single line
of code (in this case print "a" + "b").  I was just wondering is the
DLR parsing the source code twice? It seems quite inaffective but i'm
sure you have a reason.  I would have thought you would only need to
generate the DLR Tree once.

If you could let me know why this is the case, that would be great.


Users mailing list
Users at lists.ironpython.com

More information about the Ironpython-users mailing list