fixed two issues with genas3

This commit is contained in:
Nicolas Cannasse
2012-05-24 09:50:33 +00:00
parent ab5a395256
commit 545551f2df
+11 -7
View File
@@ -450,7 +450,8 @@ class Parser {
var args = new Array();
tk = token();
if( tk != TPClose ) {
while( true ) {
var arg = true;
while( arg ) {
var name = null;
switch( tk ) {
case TId(id): name = id;
@@ -462,13 +463,15 @@ class Parser {
t = parseType();
tk = token();
}
args.push({ name : name, t : t });
args.push( { name : name, t : t } );
switch( tk ) {
case TComma:
case TPClose: break;
default: unexpected(tk);
tk = token();
case TPClose:
arg = false;
default:
unexpected(tk);
}
tk = token();
}
}
var ret = null;
@@ -493,7 +496,8 @@ class Parser {
case TId(id): a.push(id);
default: unexpected(tk);
}
while( true ) {
var next = true;
while( next ) {
tk = token();
switch( tk ) {
case TDot:
@@ -503,7 +507,7 @@ class Parser {
default: unexpected(tk);
}
case TPOpen:
break;
next = false;
default:
unexpected(tk);
}