slimit icon indicating copy to clipboard operation
slimit copied to clipboard

Unexpected token (ID, 'params')

Open FVolral opened this issue 6 years ago • 1 comments

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 || [];
}

FVolral avatar Aug 16 '18 01:08 FVolral

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.

metatoaster avatar Aug 16 '18 01:08 metatoaster