[Wisp-cvs] wisp/users/dig tran.py,1.126,1.127
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-22 17:17:41
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv6799 Modified Files: tran.py Log Message: implemented Interpreter.switch_to_section Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- tran.py 22 May 2003 17:02:14 -0000 1.126 +++ tran.py 22 May 2003 17:17:38 -0000 1.127 @@ -253,13 +253,15 @@ def make_section_switcher (this, name): def switcher (interpreter): - interpreter.current = interpreter.sections[name] + interpreter.switch_to_section(name) return switcher def add_section (this, name): if this.sections.has_key(name): raise 'Duplicate section name', name this.sections[name] = Linkie(this.byte_order) this.meaning[name] = 'builtin', this.make_section_switcher(name), 0 + def switch_to_section (this, name): + this.current = this.sections[name] def __init__ (this, byte_order, output = ['.text']): this.meaning = Interpreter.universal_meaning.copy() |