Module refinery.lib.scripts.js.model

Expand source code Browse git
from __future__ import annotations

import enum

from dataclasses import dataclass, field

from refinery.lib.scripts import Expression, Node, Statement


class JsPropertyKind(enum.Enum):
    INIT = 'init'
    GET  = 'get'   # noqa
    SET  = 'set'   # noqa


class JsMethodKind(enum.Enum):
    METHOD      = 'method'       # noqa
    GET         = 'get'          # noqa
    SET         = 'set'          # noqa
    CONSTRUCTOR = 'constructor'  # noqa


class JsVarKind(enum.Enum):
    VAR   = 'var'    # noqa
    LET   = 'let'    # noqa
    CONST = 'const'  # noqa


@dataclass(repr=False, eq=False)
class JsErrorNode(Expression, Statement):
    text: str = ''
    message: str = ''


@dataclass(repr=False, eq=False)
class JsIdentifier(Expression):
    name: str = ''


@dataclass(repr=False, eq=False)
class JsNumericLiteral(Expression):
    value: int | float = 0
    raw: str = '0'


@dataclass(repr=False, eq=False)
class JsBigIntLiteral(Expression):
    value: int = 0
    raw: str = '0n'


@dataclass(repr=False, eq=False)
class JsStringLiteral(Expression):
    value: str = ''
    raw: str = "''"


@dataclass(repr=False, eq=False)
class JsRegExpLiteral(Expression):
    pattern: str = ''
    flags: str = ''
    raw: str = '//'


@dataclass(repr=False, eq=False)
class JsTemplateLiteral(Expression):
    quasis: list[JsTemplateElement] = field(default_factory=list)
    expressions: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsTemplateElement(Node):
    value: str = ''
    raw: str = ''
    tail: bool = False


@dataclass(repr=False, eq=False)
class JsBooleanLiteral(Expression):
    value: bool = False


@dataclass(repr=False, eq=False)
class JsNullLiteral(Expression):
    @property
    def value(self):
        return None


@dataclass(repr=False, eq=False)
class JsThisExpression(Expression):
    pass


@dataclass(repr=False, eq=False)
class JsArrayExpression(Expression):
    elements: list[Expression | None] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsObjectExpression(Expression):
    properties: list[JsProperty | JsSpreadElement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsProperty(Node):
    key: Expression | None = None
    value: Expression | None = None
    computed: bool = False
    shorthand: bool = False
    method: bool = False
    kind: JsPropertyKind = JsPropertyKind.INIT


@dataclass(repr=False, eq=False)
class JsSpreadElement(Expression):
    argument: Expression | None = None


@dataclass(repr=False, eq=False)
class JsFunctionExpression(Expression):
    id: JsIdentifier | None = None
    params: list[Expression] = field(default_factory=list)
    body: JsBlockStatement | None = None
    generator: bool = False
    is_async: bool = False


@dataclass(repr=False, eq=False)
class JsArrowFunctionExpression(Expression):
    params: list[Expression] = field(default_factory=list)
    body: Expression | JsBlockStatement | None = None
    is_async: bool = False


@dataclass(repr=False, eq=False)
class JsClassExpression(Expression):
    id: JsIdentifier | None = None
    super_class: Expression | None = None
    body: JsClassBody | None = None


@dataclass(repr=False, eq=False)
class JsUnaryExpression(Expression):
    operator: str = ''
    operand: Expression | None = None
    prefix: bool = True


@dataclass(repr=False, eq=False)
class JsUpdateExpression(Expression):
    operator: str = ''
    argument: Expression | None = None
    prefix: bool = True


@dataclass(repr=False, eq=False)
class JsBinaryExpression(Expression):
    left: Expression | None = None
    operator: str = ''
    right: Expression | None = None


@dataclass(repr=False, eq=False)
class JsLogicalExpression(Expression):
    left: Expression | None = None
    operator: str = ''
    right: Expression | None = None


@dataclass(repr=False, eq=False)
class JsAssignmentExpression(Expression):
    left: Expression | None = None
    operator: str = '='
    right: Expression | None = None


@dataclass(repr=False, eq=False)
class JsConditionalExpression(Expression):
    test: Expression | None = None
    consequent: Expression | None = None
    alternate: Expression | None = None


@dataclass(repr=False, eq=False)
class JsMemberExpression(Expression):
    object: Expression | None = None
    property: Expression | None = None
    computed: bool = False
    optional: bool = False


@dataclass(repr=False, eq=False)
class JsCallExpression(Expression):
    callee: Expression | None = None
    arguments: list[Expression] = field(default_factory=list)
    optional: bool = False


@dataclass(repr=False, eq=False)
class JsNewExpression(Expression):
    callee: Expression | None = None
    arguments: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsSequenceExpression(Expression):
    expressions: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsYieldExpression(Expression):
    argument: Expression | None = None
    delegate: bool = False


@dataclass(repr=False, eq=False)
class JsAwaitExpression(Expression):
    argument: Expression | None = None


@dataclass(repr=False, eq=False)
class JsTaggedTemplateExpression(Expression):
    tag: Expression | None = None
    quasi: JsTemplateLiteral | None = None


@dataclass(repr=False, eq=False)
class JsParenthesizedExpression(Expression):
    expression: Expression | None = None


@dataclass(repr=False, eq=False)
class JsArrayPattern(Expression):
    elements: list[Expression | None] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsObjectPattern(Expression):
    properties: list[JsProperty | JsRestElement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsAssignmentPattern(Expression):
    left: Expression | None = None
    right: Expression | None = None


@dataclass(repr=False, eq=False)
class JsRestElement(Expression):
    argument: Expression | None = None


@dataclass(repr=False, eq=False)
class JsClassBody(Node):
    body: list[JsMethodDefinition | JsPropertyDefinition] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsMethodDefinition(Node):
    key: Expression | None = None
    value: JsFunctionExpression | None = None
    kind: JsMethodKind = JsMethodKind.METHOD
    computed: bool = False
    is_static: bool = False


@dataclass(repr=False, eq=False)
class JsPropertyDefinition(Node):
    key: Expression | None = None
    value: Expression | None = None
    computed: bool = False
    is_static: bool = False


@dataclass(repr=False, eq=False)
class JsExpressionStatement(Statement):
    expression: Expression | None = None


@dataclass(repr=False, eq=False)
class JsBlockStatement(Statement):
    body: list[Statement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsEmptyStatement(Statement):
    pass


@dataclass(repr=False, eq=False)
class JsVariableDeclaration(Statement):
    declarations: list[JsVariableDeclarator] = field(default_factory=list)
    kind: JsVarKind = JsVarKind.VAR


@dataclass(repr=False, eq=False)
class JsVariableDeclarator(Node):
    id: Expression | None = None
    init: Expression | None = None


@dataclass(repr=False, eq=False)
class JsIfStatement(Statement):
    test: Expression | None = None
    consequent: Statement | None = None
    alternate: Statement | None = None


@dataclass(repr=False, eq=False)
class JsWhileStatement(Statement):
    test: Expression | None = None
    body: Statement | None = None


@dataclass(repr=False, eq=False)
class JsDoWhileStatement(Statement):
    test: Expression | None = None
    body: Statement | None = None


@dataclass(repr=False, eq=False)
class JsForStatement(Statement):
    init: Expression | Statement | None = None
    test: Expression | None = None
    update: Expression | None = None
    body: Statement | None = None


@dataclass(repr=False, eq=False)
class JsForInStatement(Statement):
    left: Expression | Statement | None = None
    right: Expression | None = None
    body: Statement | None = None


@dataclass(repr=False, eq=False)
class JsForOfStatement(Statement):
    left: Expression | Statement | None = None
    right: Expression | None = None
    body: Statement | None = None
    is_await: bool = False


@dataclass(repr=False, eq=False)
class JsSwitchStatement(Statement):
    discriminant: Expression | None = None
    cases: list[JsSwitchCase] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsSwitchCase(Node):
    test: Expression | None = None
    consequent: list[Statement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class JsTryStatement(Statement):
    block: JsBlockStatement | None = None
    handler: JsCatchClause | None = None
    finalizer: JsBlockStatement | None = None


@dataclass(repr=False, eq=False)
class JsCatchClause(Node):
    param: Expression | None = None
    body: JsBlockStatement | None = None


@dataclass(repr=False, eq=False)
class JsThrowStatement(Statement):
    argument: Expression | None = None


@dataclass(repr=False, eq=False)
class JsReturnStatement(Statement):
    argument: Expression | None = None


@dataclass(repr=False, eq=False)
class JsBreakStatement(Statement):
    label: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsContinueStatement(Statement):
    label: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsLabeledStatement(Statement):
    label: JsIdentifier | None = None
    body: Statement | None = None


@dataclass(repr=False, eq=False)
class JsWithStatement(Statement):
    object: Expression | None = None
    body: Statement | None = None


@dataclass(repr=False, eq=False)
class JsDebuggerStatement(Statement):
    pass


@dataclass(repr=False, eq=False)
class JsFunctionDeclaration(Statement):
    id: JsIdentifier | None = None
    params: list[Expression] = field(default_factory=list)
    body: JsBlockStatement | None = None
    generator: bool = False
    is_async: bool = False


@dataclass(repr=False, eq=False)
class JsClassDeclaration(Statement):
    id: JsIdentifier | None = None
    super_class: Expression | None = None
    body: JsClassBody | None = None


@dataclass(repr=False, eq=False)
class JsImportSpecifier(Node):
    imported: JsIdentifier | None = None
    local: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsImportDefaultSpecifier(Node):
    local: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsImportNamespaceSpecifier(Node):
    local: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsImportDeclaration(Statement):
    specifiers: list[
        JsImportSpecifier | JsImportDefaultSpecifier | JsImportNamespaceSpecifier
    ] = field(default_factory=list)
    source: JsStringLiteral | None = None


@dataclass(repr=False, eq=False)
class JsExportSpecifier(Node):
    local: JsIdentifier | None = None
    exported: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsExportNamedDeclaration(Statement):
    declaration: Statement | None = None
    specifiers: list[JsExportSpecifier] = field(default_factory=list)
    source: JsStringLiteral | None = None


@dataclass(repr=False, eq=False)
class JsExportDefaultDeclaration(Statement):
    declaration: Expression | Statement | None = None


@dataclass(repr=False, eq=False)
class JsExportAllDeclaration(Statement):
    source: JsStringLiteral | None = None
    exported: JsIdentifier | None = None


@dataclass(repr=False, eq=False)
class JsScript(Statement):
    body: list[Statement] = field(default_factory=list)

Classes

class JsPropertyKind (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class JsPropertyKind(enum.Enum):
    INIT = 'init'
    GET  = 'get'   # noqa
    SET  = 'set'   # noqa

Ancestors

  • enum.Enum

Class variables

var INIT

The type of the None singleton.

var GET

The type of the None singleton.

var SET

The type of the None singleton.

class JsMethodKind (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class JsMethodKind(enum.Enum):
    METHOD      = 'method'       # noqa
    GET         = 'get'          # noqa
    SET         = 'set'          # noqa
    CONSTRUCTOR = 'constructor'  # noqa

Ancestors

  • enum.Enum

Class variables

var METHOD

The type of the None singleton.

var GET

The type of the None singleton.

var SET

The type of the None singleton.

var CONSTRUCTOR

The type of the None singleton.

class JsVarKind (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class JsVarKind(enum.Enum):
    VAR   = 'var'    # noqa
    LET   = 'let'    # noqa
    CONST = 'const'  # noqa

Ancestors

  • enum.Enum

Class variables

var VAR

The type of the None singleton.

var LET

The type of the None singleton.

var CONST

The type of the None singleton.

class JsErrorNode (offset=-1, parent=None, leading_comments=<factory>, text='', message='')

JsErrorNode(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , text: 'str' = '', message: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsErrorNode(Expression, Statement):
    text: str = ''
    message: str = ''

Ancestors

Instance variables

var text

The type of the None singleton.

var message

The type of the None singleton.

Inherited members

class JsIdentifier (offset=-1, parent=None, leading_comments=<factory>, name='')

JsIdentifier(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsIdentifier(Expression):
    name: str = ''

Ancestors

Instance variables

var name

The type of the None singleton.

Inherited members

class JsNumericLiteral (offset=-1, parent=None, leading_comments=<factory>, value=0, raw='0')

JsNumericLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'int | float' = 0, raw: 'str' = '0')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsNumericLiteral(Expression):
    value: int | float = 0
    raw: str = '0'

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class JsBigIntLiteral (offset=-1, parent=None, leading_comments=<factory>, value=0, raw='0n')

JsBigIntLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'int' = 0, raw: 'str' = '0n')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsBigIntLiteral(Expression):
    value: int = 0
    raw: str = '0n'

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class JsStringLiteral (offset=-1, parent=None, leading_comments=<factory>, value='', raw="''")

JsStringLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'str' = '', raw: 'str' = "''")

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsStringLiteral(Expression):
    value: str = ''
    raw: str = "''"

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class JsRegExpLiteral (offset=-1, parent=None, leading_comments=<factory>, pattern='', flags='', raw='//')

JsRegExpLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , pattern: 'str' = '', flags: 'str' = '', raw: 'str' = '//')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsRegExpLiteral(Expression):
    pattern: str = ''
    flags: str = ''
    raw: str = '//'

Ancestors

Instance variables

var pattern

The type of the None singleton.

var flags

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class JsTemplateLiteral (offset=-1, parent=None, leading_comments=<factory>, quasis=<factory>, expressions=<factory>)

JsTemplateLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , quasis: 'list[JsTemplateElement]' = , expressions: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsTemplateLiteral(Expression):
    quasis: list[JsTemplateElement] = field(default_factory=list)
    expressions: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var quasis

The type of the None singleton.

var expressions

The type of the None singleton.

Inherited members

class JsTemplateElement (offset=-1, parent=None, leading_comments=<factory>, value='', raw='', tail=False)

JsTemplateElement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'str' = '', raw: 'str' = '', tail: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsTemplateElement(Node):
    value: str = ''
    raw: str = ''
    tail: bool = False

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

var tail

The type of the None singleton.

Inherited members

class JsBooleanLiteral (offset=-1, parent=None, leading_comments=<factory>, value=False)

JsBooleanLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsBooleanLiteral(Expression):
    value: bool = False

Ancestors

Instance variables

var value

The type of the None singleton.

Inherited members

class JsNullLiteral (offset=-1, parent=None, leading_comments=<factory>)

JsNullLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsNullLiteral(Expression):
    @property
    def value(self):
        return None

Ancestors

Instance variables

var value
Expand source code Browse git
@property
def value(self):
    return None

Inherited members

class JsThisExpression (offset=-1, parent=None, leading_comments=<factory>)

JsThisExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsThisExpression(Expression):
    pass

Ancestors

Inherited members

class JsArrayExpression (offset=-1, parent=None, leading_comments=<factory>, elements=<factory>)

JsArrayExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , elements: 'list[Expression | None]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsArrayExpression(Expression):
    elements: list[Expression | None] = field(default_factory=list)

Ancestors

Instance variables

var elements

The type of the None singleton.

Inherited members

class JsObjectExpression (offset=-1, parent=None, leading_comments=<factory>, properties=<factory>)

JsObjectExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , properties: 'list[JsProperty | JsSpreadElement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsObjectExpression(Expression):
    properties: list[JsProperty | JsSpreadElement] = field(default_factory=list)

Ancestors

Instance variables

var properties

The type of the None singleton.

Inherited members

class JsProperty (offset=-1, parent=None, leading_comments=<factory>, key=None, value=None, computed=False, shorthand=False, method=False, kind=JsPropertyKind.INIT)

JsProperty(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , key: 'Expression | None' = None, value: 'Expression | None' = None, computed: 'bool' = False, shorthand: 'bool' = False, method: 'bool' = False, kind: 'JsPropertyKind' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsProperty(Node):
    key: Expression | None = None
    value: Expression | None = None
    computed: bool = False
    shorthand: bool = False
    method: bool = False
    kind: JsPropertyKind = JsPropertyKind.INIT

Ancestors

Instance variables

var key

The type of the None singleton.

var value

The type of the None singleton.

var computed

The type of the None singleton.

var shorthand

The type of the None singleton.

var method

The type of the None singleton.

var kind

The type of the None singleton.

Inherited members

class JsSpreadElement (offset=-1, parent=None, leading_comments=<factory>, argument=None)

JsSpreadElement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , argument: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsSpreadElement(Expression):
    argument: Expression | None = None

Ancestors

Instance variables

var argument

The type of the None singleton.

Inherited members

class JsFunctionExpression (offset=-1, parent=None, leading_comments=<factory>, id=None, params=<factory>, body=None, generator=False, is_async=False)

JsFunctionExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , id: 'JsIdentifier | None' = None, params: 'list[Expression]' = , body: 'JsBlockStatement | None' = None, generator: 'bool' = False, is_async: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsFunctionExpression(Expression):
    id: JsIdentifier | None = None
    params: list[Expression] = field(default_factory=list)
    body: JsBlockStatement | None = None
    generator: bool = False
    is_async: bool = False

Ancestors

Instance variables

var params

The type of the None singleton.

var id

The type of the None singleton.

var body

The type of the None singleton.

var generator

The type of the None singleton.

var is_async

The type of the None singleton.

Inherited members

class JsArrowFunctionExpression (offset=-1, parent=None, leading_comments=<factory>, params=<factory>, body=None, is_async=False)

JsArrowFunctionExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , params: 'list[Expression]' = , body: 'Expression | JsBlockStatement | None' = None, is_async: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsArrowFunctionExpression(Expression):
    params: list[Expression] = field(default_factory=list)
    body: Expression | JsBlockStatement | None = None
    is_async: bool = False

Ancestors

Instance variables

var params

The type of the None singleton.

var body

The type of the None singleton.

var is_async

The type of the None singleton.

Inherited members

class JsClassExpression (offset=-1, parent=None, leading_comments=<factory>, id=None, super_class=None, body=None)

JsClassExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , id: 'JsIdentifier | None' = None, super_class: 'Expression | None' = None, body: 'JsClassBody | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsClassExpression(Expression):
    id: JsIdentifier | None = None
    super_class: Expression | None = None
    body: JsClassBody | None = None

Ancestors

Instance variables

var id

The type of the None singleton.

var super_class

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsUnaryExpression (offset=-1, parent=None, leading_comments=<factory>, operator='', operand=None, prefix=True)

JsUnaryExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operator: 'str' = '', operand: 'Expression | None' = None, prefix: 'bool' = True)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsUnaryExpression(Expression):
    operator: str = ''
    operand: Expression | None = None
    prefix: bool = True

Ancestors

Instance variables

var operator

The type of the None singleton.

var operand

The type of the None singleton.

var prefix

The type of the None singleton.

Inherited members

class JsUpdateExpression (offset=-1, parent=None, leading_comments=<factory>, operator='', argument=None, prefix=True)

JsUpdateExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operator: 'str' = '', argument: 'Expression | None' = None, prefix: 'bool' = True)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsUpdateExpression(Expression):
    operator: str = ''
    argument: Expression | None = None
    prefix: bool = True

Ancestors

Instance variables

var operator

The type of the None singleton.

var argument

The type of the None singleton.

var prefix

The type of the None singleton.

Inherited members

class JsBinaryExpression (offset=-1, parent=None, leading_comments=<factory>, left=None, operator='', right=None)

JsBinaryExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , left: 'Expression | None' = None, operator: 'str' = '', right: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsBinaryExpression(Expression):
    left: Expression | None = None
    operator: str = ''
    right: Expression | None = None

Ancestors

Instance variables

var left

The type of the None singleton.

var operator

The type of the None singleton.

var right

The type of the None singleton.

Inherited members

class JsLogicalExpression (offset=-1, parent=None, leading_comments=<factory>, left=None, operator='', right=None)

JsLogicalExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , left: 'Expression | None' = None, operator: 'str' = '', right: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsLogicalExpression(Expression):
    left: Expression | None = None
    operator: str = ''
    right: Expression | None = None

Ancestors

Instance variables

var left

The type of the None singleton.

var operator

The type of the None singleton.

var right

The type of the None singleton.

Inherited members

class JsAssignmentExpression (offset=-1, parent=None, leading_comments=<factory>, left=None, operator='=', right=None)

JsAssignmentExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , left: 'Expression | None' = None, operator: 'str' = '=', right: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsAssignmentExpression(Expression):
    left: Expression | None = None
    operator: str = '='
    right: Expression | None = None

Ancestors

Instance variables

var left

The type of the None singleton.

var operator

The type of the None singleton.

var right

The type of the None singleton.

Inherited members

class JsConditionalExpression (offset=-1, parent=None, leading_comments=<factory>, test=None, consequent=None, alternate=None)

JsConditionalExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , test: 'Expression | None' = None, consequent: 'Expression | None' = None, alternate: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsConditionalExpression(Expression):
    test: Expression | None = None
    consequent: Expression | None = None
    alternate: Expression | None = None

Ancestors

Instance variables

var test

The type of the None singleton.

var consequent

The type of the None singleton.

var alternate

The type of the None singleton.

Inherited members

class JsMemberExpression (offset=-1, parent=None, leading_comments=<factory>, object=None, property=None, computed=False, optional=False)

JsMemberExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , object: 'Expression | None' = None, property: 'Expression | None' = None, computed: 'bool' = False, optional: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsMemberExpression(Expression):
    object: Expression | None = None
    property: Expression | None = None
    computed: bool = False
    optional: bool = False

Ancestors

Instance variables

var object

The type of the None singleton.

var property

The type of the None singleton.

var computed

The type of the None singleton.

var optional

The type of the None singleton.

Inherited members

class JsCallExpression (offset=-1, parent=None, leading_comments=<factory>, callee=None, arguments=<factory>, optional=False)

JsCallExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , callee: 'Expression | None' = None, arguments: 'list[Expression]' = , optional: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsCallExpression(Expression):
    callee: Expression | None = None
    arguments: list[Expression] = field(default_factory=list)
    optional: bool = False

Ancestors

Instance variables

var arguments

The type of the None singleton.

var callee

The type of the None singleton.

var optional

The type of the None singleton.

Inherited members

class JsNewExpression (offset=-1, parent=None, leading_comments=<factory>, callee=None, arguments=<factory>)

JsNewExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , callee: 'Expression | None' = None, arguments: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsNewExpression(Expression):
    callee: Expression | None = None
    arguments: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var arguments

The type of the None singleton.

var callee

The type of the None singleton.

Inherited members

class JsSequenceExpression (offset=-1, parent=None, leading_comments=<factory>, expressions=<factory>)

JsSequenceExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expressions: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsSequenceExpression(Expression):
    expressions: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var expressions

The type of the None singleton.

Inherited members

class JsYieldExpression (offset=-1, parent=None, leading_comments=<factory>, argument=None, delegate=False)

JsYieldExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , argument: 'Expression | None' = None, delegate: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsYieldExpression(Expression):
    argument: Expression | None = None
    delegate: bool = False

Ancestors

Instance variables

var argument

The type of the None singleton.

var delegate

The type of the None singleton.

Inherited members

class JsAwaitExpression (offset=-1, parent=None, leading_comments=<factory>, argument=None)

JsAwaitExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , argument: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsAwaitExpression(Expression):
    argument: Expression | None = None

Ancestors

Instance variables

var argument

The type of the None singleton.

Inherited members

class JsTaggedTemplateExpression (offset=-1, parent=None, leading_comments=<factory>, tag=None, quasi=None)

JsTaggedTemplateExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , tag: 'Expression | None' = None, quasi: 'JsTemplateLiteral | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsTaggedTemplateExpression(Expression):
    tag: Expression | None = None
    quasi: JsTemplateLiteral | None = None

Ancestors

Instance variables

var tag

The type of the None singleton.

var quasi

The type of the None singleton.

Inherited members

class JsParenthesizedExpression (offset=-1, parent=None, leading_comments=<factory>, expression=None)

JsParenthesizedExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expression: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsParenthesizedExpression(Expression):
    expression: Expression | None = None

Ancestors

Instance variables

var expression

The type of the None singleton.

Inherited members

class JsArrayPattern (offset=-1, parent=None, leading_comments=<factory>, elements=<factory>)

JsArrayPattern(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , elements: 'list[Expression | None]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsArrayPattern(Expression):
    elements: list[Expression | None] = field(default_factory=list)

Ancestors

Instance variables

var elements

The type of the None singleton.

Inherited members

class JsObjectPattern (offset=-1, parent=None, leading_comments=<factory>, properties=<factory>)

JsObjectPattern(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , properties: 'list[JsProperty | JsRestElement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsObjectPattern(Expression):
    properties: list[JsProperty | JsRestElement] = field(default_factory=list)

Ancestors

Instance variables

var properties

The type of the None singleton.

Inherited members

class JsAssignmentPattern (offset=-1, parent=None, leading_comments=<factory>, left=None, right=None)

JsAssignmentPattern(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , left: 'Expression | None' = None, right: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsAssignmentPattern(Expression):
    left: Expression | None = None
    right: Expression | None = None

Ancestors

Instance variables

var left

The type of the None singleton.

var right

The type of the None singleton.

Inherited members

class JsRestElement (offset=-1, parent=None, leading_comments=<factory>, argument=None)

JsRestElement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , argument: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsRestElement(Expression):
    argument: Expression | None = None

Ancestors

Instance variables

var argument

The type of the None singleton.

Inherited members

class JsClassBody (offset=-1, parent=None, leading_comments=<factory>, body=<factory>)

JsClassBody(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[JsMethodDefinition | JsPropertyDefinition]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsClassBody(Node):
    body: list[JsMethodDefinition | JsPropertyDefinition] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

Inherited members

class JsMethodDefinition (offset=-1, parent=None, leading_comments=<factory>, key=None, value=None, kind=JsMethodKind.METHOD, computed=False, is_static=False)

JsMethodDefinition(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , key: 'Expression | None' = None, value: 'JsFunctionExpression | None' = None, kind: 'JsMethodKind' = , computed: 'bool' = False, is_static: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsMethodDefinition(Node):
    key: Expression | None = None
    value: JsFunctionExpression | None = None
    kind: JsMethodKind = JsMethodKind.METHOD
    computed: bool = False
    is_static: bool = False

Ancestors

Instance variables

var key

The type of the None singleton.

var value

The type of the None singleton.

var kind

The type of the None singleton.

var computed

The type of the None singleton.

var is_static

The type of the None singleton.

Inherited members

class JsPropertyDefinition (offset=-1, parent=None, leading_comments=<factory>, key=None, value=None, computed=False, is_static=False)

JsPropertyDefinition(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , key: 'Expression | None' = None, value: 'Expression | None' = None, computed: 'bool' = False, is_static: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsPropertyDefinition(Node):
    key: Expression | None = None
    value: Expression | None = None
    computed: bool = False
    is_static: bool = False

Ancestors

Instance variables

var key

The type of the None singleton.

var value

The type of the None singleton.

var computed

The type of the None singleton.

var is_static

The type of the None singleton.

Inherited members

class JsExpressionStatement (offset=-1, parent=None, leading_comments=<factory>, expression=None)

JsExpressionStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expression: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsExpressionStatement(Statement):
    expression: Expression | None = None

Ancestors

Instance variables

var expression

The type of the None singleton.

Inherited members

class JsBlockStatement (offset=-1, parent=None, leading_comments=<factory>, body=<factory>)

JsBlockStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsBlockStatement(Statement):
    body: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

Inherited members

class JsEmptyStatement (offset=-1, parent=None, leading_comments=<factory>)

JsEmptyStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsEmptyStatement(Statement):
    pass

Ancestors

Inherited members

class JsVariableDeclaration (offset=-1, parent=None, leading_comments=<factory>, declarations=<factory>, kind=JsVarKind.VAR)

JsVariableDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , declarations: 'list[JsVariableDeclarator]' = , kind: 'JsVarKind' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsVariableDeclaration(Statement):
    declarations: list[JsVariableDeclarator] = field(default_factory=list)
    kind: JsVarKind = JsVarKind.VAR

Ancestors

Instance variables

var declarations

The type of the None singleton.

var kind

The type of the None singleton.

Inherited members

class JsVariableDeclarator (offset=-1, parent=None, leading_comments=<factory>, id=None, init=None)

JsVariableDeclarator(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , id: 'Expression | None' = None, init: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsVariableDeclarator(Node):
    id: Expression | None = None
    init: Expression | None = None

Ancestors

Instance variables

var id

The type of the None singleton.

var init

The type of the None singleton.

Inherited members

class JsIfStatement (offset=-1, parent=None, leading_comments=<factory>, test=None, consequent=None, alternate=None)

JsIfStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , test: 'Expression | None' = None, consequent: 'Statement | None' = None, alternate: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsIfStatement(Statement):
    test: Expression | None = None
    consequent: Statement | None = None
    alternate: Statement | None = None

Ancestors

Instance variables

var test

The type of the None singleton.

var consequent

The type of the None singleton.

var alternate

The type of the None singleton.

Inherited members

class JsWhileStatement (offset=-1, parent=None, leading_comments=<factory>, test=None, body=None)

JsWhileStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , test: 'Expression | None' = None, body: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsWhileStatement(Statement):
    test: Expression | None = None
    body: Statement | None = None

Ancestors

Instance variables

var test

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsDoWhileStatement (offset=-1, parent=None, leading_comments=<factory>, test=None, body=None)

JsDoWhileStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , test: 'Expression | None' = None, body: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsDoWhileStatement(Statement):
    test: Expression | None = None
    body: Statement | None = None

Ancestors

Instance variables

var test

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsForStatement (offset=-1, parent=None, leading_comments=<factory>, init=None, test=None, update=None, body=None)

JsForStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , init: 'Expression | Statement | None' = None, test: 'Expression | None' = None, update: 'Expression | None' = None, body: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsForStatement(Statement):
    init: Expression | Statement | None = None
    test: Expression | None = None
    update: Expression | None = None
    body: Statement | None = None

Ancestors

Instance variables

var init

The type of the None singleton.

var test

The type of the None singleton.

var update

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsForInStatement (offset=-1, parent=None, leading_comments=<factory>, left=None, right=None, body=None)

JsForInStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , left: 'Expression | Statement | None' = None, right: 'Expression | None' = None, body: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsForInStatement(Statement):
    left: Expression | Statement | None = None
    right: Expression | None = None
    body: Statement | None = None

Ancestors

Instance variables

var left

The type of the None singleton.

var right

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsForOfStatement (offset=-1, parent=None, leading_comments=<factory>, left=None, right=None, body=None, is_await=False)

JsForOfStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , left: 'Expression | Statement | None' = None, right: 'Expression | None' = None, body: 'Statement | None' = None, is_await: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsForOfStatement(Statement):
    left: Expression | Statement | None = None
    right: Expression | None = None
    body: Statement | None = None
    is_await: bool = False

Ancestors

Instance variables

var left

The type of the None singleton.

var right

The type of the None singleton.

var body

The type of the None singleton.

var is_await

The type of the None singleton.

Inherited members

class JsSwitchStatement (offset=-1, parent=None, leading_comments=<factory>, discriminant=None, cases=<factory>)

JsSwitchStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , discriminant: 'Expression | None' = None, cases: 'list[JsSwitchCase]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsSwitchStatement(Statement):
    discriminant: Expression | None = None
    cases: list[JsSwitchCase] = field(default_factory=list)

Ancestors

Instance variables

var cases

The type of the None singleton.

var discriminant

The type of the None singleton.

Inherited members

class JsSwitchCase (offset=-1, parent=None, leading_comments=<factory>, test=None, consequent=<factory>)

JsSwitchCase(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , test: 'Expression | None' = None, consequent: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsSwitchCase(Node):
    test: Expression | None = None
    consequent: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var consequent

The type of the None singleton.

var test

The type of the None singleton.

Inherited members

class JsTryStatement (offset=-1, parent=None, leading_comments=<factory>, block=None, handler=None, finalizer=None)

JsTryStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , block: 'JsBlockStatement | None' = None, handler: 'JsCatchClause | None' = None, finalizer: 'JsBlockStatement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsTryStatement(Statement):
    block: JsBlockStatement | None = None
    handler: JsCatchClause | None = None
    finalizer: JsBlockStatement | None = None

Ancestors

Instance variables

var block

The type of the None singleton.

var handler

The type of the None singleton.

var finalizer

The type of the None singleton.

Inherited members

class JsCatchClause (offset=-1, parent=None, leading_comments=<factory>, param=None, body=None)

JsCatchClause(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , param: 'Expression | None' = None, body: 'JsBlockStatement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsCatchClause(Node):
    param: Expression | None = None
    body: JsBlockStatement | None = None

Ancestors

Instance variables

var param

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsThrowStatement (offset=-1, parent=None, leading_comments=<factory>, argument=None)

JsThrowStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , argument: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsThrowStatement(Statement):
    argument: Expression | None = None

Ancestors

Instance variables

var argument

The type of the None singleton.

Inherited members

class JsReturnStatement (offset=-1, parent=None, leading_comments=<factory>, argument=None)

JsReturnStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , argument: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsReturnStatement(Statement):
    argument: Expression | None = None

Ancestors

Instance variables

var argument

The type of the None singleton.

Inherited members

class JsBreakStatement (offset=-1, parent=None, leading_comments=<factory>, label=None)

JsBreakStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , label: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsBreakStatement(Statement):
    label: JsIdentifier | None = None

Ancestors

Instance variables

var label

The type of the None singleton.

Inherited members

class JsContinueStatement (offset=-1, parent=None, leading_comments=<factory>, label=None)

JsContinueStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , label: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsContinueStatement(Statement):
    label: JsIdentifier | None = None

Ancestors

Instance variables

var label

The type of the None singleton.

Inherited members

class JsLabeledStatement (offset=-1, parent=None, leading_comments=<factory>, label=None, body=None)

JsLabeledStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , label: 'JsIdentifier | None' = None, body: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsLabeledStatement(Statement):
    label: JsIdentifier | None = None
    body: Statement | None = None

Ancestors

Instance variables

var label

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsWithStatement (offset=-1, parent=None, leading_comments=<factory>, object=None, body=None)

JsWithStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , object: 'Expression | None' = None, body: 'Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsWithStatement(Statement):
    object: Expression | None = None
    body: Statement | None = None

Ancestors

Instance variables

var object

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsDebuggerStatement (offset=-1, parent=None, leading_comments=<factory>)

JsDebuggerStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsDebuggerStatement(Statement):
    pass

Ancestors

Inherited members

class JsFunctionDeclaration (offset=-1, parent=None, leading_comments=<factory>, id=None, params=<factory>, body=None, generator=False, is_async=False)

JsFunctionDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , id: 'JsIdentifier | None' = None, params: 'list[Expression]' = , body: 'JsBlockStatement | None' = None, generator: 'bool' = False, is_async: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsFunctionDeclaration(Statement):
    id: JsIdentifier | None = None
    params: list[Expression] = field(default_factory=list)
    body: JsBlockStatement | None = None
    generator: bool = False
    is_async: bool = False

Ancestors

Instance variables

var params

The type of the None singleton.

var id

The type of the None singleton.

var body

The type of the None singleton.

var generator

The type of the None singleton.

var is_async

The type of the None singleton.

Inherited members

class JsClassDeclaration (offset=-1, parent=None, leading_comments=<factory>, id=None, super_class=None, body=None)

JsClassDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , id: 'JsIdentifier | None' = None, super_class: 'Expression | None' = None, body: 'JsClassBody | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsClassDeclaration(Statement):
    id: JsIdentifier | None = None
    super_class: Expression | None = None
    body: JsClassBody | None = None

Ancestors

Instance variables

var id

The type of the None singleton.

var super_class

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class JsImportSpecifier (offset=-1, parent=None, leading_comments=<factory>, imported=None, local=None)

JsImportSpecifier(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , imported: 'JsIdentifier | None' = None, local: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsImportSpecifier(Node):
    imported: JsIdentifier | None = None
    local: JsIdentifier | None = None

Ancestors

Instance variables

var imported

The type of the None singleton.

var local

The type of the None singleton.

Inherited members

class JsImportDefaultSpecifier (offset=-1, parent=None, leading_comments=<factory>, local=None)

JsImportDefaultSpecifier(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , local: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsImportDefaultSpecifier(Node):
    local: JsIdentifier | None = None

Ancestors

Instance variables

var local

The type of the None singleton.

Inherited members

class JsImportNamespaceSpecifier (offset=-1, parent=None, leading_comments=<factory>, local=None)

JsImportNamespaceSpecifier(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , local: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsImportNamespaceSpecifier(Node):
    local: JsIdentifier | None = None

Ancestors

Instance variables

var local

The type of the None singleton.

Inherited members

class JsImportDeclaration (offset=-1, parent=None, leading_comments=<factory>, specifiers=<factory>, source=None)

JsImportDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , specifiers: 'list[JsImportSpecifier | JsImportDefaultSpecifier | JsImportNamespaceSpecifier]' = , source: 'JsStringLiteral | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsImportDeclaration(Statement):
    specifiers: list[
        JsImportSpecifier | JsImportDefaultSpecifier | JsImportNamespaceSpecifier
    ] = field(default_factory=list)
    source: JsStringLiteral | None = None

Ancestors

Instance variables

var specifiers

The type of the None singleton.

var source

The type of the None singleton.

Inherited members

class JsExportSpecifier (offset=-1, parent=None, leading_comments=<factory>, local=None, exported=None)

JsExportSpecifier(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , local: 'JsIdentifier | None' = None, exported: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsExportSpecifier(Node):
    local: JsIdentifier | None = None
    exported: JsIdentifier | None = None

Ancestors

Instance variables

var local

The type of the None singleton.

var exported

The type of the None singleton.

Inherited members

class JsExportNamedDeclaration (offset=-1, parent=None, leading_comments=<factory>, declaration=None, specifiers=<factory>, source=None)

JsExportNamedDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , declaration: 'Statement | None' = None, specifiers: 'list[JsExportSpecifier]' = , source: 'JsStringLiteral | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsExportNamedDeclaration(Statement):
    declaration: Statement | None = None
    specifiers: list[JsExportSpecifier] = field(default_factory=list)
    source: JsStringLiteral | None = None

Ancestors

Instance variables

var specifiers

The type of the None singleton.

var declaration

The type of the None singleton.

var source

The type of the None singleton.

Inherited members

class JsExportDefaultDeclaration (offset=-1, parent=None, leading_comments=<factory>, declaration=None)

JsExportDefaultDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , declaration: 'Expression | Statement | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsExportDefaultDeclaration(Statement):
    declaration: Expression | Statement | None = None

Ancestors

Instance variables

var declaration

The type of the None singleton.

Inherited members

class JsExportAllDeclaration (offset=-1, parent=None, leading_comments=<factory>, source=None, exported=None)

JsExportAllDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , source: 'JsStringLiteral | None' = None, exported: 'JsIdentifier | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsExportAllDeclaration(Statement):
    source: JsStringLiteral | None = None
    exported: JsIdentifier | None = None

Ancestors

Instance variables

var source

The type of the None singleton.

var exported

The type of the None singleton.

Inherited members

class JsScript (offset=-1, parent=None, leading_comments=<factory>, body=<factory>)

JsScript(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class JsScript(Statement):
    body: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

Inherited members