Skip to content

Lightweight simple JSDoc documentation parser for .NET

License

Notifications You must be signed in to change notification settings

JimGaleForce/JSDocParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSDocParser

Lightweight simple JSDoc documentation parser for .NET

Purpose: Read javascript files and parse JSDoc style documentation (within code), available in a .NET (C# project).

Quick mini-doc (before doing it for real)

var js = new JSDocParser();
var parsed = js.Parse("test1.js"); 

This js code:

/**
 * createTile
 *
 * @param {string} text Text to display on the tile.
 * @param {float} durationSeconds Duration to display the tile, in seconds. Defaults to 10.
 *
 */

function createTile(text, durationSeconds = 10) {
...
}

would result in this result from js.Parse(...):

parsed.Function.Count == 1
parsed.Function[0].Name == "createTile"
parsed.Function[0].Parameters.Count == 2
parsed.Function[0].Parameters[0].Name == "text"
parsed.Function[0].Parameters[0].Type == "string"
parsed.Function[0].Parameters[0].Description == "Text to display on the tile."
parsed.Function[0].Parameters[1].Default == "10" //retrieved from signature line, not from docs

About

Lightweight simple JSDoc documentation parser for .NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published