swc_coverage_instrument/utils/
node.rs1use std::fmt::{Display, Formatter};
2
3#[derive(Copy, Debug, Clone, PartialEq)]
4pub enum Node {
5 Program,
6 ModuleDecl,
7 Stmt,
8 Stmts,
9 Expr,
10 VarDeclarator,
11 ExprStmt,
12 ModuleItems,
13 ArrowExpr,
14 SetterProp,
15 GetterProp,
16 MethodProp,
17 BinExpr,
18 LogicalExpr,
19 CondExpr,
20 LabeledStmt,
21 FnExpr,
22 FnDecl,
23 WithStmt,
24 SwitchCase,
25 SwitchStmt,
26 DoWhileStmt,
27 WhileStmt,
28 ForOfStmt,
29 ForInStmt,
30 ForStmt,
31 IfStmt,
32 VarDecl,
33 TryStmt,
34 ThrowStmt,
35 ReturnStmt,
36 DebuggerStmt,
37 ContinueStmt,
38 BreakStmt,
39 PrivateProp,
40 ClassProp,
41 ClassDecl,
42 ClassMethod,
43 ExportDecl,
44 ExportDefaultDecl,
45 BlockStmt,
46 AssignPat,
47}
48
49impl Display for Node {
50 fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
51 write!(f, "{:#?}", self)
52 }
53}