escaya-codegen
Version:
lightweight and blazing fast JavaScript code generator from an EScaya-compliant AST
167 lines • 15.9 kB
TypeScript
import { ExportDeclaration } from 'escaya/dist/ast/module/export-declaration';
import { ComputedPropertyName } from 'escaya/dist/ast/expressions/computed-property-name';
import { BlockStatement } from 'escaya/dist/ast/statements/block-stmt';
import { ArrowFunction } from 'escaya/dist/ast/expressions/arrow-function';
import { LabelIdentifier } from 'escaya/dist/ast/expressions/labelIdentifier-expr';
import { IdentifierReference } from 'escaya/dist/ast/expressions/identifierreference';
import { IdentifierName } from 'escaya/dist/ast/expressions/identifiername';
import { BindingIdentifier } from 'escaya/dist/ast/expressions/binding-identifier';
import { PostfixUpdateExpression } from 'escaya/dist/ast/expressions/postfix-update-expr';
import { PrefixUpdateExpression } from 'escaya/dist/ast/expressions/prefix-update-expr';
import { BindingElement } from 'escaya/dist/ast/expressions/binding-element';
import { AssignmentElement } from 'escaya/dist/ast/expressions/assignment-element';
import { AwaitExpression } from 'escaya/dist/ast/expressions/await-expr';
import { BinaryExpression } from 'escaya/dist/ast/expressions/binary-expr';
import { ArrayBindingPattern } from 'escaya/dist/ast/expressions/array-binding-pattern';
import { FunctionBody } from 'escaya/dist/ast/expressions/function-body';
import { NumericLiteral } from 'escaya/dist/ast/expressions/numeric-literal';
import { AssignmentExpression } from 'escaya/dist/ast/expressions/assignment-expr';
import { BooleanLiteral } from 'escaya/dist/ast/expressions/boolean-literal';
import { BreakStatement } from 'escaya/dist/ast/statements/break-stmt';
import { CallExpression } from 'escaya/dist/ast/expressions/call-expr';
import { CatchClause, TryStatement } from 'escaya/dist/ast/statements/try-stmt';
import { ClassElement } from 'escaya/dist/ast/expressions/class-element';
import { ContinueStatement } from 'escaya/dist/ast/statements/continue-stmt';
import { DebuggerStatement } from 'escaya/dist/ast/statements/debugger-stmt';
import { Directive } from 'escaya/dist/ast/directive-node';
import { DoWhileStatement } from 'escaya/dist/ast/statements/do-stmt';
import { ExpressionStatement } from 'escaya/dist/ast/statements/expression-stmt';
import { ParenthesizedExpression } from 'escaya/dist/ast/expressions/parenthesized-expr';
import { ImportCall } from 'escaya/dist/ast/expressions/import-call';
import { LabelledStatement } from 'escaya/dist/ast/statements/labelled-stmt';
import { BindingRestProperty } from 'escaya/dist/ast/expressions/binding-rest-property';
import { BindingRestElement } from 'escaya/dist/ast/expressions/binding-rest-element';
import { PropertyName } from 'escaya/dist/ast/expressions/property-name';
import { NewExpression } from 'escaya/dist/ast/expressions/new-expr';
import { ObjectLiteral } from 'escaya/dist/ast/expressions/object-literal';
import { ObjectBindingPattern } from 'escaya/dist/ast/expressions/object-binding-pattern';
import { RegularExpressionLiteral } from 'escaya/dist/ast/expressions/regular-expression';
import { SpreadProperty } from 'escaya/dist/ast/expressions/spread-property';
import { ReturnStatement } from 'escaya/dist/ast/statements/return-stmt';
import { FunctionDeclaration } from 'escaya/dist/ast/declarations/function-declaration';
import { FunctionExpression } from 'escaya/dist/ast/expressions/function-expr';
import { AssignmentRestElement } from 'escaya/dist/ast/expressions/assignment-rest-element';
import { SuperProperty } from 'escaya/dist/ast/expressions/super-property';
import { SuperCall } from 'escaya/dist/ast/expressions/super-call';
import { ArrayAssignmentPattern } from 'escaya/dist/ast/expressions/array-assignment-pattern';
import { ArrayLiteral } from 'escaya/dist/ast/expressions/array-literal';
import { ClassExpression } from 'escaya/dist/ast/expressions/class-expr';
import { ClassDeclaration } from 'escaya/dist/ast/declarations/class-declaration';
import { IfStatement } from 'escaya/dist/ast/statements/if-stmt';
import { MemberExpression } from 'escaya/dist/ast/expressions/member-expr';
import { ThrowStatement } from 'escaya/dist/ast/statements/throw-stmt';
import { SwitchStatement } from 'escaya/dist/ast/statements/switch-stmt';
import { UnaryExpression } from 'escaya/dist/ast/expressions/unary-expr';
import { VariableDeclaration } from 'escaya/dist/ast/declarations/variable-declaration';
import { LexicalBinding } from 'escaya/dist/ast/statements/lexical-binding';
import { LexicalDeclaration } from 'escaya/dist/ast/declarations/lexical-declaration';
import { ForBinding } from 'escaya/dist/ast/statements/forBinding';
import { WhileStatement } from 'escaya/dist/ast/statements/while-stmt';
import { YieldExpression } from 'escaya/dist/ast/expressions/yield-expr';
import { WithStatement } from 'escaya/dist/ast/statements/with-stmt';
import { ImportSpecifier } from 'escaya/dist/ast/module/import-specifier';
import { NamedImports } from 'escaya/dist/ast/module/named-imports';
import { ImportClause } from 'escaya/dist/ast/module/import-clause';
import { MethodDefinition } from 'escaya/dist/ast/expressions/method-definition';
import { ConditionalExpression } from 'escaya/dist/ast/expressions/conditional-expr';
import { BigIntLiteral } from 'escaya/dist/ast/expressions/bigint-literal';
import { TemplateLiteral } from 'escaya/dist/ast/expressions/template-literal';
import { TaggedTemplate } from 'escaya/dist/ast/expressions/tagged-template';
import { ObjectAssignmentPattern } from 'escaya/dist/ast/expressions/object-assignment-pattern';
import { ImportDeclaration } from 'escaya/dist/ast/module/import-declaration';
import { ExportSpecifier } from 'escaya/dist/ast/module/export-specifier';
import { ExportDefault } from 'escaya/dist/ast/module/export-default';
import { ExportFromClause } from 'escaya/dist/ast/module/export-from-clause';
import { CodeGenState, Context } from './common';
export declare function printArray(node: ArrayBindingPattern | ArrayAssignmentPattern | ArrayLiteral, state: CodeGenState, context: Context): string;
export declare function printIdentifier(node: IdentifierReference | BindingIdentifier | LabelIdentifier | IdentifierName): string;
export declare function printPostfixUpdateExpression(node: PostfixUpdateExpression, state: CodeGenState, context: Context): string;
export declare function printPrefixUpdateExpression(node: PrefixUpdateExpression, state: CodeGenState, context: Context): string;
export declare function printAssignableElement(node: BindingElement | AssignmentElement, state: CodeGenState, context: Context): string;
export declare function printAwaitExpression(node: AwaitExpression, state: CodeGenState, context: Context): string;
export declare function printBigIntLiteral(node: BigIntLiteral): string;
export declare function printBinaryExpression(node: BinaryExpression, state: CodeGenState, context: Context): string;
export declare function printFunctionBody(node: FunctionBody, state: CodeGenState, context: Context): string;
export declare function printNumericLiteral(node: NumericLiteral): string;
export declare function printFloatingPointLiteral(node: NumericLiteral, _state: CodeGenState, context: Context): string;
export declare function printArrowFunction(node: ArrowFunction, state: CodeGenState, context: Context): string;
export declare function printAssignmentExpression(node: AssignmentExpression, state: CodeGenState, context: Context): string;
export declare function printBlockStatement(node: BlockStatement, state: CodeGenState, context: Context): string;
export declare function printBooleanLiteral(node: BooleanLiteral): string;
export declare function printBreakStatement(node: BreakStatement, state: CodeGenState, context: Context): string;
export declare function printCallExpression(node: CallExpression, state: CodeGenState, context: Context): string;
export declare function printCatchClause(node: CatchClause, state: CodeGenState, context: Context): string;
export declare function printClassDeclaration(node: ClassDeclaration, state: CodeGenState, context: Context): string;
export declare function printClassExpression(node: ClassExpression, state: CodeGenState, context: Context): string;
export declare function printClassElement(node: ClassElement, state: CodeGenState, context: Context): string;
export declare function printConditionalExpression(node: ConditionalExpression, state: CodeGenState, context: Context): string;
export declare function printContinueStatement(node: ContinueStatement, state: CodeGenState, context: Context): string;
export declare function printDebuggerStatement(_node: DebuggerStatement, _state: CodeGenState, context: Context): string;
export declare function printDirective(node: Directive, _state: CodeGenState, context: Context): string;
export declare function printDoWhileStatement(node: DoWhileStatement, state: CodeGenState, context: Context): string;
export declare function printEmptyStatement(): string;
export declare function printExpressionStatement(node: ExpressionStatement, state: CodeGenState, context: Context): string;
export declare function printForInStatement(node: any, state: CodeGenState, context: Context): string;
export declare function printForOfStatement(node: any, state: CodeGenState, context: Context): string;
export declare function printForStatement(node: any, state: CodeGenState, context: Context): string;
export declare function printElison(): string;
export declare function printSemicolon(): string;
export declare function printFunctionDeclaration(node: FunctionDeclaration, state: CodeGenState, context: Context): string;
export declare function printFunctionExpression(node: FunctionExpression, state: CodeGenState, context: Context): string;
export declare function printIfStatement(node: IfStatement, state: CodeGenState, context: Context): string;
export declare function printCoverParenthesizedExpressionAndArrowParameterList(node: ParenthesizedExpression, state: CodeGenState, context: Context): string;
export declare function printImportCall(node: ImportCall, state: CodeGenState, context: Context): string;
export declare function printImportMeta(): string;
export declare function printLabelledStatement(node: LabelledStatement, state: CodeGenState, context: Context): string;
export declare function printBindingRestProperty(node: BindingRestProperty, state: CodeGenState, context: Context): string;
export declare function printBindingRestElement(node: BindingRestElement, state: CodeGenState, context: Context): string;
export declare function printPropertyName(node: PropertyName, state: CodeGenState, context: Context): string;
export declare function printComputedPropertyName(node: ComputedPropertyName, state: CodeGenState, context: Context): string;
export declare function printMemberExpression(node: MemberExpression, state: CodeGenState, context: Context): string;
export declare function printMethodDefinition(node: MethodDefinition, state: CodeGenState, context: Context): string;
export declare function printNewExpression(node: NewExpression, state: CodeGenState, context: Context): string;
export declare function printNullLiteral(): any;
export declare function printObjectLiteral(node: ObjectLiteral, state: CodeGenState, context: Context): string;
export declare function printObjectAssignmentPattern(node: ObjectAssignmentPattern, state: CodeGenState, context: Context): string;
export declare function printObjectBindingPattern(node: ObjectBindingPattern, state: CodeGenState, context: Context): string;
export declare function printRegularExpressionLiteral(node: RegularExpressionLiteral, state: CodeGenState): string;
export declare function printSpreadProperty(node: SpreadProperty, state: CodeGenState, context: Context): string;
export declare function printReturnStatement(node: ReturnStatement, state: CodeGenState, context: Context): string;
export declare function printCommaOperator(node: any, state: CodeGenState, context: Context): string;
export declare function printSpreadElement(node: any, state: CodeGenState, context: Context): string;
export declare function printStringLiteral(node: any, _state: CodeGenState, context: Context): string;
export declare function printSuperCall(node: SuperCall, state: CodeGenState, context: Context): string;
export declare function printSuperProperty(node: SuperProperty, state: CodeGenState, context: Context): string;
export declare function printSwitchStatement(node: SwitchStatement, state: CodeGenState, context: Context): string;
export declare function printThisExpression(): string;
export declare function printThrowStatement(node: ThrowStatement, state: CodeGenState, context: Context): string;
export declare function printTryStatement(node: TryStatement, state: CodeGenState, context: Context): string;
export declare function printUnaryExpression(node: UnaryExpression, state: CodeGenState, context: Context): string;
export declare function printVariableStatement(node: any, state: CodeGenState, context: Context): string;
export declare function printVariableDeclaration(node: VariableDeclaration, state: CodeGenState, context: Context): string;
export declare function printLexicalDeclaration(node: LexicalDeclaration, state: CodeGenState, context: Context): string;
export declare function printForBinding(node: ForBinding, state: CodeGenState, context: Context): string;
export declare function printLexicalBinding(node: LexicalBinding, state: CodeGenState, context: Context): string;
export declare function printWhileStatement(node: WhileStatement, state: CodeGenState, context: Context): string;
export declare function printAssignmentRestElement(node: AssignmentRestElement, state: CodeGenState, context: Context): string;
export declare function printAssignmentRestProperty(node: any, state: CodeGenState, context: Context): string;
export declare function printWithStatement(node: WithStatement, state: CodeGenState, context: Context): string;
export declare function printYieldExpression(node: YieldExpression, state: CodeGenState, context: Context): string;
export declare function printTemplateLiteral(node: TemplateLiteral): string;
export declare function printTaggedTemplate(node: TaggedTemplate, state: CodeGenState, context: Context): string;
export declare function printTemplateExpression(node: any, state: CodeGenState, context: Context): string;
export declare function printTemplateElement(node: any, state: CodeGenState, context: Context): string;
export declare function printOptionalExpression(node: any, state: CodeGenState, context: Context): string;
export declare function printOptionalChain(node: any, state: CodeGenState, context: Context): string;
export declare function printCallChain(node: any, state: CodeGenState, context: Context): string;
export declare function printMemberChain(node: any, state: CodeGenState, context: Context): string;
export declare function printNewTarget(): string;
export declare function printImportDeclaration(node: ImportDeclaration, state: CodeGenState, context: Context): string;
export declare function printImportClause(node: ImportClause, state: CodeGenState, context: Context): string;
export declare function printNamedImports(node: NamedImports, state: CodeGenState, context: Context): string;
export declare function printImportSpecifier(node: ImportSpecifier): string;
export declare function printExportDeclaration(node: ExportDeclaration, state: CodeGenState, context: Context): string;
export declare function printExportFromClause(node: ExportFromClause): string;
export declare function printExportSpecifier(node: ExportSpecifier): string;
export declare function printExportDefault(node: ExportDefault, state: CodeGenState, context: Context): string;
//# sourceMappingURL=nodes.d.ts.map