Skip to content

Slimit crashes on Flot #2

RuiPereira opened this Issue Jun 6, 2011 · 3 comments

2 participants


While using slimit on flot (, it crashes:

$ cat jquery.flot.js | slimit
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/slimit", line 9, in 
    load_entry_point('slimit==0.6dev', 'console_scripts', 'slimit')()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/slimit-0.6dev-py2.6.egg/slimit/", line 62, in main
    minified = minify(text, mangle=options.mangle)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/slimit-0.6dev-py2.6.egg/slimit/", line 38, in minify
    tree = parser.parse(text)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/slimit-0.6dev-py2.6.egg/slimit/", line 64, in parse
    return self.parser.parse(text, lexer=self.lexer, debug=debug)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ply/", line 265, in parse
    return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ply/", line 1047, in parseopt_notrack
    tok = self.errorfunc(errtoken)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/slimit-0.6dev-py2.6.egg/slimit/", line 87, in p_error
    self.lexer.prev_token, self.lexer.token())
SyntaxError: Unexpected token (NULL, 'null') at 1:25224 between LexToken(VAR,'var',1,25220) and LexToken(ID,'ify',1,25228)

Quite possibly on line 558:

var nullify = p == null;
rspivak commented Jun 6, 2011

Thanks for the bug report. I've made a fix and released a new version 0.5.1. I've also added you to the CREDIT file.

@rspivak rspivak closed this Jun 6, 2011

Great, it works now, thanks.

rspivak commented Jun 6, 2011

You're welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.