| Summary: | [parser] Parser does not recover correctly based on whitespace | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 13.0 | ||
| Target Milestone: | 16.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: | https://github.com/eclipse/orion.client/pull/92 | ||
| Whiteboard: | |||
This is working as designed as per https://github.com/ternjs/acorn/issues/199, but now that we have our own parser plugin, we can try to do better (and perhaps push back any fix we come up with back to Acorn as a PR). GitHub Pull Request 92 created by [mrennie] https://github.com/eclipse/orion.client/pull/92 Code is merged. |
consider the following snippet: define([ 'b' ], function(b) { b. }); Assuming that b.js exists and exports a single property 'one', you will get no completions on 'b.'. The reason for this is that during the parse when we try to recover from the incomplete statement 'b.', the ArrayExpression argument for the define call ends up having no entries - so the inferencing engine does not know to look up and map b.js If you modify the snippet slightly to be: define(['b' ], function(b) { b. }); it works as expected.