UNPKG

microvium

Version:

A compact, embeddable scripting engine for microcontrollers for executing small scripts written in a subset of JavaScript.

14 lines (13 loc) 2.75 kB
import * as B from '@babel/types'; export { ArrayExpression, ArrowFunctionExpression, AssignmentExpression, BinaryExpression, Block, BlockStatement, BreakStatement, CallExpression, ConditionalExpression, DoWhileStatement, ExportNamedDeclaration, Expression, ExpressionStatement, File, ForStatement, FunctionDeclaration, FunctionExpression, Identifier, IfStatement, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, isExpression, isTSType, LogicalExpression, LVal, MemberExpression, Node, ObjectExpression, PrivateName, Program, ReturnStatement, Statement, SwitchStatement, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, CatchClause, ClassDeclaration, ClassExpression, ClassBody, ClassProperty, ClassMethod, SourceLocation, NewExpression, AwaitExpression } from '@babel/types'; export declare type SupportedStatement = B.IfStatement | B.BlockStatement | B.ExpressionStatement | B.WhileStatement | B.DoWhileStatement | B.VariableDeclaration | B.ForStatement | B.ReturnStatement | B.ThrowStatement | B.ExportNamedDeclaration | B.SwitchStatement | B.BreakStatement | B.FunctionDeclaration | B.TryStatement | B.ClassDeclaration | SupportedLoopStatement; export declare type SupportedLoopStatement = B.WhileStatement | B.DoWhileStatement | B.ForStatement; export declare type SupportedFunctionExpression = B.FunctionExpression | B.ArrowFunctionExpression; export declare type SupportedFunctionNode = B.FunctionDeclaration | B.ClassMethod | SupportedFunctionExpression; export declare type SupportedClassNode = B.ClassDeclaration | B.ClassExpression; export declare type SupportedModuleStatement = SupportedStatement | B.ImportDeclaration; export declare type SupportedExpression = B.BooleanLiteral | B.NumericLiteral | B.StringLiteral | B.NullLiteral | B.Identifier | B.BinaryExpression | B.UpdateExpression | B.UnaryExpression | B.AssignmentExpression | B.LogicalExpression | B.CallExpression | B.MemberExpression | B.ArrayExpression | B.ObjectExpression | B.ConditionalExpression | B.ThisExpression | B.TemplateLiteral | B.ClassExpression | B.NewExpression | B.AwaitExpression | SupportedFunctionExpression; export declare type SupportedNode = B.Program | B.VariableDeclarator | B.ObjectProperty | B.CatchClause | B.ClassMethod | B.ClassProperty | SupportedModuleStatement | SupportedExpression; export declare function isFunctionNode(node: SupportedNode): node is SupportedFunctionNode; export declare function isClassField(node: B.ClassBody['body'][number]): node is B.ClassMethod | B.ClassProperty; export declare function isConstructor(node: B.ClassBody['body'][number]): node is B.ClassMethod;