Skip to content

Commit

Permalink
stop using vtable get_bool and get_integer instead of iseof in Token
Browse files Browse the repository at this point in the history
  • Loading branch information
NotFound committed Jul 6, 2011
1 parent fb73827 commit 9ce7c68
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions winxedst1.winxed
Expand Up @@ -185,14 +185,6 @@ class Token
self.file = file;
self.line = line;
}
function get_bool[vtable]()
{
return true;
}
function get_integer[vtable]()
{
return 1;
}

function iseof() { return false; }
function iscomment() { return false; }
Expand Down Expand Up @@ -229,14 +221,6 @@ class TokenEof : Token
{
self.Token(file, 0);
}
function get_bool[vtable]()
{
return false;
}
function get_integer[vtable]()
{
return 0;
}
function iseof() { return true; }
function viewable() { return '(End of file)'; }
}
Expand Down Expand Up @@ -9540,7 +9524,7 @@ class NamespaceBase : VarContainer
var functions = self.functions;
var classes = self.classes;
var t;
for (t = tk.get(); t && !t.isop('}'); t = tk.get())
for (t = tk.get(); !(t.iseof() || t.isop('}')); t = tk.get())
{
switch (t.checkkeyword()) {
case 'namespace':
Expand Down Expand Up @@ -9592,10 +9576,10 @@ class NamespaceBase : VarContainer
Unexpected("token", t);
}
}
if (t)
self.close_ns(t);
else
if (t.iseof())
self.unclosed_ns();
else
self.close_ns(t);
}
function optimize_base()
{
Expand Down

0 comments on commit 9ce7c68

Please sign in to comment.