some improvement - #2
Conversation
|
Hi David, the log reference you supplied about what you've been up to doesn't seem to work for me: https://github.com/DavidLeoni/esprima-outline/blob/master/Log.md Do I see you updated to a new esprima, I guess that isn't a recoverable esprima, it is just 'normal' esprima? |
Sorry, since I'm trying to figure out what could be the best way to support plugin development for multiple Orion versions and branches with git, during last week I significantly changed the fork layout. Also, I wrongly assumed Github wouldn't have updated this merge request with the last commits I made to master. So please ignore this merge request from master. The log is now here. My development occurs now in the 1.0/main branch. As a reference point we can take commit tagged as 1.0-main-0.7.5 . The plugin can be installed in Orion with this link. The plugin won't clash with yours as name and id are marked with DavFork. To compare between the various outliners I wrote a couple of test files here. Just keep in mind your version apparently does not have recoverable esprima and on error it simply keeps showing whatever was in the outliner, so sometimes it seems to render correctly even if it doesn't. In version 0.7.5 I removed display of variables which are not functions nor objects as I saw in this bug you and Mark MacDonald were talking about variables cluttering the outline. Things I don't like much about the code I wrote are reported in the issues section of my repo.
I just read now there has been a long discussion about it, in esprima issue 130 and Esprima pull 94. Now I put in my 1.0/main branch your recoverable esprima.js I took from Orion 1.0. I also added a test/tolerance.js file to test its features. In the 1.0/es6 branch (installable from here) for now I will keep bleeding edge esprima, since I don't want to spend time doing merges with the recoverable one. After all, the es6 is an experimental branch so users should expect some less forgiving behaviour. I might do the merge if I get tired of seeing error messages in the outliner.... about the future..I had a look at Orion Content Assist, and its esprimaVisitor.js. It seems it would make sense to adopt the AST walking facilities offered by the content assist plugin, in view of Esprima integration in Orion . But in this case a lot of the outliner code would need to be rewritten. I worked on the outliner without much planning just to learn the platform, but now I'm interested in integrating as much a possible with Orion, doing proper unit tests, proceeding by smaller commits, etc.
|
Hi, I worked a bit on the Esprima outliner, you can see the log here
I'm also preparing another branch to support ES6 syntax.
You can install the plugin from here
Didn't know what number to use for the new version, I chose 0.6, don't know if it needs to be on par with current Orion version.