[Wisp-cvs] wisp/users/dig tran.py,1.70,1.71
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-15 12:27:33
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv20699 Modified Files: tran.py Log Message: renamed Preprocessor.macros to Preprocessor.tss Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- tran.py 15 May 2003 06:10:12 -0000 1.70 +++ tran.py 15 May 2003 12:27:30 -0000 1.71 @@ -137,16 +137,17 @@ return datum class Preprocessor (Lexer): + __slots__ = ['tss'] def __init__ (this, filename): Lexer.__init__(this, filename) - this.macros = [] + this.tss = [] def push_macro (this, l): - this.macros.append(Macro_Cursor(l)) + this.tss.append(Macro_Cursor(l)) def get_token (this): tok = None - while this.macros and tok == None: - tok = this.macros[-1].get_token() - if tok == None: this.macros.pop() + while this.tss and tok == None: + tok = this.tss[-1].get_token() + if tok == None: this.tss.pop() if tok <> None: return tok else: return Lexer.get_token(this) |