Skip to content

Latest commit

 

History

History
68 lines (36 loc) · 1.43 KB

api.md

File metadata and controls

68 lines (36 loc) · 1.43 KB

parser

This is a parser!

  • Create a new parser or override an old ones

    • param: name { string }

      parser's name

    • param: parser { Object }

      parser object

  • Parse source code directly.

    • param: source { string }

      source code

    • param: language { string }

      specify source language

    • param: opts { Object= }

      option

    • return: { Array }

      parsed comments object array

  • Parse source code from file. Use Promise instead of callback

    • param: filePath { string }

      souce file path

    • param: opts { Object= }

      option

    • return: { Promise }

      resolve parsed comment object

  • Synchronous version of parseFile

    • return: { Object }

      parsed comment object array

  • Set parser's rule

    • param: language { String }

      parser name

    • param: rule { Object }

      parser's rule