Community
Participate
Working Groups
I have a small change to improve tolerant parsing of function bodies, available in these commits: https://github.com/msridhar/orion.client/commit/a18a0d264c0029d0d7b0f1a9d409e8ac12e04439 https://github.com/msridhar/orion.client/commit/394561f1ccb1f4a5bde0fefebae529be10c484f7 The change enables smart completion to work for the following case: var fizzbuzz = {}; function foo() { if (fizz$$ With the change, smart completion is able to suggest 'fizzbuzz' when invoked where '$$' appears. This change also works if the function body is 'for (var p in fizz$$', 'Object.keys(fizz$$', etc. The tolerant parsing could be further improved, but even this small change catches some cases I've run into lately. I added a test to esprimaJsContentAssistTests.js, and those tests pass. If there are other tests I should run, please let me know.
I've added more improvements to tolerant parsing on the branch: https://github.com/msridhar/orion.client/tree/tolerant-parsing-functions Now, the parser is better about handling missing ')' and '}' characters in various places. I've added more tests as well. I'll rename this bug appropriately. Shall I rebase to master and collapse my commits into one to make merging easier?
I wrote all this code, and I have the right to contribute it to Eclipse under the eclipse.org website terms of use.
Thanks Manu! Pushed. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e0d0d4e
(In reply to comment #3) > Thanks Manu! Pushed. > > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/ > ?id=e0d0d4e I pushed that commit with an incorrect Author field, so rv'd and re-commit with Author set to Manu. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=332b538