Options
All
  • Public
  • Public/Protected
  • All
Menu

@mavenomics/bindings

Index

Functions

getCommentLine

  • getCommentLine(src: string, lineComment?: string | null, blockStart?: string | null, blockEnd?: string | null): string | null
  • Helper function to retrieve the leading comment from a string.

    This function uses C-style comments by default, but can be overridden with different characters or no support at all.

    Parameters

    • src: string

      The full text of the binding

    • Default value lineComment: string | null = "\/\/"

      The style of line comments to use. Must be regex-escaped. Defaults to C-style, set to 'null' to disable line comments.

    • Default value blockStart: string | null = "\/\*"

      The style of block comment start tokens. Must be regex- escaped. Defaults to C-style, set to 'null' to disable block comments entirely.

    • Default value blockEnd: string | null = "\*\/"

      The style of block comment end tokens. Must be regex-escaped. Defaults to C-style, set to 'null' to disable block comments entirely.

    Returns string | null

    A string containing the comment text, or null if there wasn't a comment

getGlobalsFromComment

  • getGlobalsFromComment(src: string): string[]
  • Helper function to fetch globals from a leading comment string

    Parameters

    • src: string

      The content of the magic comment

    Returns string[]

    A list of globals found in the string.

Generated using TypeDoc