-
Notifications
You must be signed in to change notification settings - Fork 24
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
Example suggestion: How to configure tokenizers #115
Comments
I believe you have already found this example. It is not clear how to get tokenizers though as you pointed out CommonJS option const {default: tag} = require('comment-parser/lib/parser/tokenizers/tag')
const {default: type} = require('comment-parser/lib/parser/tokenizers/type')
const {default: name} = require('comment-parser/lib/parser/tokenizers/name')
const {default: description} = require('comment-parser/lib/parser/tokenizers/description') or ES6 imports, it might work for you with the right tooling. I still have to tune ES6 for distribution import tag from "./es6/parser/tokenizers/tag"
... take a look on what existing tokenizers do, I don't have a written guide on implementing one yet. See |
For other people migrating from v0.x to v1, here is a jaydenseric/jsdoc-md@ebcdbf5#diff-04e9c1ef0da56feec83db032c6ee7f9db1230accf7530a0767902d21be9faf85 One thing I would like to investigate is if the The next As I mentioned here, I've been working the past few weeks on a brand new JSDoc comment parser package, that has source location data for every node in the JSDoc AST (relating both to just the doclet, and the whole code file). I got about 80% of the way there, but now that Once the next major version of |
great, I am trying to make
There is no such thing. Parser is processing entire source over few stages. I didn't do any benchmarking, but would be interested to find what input data volume would show any noticeable performance boost for proposed optimization. It may get tricky though if you would need to stringity data back. For that you would need to iterate over |
So, I'm trying migrate
jsdoc-md
to thecomment-parser
v1.x API, but can't find any documentation about how to configure tokenizers for parsing standard JSDoc tags. Here is the old code:https://github.com/jaydenseric/jsdoc-md/blob/98effb0b4d45af041e8ce91d6659512b53cbdfbb/private/jsdocCommentToMember.js#L3
Ideally the example will use deep require paths to just the functions needed (vs getting things from index files), for a minimal memory footprint and bundle size.
The text was updated successfully, but these errors were encountered: