ast-demo

<script src="./point_src/ast-demo"></script>

tree Demo Source File

This file presents a bunch of javascript for tree convert tool tes.t

It contains various constructs, including:

  • Block comments
  • Inline comments
  • Class declarations

This comment is the first block comment in the file.

Meta Data
filepath_exists True
path ast-demo
filepath ast-demo.js
clean_files ()

  • VariableDeclaration
    const

    stackItem1

    =
    'foo'
    stackItem1 A Multiline block comment for stackItem1
    stackItem1 inline comment for
  • VariableDeclaration
    const

    stackItem2

    =
    'bar'
    stackItem1 inline comment for
  • VariableDeclaration
    const

    stackItem3

    =
    true
  • VariableDeclaration
    const

    stackItem4

    =
    199
    stackItem4 block comment for
  • VariableDeclaration
    const

    stackItem5

    =
    undefined
    stackItem5 inline comment for
  • VariableDeclaration
    const

    constStoreFunction

    =
    function ( )
    Generic function with no arguments, stored within a const.
    Generic function with no arguments, stored within a const.
  • VariableDeclaration
    var

    varStoreFunction

    =
    function ( x , y )
    Generic function outside with no arguments, stored within a const.
    Generic function inside with no arguments, stored within a const.
  • VariableDeclaration
    let

    letStoreFunction

    =
    function ( )
    Generic function outside with no arguments, stored within a const.
    Generic function inside with no arguments, stored within a const.
  • ClassDeclaration
    class comments:
    Comment outside for the class
    Comment inside for the class
    • property

      otherName

      = 'window'
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      oneval

      = 1
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      varfunc

      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      varfuncNamedFunc

      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • method

      alphaMethod

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Accepts no arguments and exists on the parent.
      Accepts no arguments and exists on the parent.
    • method

      betaMethod

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Accepts no arguments.
    • method

      gammaMethod

      (
      one
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Parent with default arg
    • get

      parentName

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • set

      parentName

      (
      val
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      staticParentMethod

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      This is the comment for the Static parent method `staticParentMethod`
    • method

      [Symbol.toPrimitive]

      (
      hint
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      this is the header block comment for Symbol.toPrimitive a very special method that converts an object to a primitive value based on the given hint.
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ClassDeclaration
    class comments:
    This is the header comment for the Primary class. Just within the class declaration. This is the Primary class which extends ParentClass.
    • method

      betaMethod

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Accepts no arguments and overrides the parent `betaMethod`
    • method

      charlieMethod

      (
      one , two = 1 , three = {}
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      docs for charlie
    • method

      deltaMethod

      (
      args
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Variadic method using rest args
    • method

      epsilonMethod

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Destructured object with defaults
    • get

      name

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      an inline comment for the getter `name`, set above the function
      an inline comment **within** the getter `name`
    • set

      name

      (
      value
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      staticMethod

      (
      foo = bar
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Static method with default arg
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • FunctionDeclaration
    function

    genericFunction

    (
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    genericFunction2

    (
    argA , argB
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • VariableDeclaration
    const

    res

  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])