slimit
slimit copied to clipboard
Unexpected token (ID, 'params')
I've the following error when I'm trying to parse a file:
Illegal character '\xa0' at 1:2065 after LexToken(ID,'Â',1,2064)
File "<string>", line unknown
SyntaxError: Unexpected token (ID, 'params') at 1:2066 between LexToken(ID,'Â',1,2064) and LexToken(PERIOD,'.',1,2072)
It comes from these lines of code:
if (!(params.args && params.args[0] !== undefined)) {
params.kwargs.domain = options.domain || params.domain || params.kwargs.domain || [];
}
Looks like you have other code or stale state in the lexer/parser that is actually triggering these errors, as the 'Â'
is not present in the code fragment that you have provided here.