Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Transpiler

Hierarchy

  • Transpiler

Index

Constructors

constructor

  • Returns Transpiler

Properties

Protected _functions

_functions: Set<string>

Methods

registerFunction

  • registerFunction(name: string): void
  • Parameters

    • name: string

    Returns void

transpile

  • transpile(code: string): string
  • Parameters

    • code: string

    Returns string

Protected transpileArguments

  • transpileArguments(node: TwingNode | TwingNodeExpressionArray): string
  • Parameters

    • node: TwingNode | TwingNodeExpressionArray

    Returns string

Protected transpileCommentNode

  • transpileCommentNode(node: TwingNodeComment): string
  • Parameters

    • node: TwingNodeComment

    Returns string

Protected transpileExpressionArrayNode

  • transpileExpressionArrayNode(node: TwingNodeExpressionArray): string
  • Parameters

    • node: TwingNodeExpressionArray

    Returns string

Protected transpileExpressionBinaryNode

  • transpileExpressionBinaryNode(node: TwingNodeExpressionBinary): string
  • Parameters

    • node: TwingNodeExpressionBinary

    Returns string

Protected transpileExpressionConditionalNode

  • transpileExpressionConditionalNode(node: TwingNodeExpressionConditional): string
  • Parameters

    • node: TwingNodeExpressionConditional

    Returns string

Protected transpileExpressionConstantNode

  • transpileExpressionConstantNode(node: TwingNodeExpressionConstant, raw: boolean): string
  • Parameters

    • node: TwingNodeExpressionConstant
    • raw: boolean

    Returns string

Protected transpileExpressionFunctionNode

  • transpileExpressionFunctionNode(node: TwingNodeExpressionFunction): string
  • Parameters

    • node: TwingNodeExpressionFunction

    Returns string

Protected transpileExpressionGetAttrNode

  • transpileExpressionGetAttrNode(node: TwingNodeExpressionGetAttr): string
  • Parameters

    • node: TwingNodeExpressionGetAttr

    Returns string

Protected transpileExpressionMethodCallNode

  • transpileExpressionMethodCallNode(node: TwingNodeExpressionMethodCall): string
  • Parameters

    • node: TwingNodeExpressionMethodCall

    Returns string

Protected transpileExpressionNameNode

  • transpileExpressionNameNode(node: TwingNodeExpressionName): string
  • Parameters

    • node: TwingNodeExpressionName

    Returns string

Protected transpileExpressionUnaryNode

  • transpileExpressionUnaryNode(node: TwingNodeExpressionUnary): string
  • Parameters

    • node: TwingNodeExpressionUnary

    Returns string

Protected transpileForNode

  • transpileForNode(node: TwingNodeFor): string
  • Parameters

    • node: TwingNodeFor

    Returns string

Protected transpileIfNode

  • transpileIfNode(node: TwingNodeIf): string
  • Parameters

    • node: TwingNodeIf

    Returns string

Protected transpileMacroNode

  • transpileMacroNode(node: TwingNodeMacro): string
  • Parameters

    • node: TwingNodeMacro

    Returns string

Protected transpileModuleNode

  • transpileModuleNode(node: TwingNodeModule): string
  • Parameters

    • node: TwingNodeModule

    Returns string

Protected transpileNode

  • transpileNode(node: TwingNode, raw?: boolean): string
  • Parameters

    • node: TwingNode
    • Default value raw: boolean = false

    Returns string

Protected transpilePrintNode

  • transpilePrintNode(node: TwingNodePrint): string
  • Parameters

    • node: TwingNodePrint

    Returns string

Protected transpileSetNode

  • transpileSetNode(node: TwingNodeSet): string
  • Parameters

    • node: TwingNodeSet

    Returns string

Protected transpileTextNode

  • transpileTextNode(node: TwingNodeText): string
  • Parameters

    • node: TwingNodeText

    Returns string

Generated using TypeDoc