s for all the help!
>
>
> On Wed, Apr 14, 2010 at 6:21 PM, Dino Viehland wrote:
>
>> Try calling SetLoc on the FunctionDefinition and also try setting the
>> Header property. I think if it’s some reasonable span it’ll work.
>>
>>
>>
>> *F
om] *On Behalf Of *Justin Chase
> *Sent:* Wednesday, April 14, 2010 3:35 PM
>
> *To:* Discussion of IronPython
> *Subject:* Re: [IronPython] Building via AST
>
>
>
> Ok awesome!
>
>
>
> So now I have:
>
> dynamic example = globals["Example"];
>
>
: Discussion of IronPython
Subject: Re: [IronPython] Building via AST
Ok awesome!
So now I have:
dynamic example = globals["Example"];
dynamic instance = example();
Console.WriteLine(instance.Do());
But I'm getting an exception about a line number. Any idea how I can get past
that? I
boun...@lists.ironpython.com] *On Behalf Of *Justin Chase
> *Sent:* Wednesday, April 14, 2010 11:24 AM
>
> *To:* Discussion of IronPython
> *Subject:* Re: [IronPython] Building via AST
>
>
>
> I feel like I'm so close but something isn't quite working.
script scope and just pull Example out of the
globals dictionary as well.
From: users-boun...@lists.ironpython.com
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Justin Chase
Sent: Wednesday, April 14, 2010 11:24 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Building via
lass can give you a LanguageContext from the ScriptEngine
> for Python which you can cast to a PythonContext.
>
>
>
> Let me know if it works! J
>
>
>
> *From:* users-boun...@lists.ironpython.com [mailto:
> users-boun...@lists.ironpython.com] *On Behalf Of *Justin Chase
> *Sen
J
*From:* users-boun...@lists.ironpython.com [mailto:
users-boun...@lists.ironpython.com] *On Behalf Of *Justin Chase
*Sent:* Monday, April 12, 2010 4:09 PM
To: Discussion of IronPython Subject: Re: [IronPython] Building via AST
Ok, so at risk of being a nuissance I have one last question beca
...@lists.ironpython.com] On Behalf Of Justin Chase
Sent: Monday, April 12, 2010 4:09 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Building via AST
Ok, so at risk of being a nuissance I have one last question because I feel
like I'm half way there. I have the following example that seems to
method defined in a PythonType type (which is stored as an instance
> field in the object). So while it sucks that we need to generate the IL by
> hand it’s small enough that it’s not a big deal.
>
>
>
> *From:* users-boun...@lists.ironpython.com [mailto:
> users-boun...@lis
: [IronPython] Building via AST
Ok so I'm wondering if I'm perhaps using the wrong words to try to say what I
mean. Because when I look into the IronPython source code I see a class called
Microsoft.Scripting.Generation.TypeGen
(http://ironpython.codeplex.com/SourceControl/changeset/
mpileToMethod(method);
>
> type.CreateType();
>
> asm.Save("foo.dll");
>
> }
>
> }
>
> enum Foox {
>
> Bar,
>
> Baz
>
> }
>
>
>
> *From:* users-boun...@lists.ironpython.com [mailto:
> users-boun...@
.ironpython.com
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Justin Chase
Sent: Monday, April 12, 2010 1:21 PM
To: users@lists.ironpython.com
Subject: [IronPython] Building via AST
Suppose I would like to build an AST programmatically and compile that into an
assembly dynamically (mean
Suppose I would like to build an AST programmatically and compile that into
an assembly dynamically (meaning an assembly flagged with RunAndCollect)
from C#. How would I do that with IronPython's help? I do not what to author
Python code and compile that I would like to just deal directly with the
13 matches
Mail list logo