oxc_syntax/generated/
derive_clone_in.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Auto-generated code, DO NOT EDIT DIRECTLY!
// To edit this generated file you have to edit `tasks/ast_tools/src/derives/clone_in.rs`

#![allow(clippy::default_trait_access)]

use oxc_allocator::{Allocator, CloneIn};

#[allow(clippy::wildcard_imports)]
use crate::number::*;

#[allow(clippy::wildcard_imports)]
use crate::operator::*;

impl<'alloc> CloneIn<'alloc> for NumberBase {
    type Cloned = NumberBase;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::Float => NumberBase::Float,
            Self::Decimal => NumberBase::Decimal,
            Self::Binary => NumberBase::Binary,
            Self::Octal => NumberBase::Octal,
            Self::Hex => NumberBase::Hex,
        }
    }
}

impl<'alloc> CloneIn<'alloc> for BigintBase {
    type Cloned = BigintBase;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::Decimal => BigintBase::Decimal,
            Self::Binary => BigintBase::Binary,
            Self::Octal => BigintBase::Octal,
            Self::Hex => BigintBase::Hex,
        }
    }
}

impl<'alloc> CloneIn<'alloc> for AssignmentOperator {
    type Cloned = AssignmentOperator;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::Assign => AssignmentOperator::Assign,
            Self::Addition => AssignmentOperator::Addition,
            Self::Subtraction => AssignmentOperator::Subtraction,
            Self::Multiplication => AssignmentOperator::Multiplication,
            Self::Division => AssignmentOperator::Division,
            Self::Remainder => AssignmentOperator::Remainder,
            Self::ShiftLeft => AssignmentOperator::ShiftLeft,
            Self::ShiftRight => AssignmentOperator::ShiftRight,
            Self::ShiftRightZeroFill => AssignmentOperator::ShiftRightZeroFill,
            Self::BitwiseOR => AssignmentOperator::BitwiseOR,
            Self::BitwiseXOR => AssignmentOperator::BitwiseXOR,
            Self::BitwiseAnd => AssignmentOperator::BitwiseAnd,
            Self::LogicalAnd => AssignmentOperator::LogicalAnd,
            Self::LogicalOr => AssignmentOperator::LogicalOr,
            Self::LogicalNullish => AssignmentOperator::LogicalNullish,
            Self::Exponential => AssignmentOperator::Exponential,
        }
    }
}

impl<'alloc> CloneIn<'alloc> for BinaryOperator {
    type Cloned = BinaryOperator;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::Equality => BinaryOperator::Equality,
            Self::Inequality => BinaryOperator::Inequality,
            Self::StrictEquality => BinaryOperator::StrictEquality,
            Self::StrictInequality => BinaryOperator::StrictInequality,
            Self::LessThan => BinaryOperator::LessThan,
            Self::LessEqualThan => BinaryOperator::LessEqualThan,
            Self::GreaterThan => BinaryOperator::GreaterThan,
            Self::GreaterEqualThan => BinaryOperator::GreaterEqualThan,
            Self::ShiftLeft => BinaryOperator::ShiftLeft,
            Self::ShiftRight => BinaryOperator::ShiftRight,
            Self::ShiftRightZeroFill => BinaryOperator::ShiftRightZeroFill,
            Self::Addition => BinaryOperator::Addition,
            Self::Subtraction => BinaryOperator::Subtraction,
            Self::Multiplication => BinaryOperator::Multiplication,
            Self::Division => BinaryOperator::Division,
            Self::Remainder => BinaryOperator::Remainder,
            Self::BitwiseOR => BinaryOperator::BitwiseOR,
            Self::BitwiseXOR => BinaryOperator::BitwiseXOR,
            Self::BitwiseAnd => BinaryOperator::BitwiseAnd,
            Self::In => BinaryOperator::In,
            Self::Instanceof => BinaryOperator::Instanceof,
            Self::Exponential => BinaryOperator::Exponential,
        }
    }
}

impl<'alloc> CloneIn<'alloc> for LogicalOperator {
    type Cloned = LogicalOperator;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::Or => LogicalOperator::Or,
            Self::And => LogicalOperator::And,
            Self::Coalesce => LogicalOperator::Coalesce,
        }
    }
}

impl<'alloc> CloneIn<'alloc> for UnaryOperator {
    type Cloned = UnaryOperator;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::UnaryNegation => UnaryOperator::UnaryNegation,
            Self::UnaryPlus => UnaryOperator::UnaryPlus,
            Self::LogicalNot => UnaryOperator::LogicalNot,
            Self::BitwiseNot => UnaryOperator::BitwiseNot,
            Self::Typeof => UnaryOperator::Typeof,
            Self::Void => UnaryOperator::Void,
            Self::Delete => UnaryOperator::Delete,
        }
    }
}

impl<'alloc> CloneIn<'alloc> for UpdateOperator {
    type Cloned = UpdateOperator;
    fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned {
        match self {
            Self::Increment => UpdateOperator::Increment,
            Self::Decrement => UpdateOperator::Decrement,
        }
    }
}