Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/ast/san-ast-util"

Index

Functions

getANodePropByName

  • getANodePropByName(aNode: AElement, name: string): AProperty | undefined
  • 获取 ANode props 数组中相应 name 的项

    Parameters

    • aNode: AElement
    • name: string

    Returns AProperty | undefined

parseANodeProps

  • parseANodeProps(aNode: AElement): AProperty[]
  • 获取 ANode 的 props

    做了一点归一化:对于布尔属性,只要 key 存在就把它的值设为 true

    Parameters

    • aNode: AElement

    Returns AProperty[]

visitANodeRecursively

  • visitANodeRecursively(aNode: ANode, visitor: (aNode: ANode) => void): void
  • 先序遍历 ANode 树

    Parameters

    • aNode: ANode
    • visitor: (aNode: ANode) => void
        • (aNode: ANode): void
        • Parameters

          • aNode: ANode

          Returns void

    Returns void

Generated using TypeDoc