-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a Javascript parser instead of reqular expressions #29
Comments
I agree with Hopiu, acorn looks like it can make our lives easier. I would suggest to create an object like
|
I agree with you guys, regexps can only go so far. I have no experience with acorn though, and I'm just wondering if this isn't a bit oversized for the job. |
Performance wise I think it's not a problem. If it's a bit oversized, ummm, maybe but still I think it's better to use a parser than regexps that will never understand the code. @davidderaedt How about creating a new branch where we could start getting something together? @ajorquera Let's use the coding guidelines from https://github.com/adobe/brackets/wiki/Brackets-Coding-Conventions Generally, isn't there something like the CodeHintManager but targeting Docs? I mean, JS is not the only language that needs Documentation. |
Good question about the CodeHintManager, I'll try to investigate that. In the meantime, I'm creating the acorn branch. Not sure I'll have the time to actually code anything before a while though, so feel free to go crazy. ;) |
Sorry @Hopiu I don't quite understand the purpose of the link you sent me. I mean, it doesn't talk about coding conventions for creating objects. I just wanted for us to focus on creating them. |
@ajorquera Oh, sorry I got that wrong. It's absolutely fine for me creating such an object. |
Hi David,
Referring to #27 I think too, that the design of the extension should be rethought. As a first suggestion I'd like to propose to switch to a JS parser to identify functions (and possibly other things to annotate) instead of using regular expressions.
Codemirror uses acorn.js anyway for code completion, so why not use it too to generate the jsdocs? What's you opinion on that?
As a start I wrote my first brackets plugin from scratch which uses acorn.js and can be found at:
https://github.com/Hopiu/brackets-annotate-extension
(Of course I won't publish the plugin in the extension repo)
The text was updated successfully, but these errors were encountered: