|
[jira] Closed: (BOO-255) Allow outside scopes to be used by boo interpreter: msg#00045lang.boo.devel
Message: The following issue has been closed. Resolver: Rodrigo B. de Oliveira Date: Sun, 20 Feb 2005 2:27 PM A new class has been added to Boo.Lang.Interpreter: AbstractInterpreter The methods Lookup, Declare, GetValue and SetValue can be overriden for simple custom name processing. --------------------------------------------------------------------- View the issue: http://jira.codehaus.org/browse/BOO-255 Here is an overview of the issue: --------------------------------------------------------------------- Key: BOO-255 Summary: Allow outside scopes to be used by boo interpreter Type: Improvement Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Boo Fix Fors: 0.6 Assignee: Reporter: Doug Holton Created: Sun, 20 Feb 2005 1:11 PM Updated: Sun, 20 Feb 2005 2:27 PM Description: Make it easier to run the boo interpreter from a regular boo or C# script by letting the caller provide an outside object that is used for name resolution lookups (via system.reflection). Perhaps make an overload of interpreter.Eval that accepts an object to be used for name lookups if the regular lookups fail. Or maybe create an "AddScope(instance as object)" method so that multiple outside objects can be used for name lookups. Or else use events or virtual methods to let us hook into the boo interpreter: class LocalInterpreter(InteractiveInterpreter): instance mytype as Type def constructor(inst): instance = inst mytype = inst.GetType() override def Lookup(name as string): //not possible class Person .... def ToString(): interpreter = LocalInterpreter(self) result = interpreter.Eval(formatstring) return result.ToString() if len(result.Errors) == 0 I don't know the best solution. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jira] Created: (BOO-255) Allow outside scopes to be used by boo interpreter, jira-yCVjj/EcxBJg9hUCZPvPmw |
|---|---|
| Next by Date: | Add to Boo developer group, David C. Morrill |
| Previous by Thread: | [jira] Created: (BOO-255) Allow outside scopes to be used by boo interpreter, jira-yCVjj/EcxBJg9hUCZPvPmw |
| Next by Thread: | Add to Boo developer group, David C. Morrill |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |