Skip to main content

luaur_ast/records/
ast_expr_binary.rs

1use crate::records::ast_expr::AstExpr;
2
3#[repr(C)]
4#[derive(Debug)]
5#[allow(non_camel_case_types)]
6pub struct AstExprBinary {
7    pub base: AstExpr,
8    pub op: AstExprBinary_Op,
9    pub left: *mut AstExpr,
10    pub right: *mut AstExpr,
11}
12
13#[repr(u32)]
14#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
15#[allow(non_camel_case_types)]
16pub enum AstExprBinary_Op {
17    Add,
18    Sub,
19    Mul,
20    Div,
21    FloorDiv,
22    Mod,
23    Pow,
24    Concat,
25    CompareNe,
26    CompareEq,
27    CompareLt,
28    CompareLe,
29    CompareGt,
30    CompareGe,
31    And,
32    Or,
33    Op__Count,
34}
35
36impl crate::rtti::AstNodeClass for AstExprBinary {
37    const CLASS_INDEX: i32 = crate::rtti::ast_rtti_index("AstExprBinary");
38}
39
40impl AstExprBinary {
41    pub const Add: AstExprBinary_Op = AstExprBinary_Op::Add;
42    pub const Sub: AstExprBinary_Op = AstExprBinary_Op::Sub;
43    pub const Mul: AstExprBinary_Op = AstExprBinary_Op::Mul;
44    pub const Div: AstExprBinary_Op = AstExprBinary_Op::Div;
45    pub const FloorDiv: AstExprBinary_Op = AstExprBinary_Op::FloorDiv;
46    pub const Mod: AstExprBinary_Op = AstExprBinary_Op::Mod;
47    pub const Pow: AstExprBinary_Op = AstExprBinary_Op::Pow;
48    pub const Concat: AstExprBinary_Op = AstExprBinary_Op::Concat;
49    pub const CompareNe: AstExprBinary_Op = AstExprBinary_Op::CompareNe;
50    pub const CompareEq: AstExprBinary_Op = AstExprBinary_Op::CompareEq;
51    pub const CompareLt: AstExprBinary_Op = AstExprBinary_Op::CompareLt;
52    pub const CompareLe: AstExprBinary_Op = AstExprBinary_Op::CompareLe;
53    pub const CompareGt: AstExprBinary_Op = AstExprBinary_Op::CompareGt;
54    pub const CompareGe: AstExprBinary_Op = AstExprBinary_Op::CompareGe;
55    pub const And: AstExprBinary_Op = AstExprBinary_Op::And;
56    pub const Or: AstExprBinary_Op = AstExprBinary_Op::Or;
57    pub const Op__Count: AstExprBinary_Op = AstExprBinary_Op::Op__Count;
58}
59
60pub type AstExprBinaryOp = AstExprBinary_Op;