Status: New
Owner: ----

New issue 3382 by [email protected]: Parser error for punc-token and instanceof without whitespace
http://code.google.com/p/v8/issues/detail?id=3382

`5instanceof foo` is technically valid but v8 seems to bail on it.

```js
var script = document.createElement('script')
script.textContent = '5instanceof Array'
document.body.appendChild(script)

Uncaught SyntaxError: Unexpected token ILLEGAL
```

This should be valid because an identifier cannot start with a number, hence the lexer should stop after the `5` and find `instanceof` in the next run. The whitespace is optional here.

Interestingly enough, `[]instanceof Array` is accepted, just as `({}instanceof Object)`. "Obviously" `/foo/instanceof RegExp` is not because `instanceof` becomes the regex flags.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to