Options
All
  • Public
  • Public/Protected
  • All
Menu

easydoc

Index

Functions

activate

  • activate(context: vs.ExtensionContext): void
  • The entry point of the extension. The command "extension.EasyDoc" and onDidChangeTextDocument are added as subscriptions to the extension via the context sent as an argument.

    export

    Parameters

    • context: vs.ExtensionContext

      A collection of utilities private to the extension. This parameter must be provided as the first parameter to the activate-call in order for the extension to work.

    Returns void

copy

  • copy(variable: any): any
  • Deep copy a variable.

    export

    Parameters

    • variable: any

      The variable wanted a deep copy of.

    Returns any

    The deep copied variable.

generateOnEnter

  • generateOnEnter(event: vs.TextDocumentChangeEvent): boolean
  • Read the chenges to the text document and determines if Enter was pressed by checking if a newline was added.

    Parameters

    • event: vs.TextDocumentChangeEvent

      The text document change event. All the changes to the document are stored here.

    Returns boolean

    If true if Enter was pressed, otherwise false.

removeEscapeFromString

  • removeEscapeFromString(str: string): string
  • Replace every character with preceding backslash, including the backslash, with two hashes.

    export

    Parameters

    • str: string

      The string to replace characters in.

    Returns string

    The modified string.

removeStringBetweenChar

  • removeStringBetweenChar(str: string, char: string, lastChar?: string): string
  • Replaces characters between characters with a hash, this is used only for counting the index of other characters without including anything withing the characters given in paramters. Will be used with different types of strings.

    export

    Parameters

    • str: string

      The string to replace.

    • char: string

      The optional character if you want to match between two different characters.

    • Optional lastChar: string

    Returns string

    A new string where everything in between a given character is replaced with hashes.

Object literals

Const languageSyntax

languageSyntax: object

The syntax and regular expressions for each supported languages.

type

{ILanguages}

Cpp

Cpp: object

regex

regex: object

function

function: RegExp = /\s*(?<returnType>\w+[\w\s*&]*)\s+(?<name>\w+)\s*\((?<params>[^)]*)/g

syntax

syntax: object

string

string: object[] = [{value: "\"",multi: false,interpolate: false,escape: false,},]

comment

comment: object

BLOCK_COMMENT_END

BLOCK_COMMENT_END: string = "\*\/"

BLOCK_COMMENT_START

BLOCK_COMMENT_START: string = "\/\*"

COMMENT

COMMENT: string = "\/\/"

Haskell

Haskell: object

regex

regex: object

function

function: RegExp = /^\s*(?<name>\w+)\s*(?<params>[^\n]*\sdo)/g

syntax

syntax: object

string

string: object[] = [{value: "\"",multi: false,interpolate: false,escape: false,},{value: "'",multi: false,interpolate: false,escape: false,},]

comment

comment: object

BLOCK_COMMENT_END

BLOCK_COMMENT_END: string = "\-\}"

BLOCK_COMMENT_START

BLOCK_COMMENT_START: string = "\{\-"

COMMENT

COMMENT: string = "\-\-"

Javascript

Javascript: object

regex

regex: object

function

function: RegExp = /\s*(?<name>\w+)\s*\((?<params>[^)]*)/g

syntax

syntax: object

string

string: (object | object)[] = [{value: "`",multi: true,interpolate: true,escape: true,},{value: "\"",multi: false,interpolate: false,escape: true,},{value: "'",multi: false,interpolate: false,escape: true,},]

comment

comment: object

BLOCK_COMMENT_END

BLOCK_COMMENT_END: string = "\*\/"

BLOCK_COMMENT_START

BLOCK_COMMENT_START: string = "\/\*"

COMMENT

COMMENT: string = "\/\/"

Python

Python: object

regex

regex: object

function

function: RegExp = /^\s*(?:class|def)\s+(?<name>\w+)\s*\((?:self, |)(?<params>[^)]*)/g

syntax

syntax: object

string

string: (object | object)[] = [{value: "\"\"\"",multi: true,interpolate: false,escape: false,},{value: "\"",multi: false,interpolate: true,escape: true,},{value: "'",multi: false,interpolate: true,escape: true,},]

comment

comment: object

BLOCK_COMMENT_END

BLOCK_COMMENT_END: string = "\"\"\""

BLOCK_COMMENT_START

BLOCK_COMMENT_START: string = "\"\"\""

COMMENT

COMMENT: string = "\#"

Ruby

Ruby: object

regex

regex: object

function

function: RegExp = /^\s*(?:(?<const>module|class|def)(?:\s+(?<self>self)\.|\s+)(?<name>\w+[\=\?\!]?)\s*(?:(?<relation>\<)?\s+(?<relationName>\w+)?|\(?(?<params>[^)\n]*)?)?|^\s*(?<block>get|post|put|patch|delete|options|link|unlink)\s*(?:\(['"]|['"])(?<route>[^'")]*)['")]*\s*)/g

syntax

syntax: object

string

string: (object | object)[] = [{value: "\"",multi: false,interpolate: true,escape: true,},{value: "'",multi: false,interpolate: false,escape: false,},]

comment

comment: object

BLOCK_COMMENT_END

BLOCK_COMMENT_END: string = "\=end"

BLOCK_COMMENT_START

BLOCK_COMMENT_START: string = "\=begin"

COMMENT

COMMENT: string = "\#"

Typescript

Typescript: object

regex

regex: object

function

function: RegExp = /\s*(?<export>export)?\s*(?<abstract>abstract)?\s*(?<default>private|protected|public)?\s*(?<const>class|function|module)?\s+(?<name>\w+)\s*(?:(?<relation>extends|implements)?\s+(?<relationName>\w*)?|(?:\s*\((?<params>[^)]*)\)(?:[^:]|\:\s*(?<returnType>(?:\{(?:[^}{]+|\{(?:[^}{]+|\{[^}{]*\})*\})*\})|[^{]*)\s*\{)))?\s*?/g

syntax

syntax: object

string

string: (object | object)[] = [{value: "`",multi: true,interpolate: true,escape: true,},{value: "\"",multi: false,interpolate: false,escape: true,},{value: "'",multi: false,interpolate: false,escape: true,},]

comment

comment: object

BLOCK_COMMENT_END

BLOCK_COMMENT_END: string = "\*\/"

BLOCK_COMMENT_START

BLOCK_COMMENT_START: string = "\/\*"

COMMENT

COMMENT: string = "\/\/"

Generated using TypeDoc