Skip to content
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

Jsdoc support. #21

Open
AndreOneti opened this issue Feb 27, 2022 · 1 comment
Open

Jsdoc support. #21

AndreOneti opened this issue Feb 27, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@AndreOneti
Copy link
Owner

Add support to define functions and signals with jsdoc and show on autocomplete.

@AndreOneti AndreOneti added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 27, 2022
@AndreOneti
Copy link
Owner Author

Maybe do using a an logic like

const fs = require('fs');

let data = fs.readFileSync("MyQmlFile.qml", { encoding: "utf-8" });

let regex = /\/\*\*\s*\n([^\*]|(\*(?!\/)))*\*\/\s*\n\s{0,}function.*/g

data.match(regex);

let list;

while ((list = regex.exec(data)) !== null) {
    let [jsdoc, funcName] = list[0].split("function");
    console.log(jsdoc, funcName.split("(")[0]);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant