You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slimit crashes when trying to minify anything that tries to get a reference to .default. As a workaround, you can access it with object['default'].
>>> slimit.minify("var a={b:'b', c:'c', default:'def'}; console.log(a.default)")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\slimit\minifier.py", line 38, in minify
tree = parser.parse(text)
File "C:\Python27\lib\site-packages\slimit\parser.py", line 93, in parse
return self.parser.parse(text, lexer=self.lexer, debug=debug)
File "C:\Python27\lib\site-packages\ply\yacc.py", line 265, in parse
return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
File "C:\Python27\lib\site-packages\ply\yacc.py", line 1047, in parseopt_notra
ck
tok = self.errorfunc(errtoken)
File "C:\Python27\lib\site-packages\slimit\parser.py", line 116, in p_error
self._raise_syntax_error(token)
File "C:\Python27\lib\site-packages\slimit\parser.py", line 89, in _raise_synt
ax_error
self.lexer.prev_token, self.lexer.token())
SyntaxError: Unexpected token (DEFAULT, 'default') at 1:21 between LexToken(COMM
A,',',1,19) and LexToken(COLON,':',1,28)
The text was updated successfully, but these errors were encountered:
Slimit crashes when trying to minify anything that tries to get a reference to .default. As a workaround, you can access it with object['default'].
The text was updated successfully, but these errors were encountered: