Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested functions cause failure #8

Open
ghissues opened this issue May 18, 2015 · 0 comments
Open

nested functions cause failure #8

ghissues opened this issue May 18, 2015 · 0 comments

Comments

@ghissues
Copy link

nested functions cause script failure on line 1058 of jsparser3.py :
while (operators and opPrecedence.get(operators[-1].type_) > opPrecedence[NEW]):

easily repeatable, here's the js file i created to get the error message below :

//fakejs.js
function isnumber(numb) {
return !isNaN(parseFloat(numb) && isFinite(numb)
}

error message :

./jsparser3.py ../fakejs.js
Traceback (most recent call last):
File "./jsparser3.py", line 1146, in
print(str(parse(open(sys.argv[1]).read(),sys.argv[1])))
File "./jsparser3.py", line 1140, in parse
n = Script(t, x)
File "./jsparser3.py", line 363, in Script
n = Statements(t, x)
File "./jsparser3.py", line 474, in Statements
n.append(Statement(t, x))
File "./jsparser3.py", line 498, in Statement
return FunctionDefinition(t, x, True, type_)
File "./jsparser3.py", line 757, in FunctionDefinition
f.body = Script(t, x2)
File "./jsparser3.py", line 363, in Script
n = Statements(t, x)
File "./jsparser3.py", line 474, in Statements
n.append(Statement(t, x))
File "./jsparser3.py", line 682, in Statement
n.value = Expression(t, x)
File "./jsparser3.py", line 1058, in Expression
opPrecedence[NEW]):
TypeError: unorderable types: NoneType() > int()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant