+struct PrefixOperatorExpr\r
+{\r
+ PrefixOperatorType type;\r
+ std::shared_ptr<Expr> expr;\r
+};\r
+\r
+enum class PostfixOperatorType\r
+{\r
+ Increment, Decrement,\r
+ COUNT\r
+};\r
+static std::string PostfixOperatorTypeStrings[] =\r
+{\r
+ "++", "--" };\r
+\r
+struct PostfixOperatorExpr\r
+{\r
+ PostfixOperatorType type;\r
+ std::shared_ptr<Expr> expr;\r
+};\r
+\r
+enum class BinaryOperatorType\r
+{\r
+ Plus, Minus, Multiply, Divide, Modulo, BitwiseAnd, BitwiseOr, BitwiseXor, LessThan, GreaterThan,\r
+ LeftShift, RightShift, LogicalAnd, LogicalOr, Equals, NotEquals, LessThanEquals, GreaterThanEquals, BitwiseAndEquals, BitwiseOrEquals, BitwiseXorEquals,\r
+ PlusEquals, MinusEquals, MultiplyEquals, DivideEquals, ModuloEquals,\r
+ LeftShiftEquals, RightShiftEquals,\r
+ COUNT\r
+};\r
+static std::string BinaryOperatorTypeStrings[] =\r
+{\r
+ "+", "-", "*", "/", "%", "&", "|", "^", "<", ">",\r
+ "<<",">>","&&","||","==","!=","<=",">=","&=","|=","^=",\r
+ "+=","-=","*=","/=","%=",\r
+ "<<=",">>=" };\r
+\r
+struct BinaryOperatorExpr\r
+{\r
+ BinaryOperatorType type;\r
+ std::shared_ptr<Expr> lexpr;\r
+ std::shared_ptr<Expr> rexpr;\r
+};\r
+\r
+struct TernaryOperatorExpr\r
+{\r
+ std::shared_ptr<Expr> lexpr;\r
+ std::shared_ptr<Expr> rexprTrue;\r
+ std::shared_ptr<Expr> rexprFalse;\r
+};\r
+\r
+struct BracketsExpr\r
+{\r
+ std::shared_ptr<Expr> lexpr;\r
+ std::shared_ptr<Expr> rexpr;\r
+};\r
+\r
+struct IdentifierExpr\r
+{\r
+ std::vector<std::string> namespacePrefixes;\r
+ std::string identifier;\r
+};\r
+\r
+struct Expr\r
+{\r