feat(AST): Add Uninitialized and missing binary operators to common enums
Signed-off-by: erick-alcachofa <erick@artichoke.dev> This commit adds `Uninitialized` to several enums in `Common.hpp` to ensure they are properly initialized. It also adds missing binary operators like `BitAnd`, `BitXor`, `Adition`, and `Multiplication`. This change improves the robustness and functionality of the AST parser.
This commit is contained in:
parent
0e9995ce7e
commit
d979b10bee
@ -15,11 +15,13 @@ namespace arti::lang::ast {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum class Mutability {
|
enum class Mutability {
|
||||||
|
Uninitialized,
|
||||||
Mutable,
|
Mutable,
|
||||||
Constant,
|
Constant,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class TypeQualifier {
|
enum class TypeQualifier {
|
||||||
|
Uninitialized,
|
||||||
Pointer,
|
Pointer,
|
||||||
Slice,
|
Slice,
|
||||||
Mutable,
|
Mutable,
|
||||||
@ -27,6 +29,7 @@ namespace arti::lang::ast {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum class UnaryOperator {
|
enum class UnaryOperator {
|
||||||
|
Uninitialized,
|
||||||
Not,
|
Not,
|
||||||
Minus,
|
Minus,
|
||||||
BitNot,
|
BitNot,
|
||||||
@ -35,15 +38,29 @@ namespace arti::lang::ast {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum class BinaryOperator {
|
enum class BinaryOperator {
|
||||||
|
Uninitialized,
|
||||||
Equal,
|
Equal,
|
||||||
NotEqual,
|
NotEqual,
|
||||||
GreaterThan,
|
GreaterThan,
|
||||||
LessThan,
|
LessThan,
|
||||||
GreaterEqual,
|
GreaterEqual,
|
||||||
LessEqual,
|
LessEqual,
|
||||||
|
BitAnd,
|
||||||
|
BitXor,
|
||||||
|
BitOr,
|
||||||
|
LeftShift,
|
||||||
|
RightShift,
|
||||||
|
Adition,
|
||||||
|
Substraction,
|
||||||
|
Multiplication,
|
||||||
|
Division,
|
||||||
|
Modulo,
|
||||||
|
BoolAnd,
|
||||||
|
BoolOr,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class CompoundAssignOperator {
|
enum class CompoundAssignOperator {
|
||||||
|
Uninitialized,
|
||||||
Addition,
|
Addition,
|
||||||
Substraction,
|
Substraction,
|
||||||
Multiplication,
|
Multiplication,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user