Style fixes.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5fb64e12e1
commit
bfb47d9b5f
|
@ -21,20 +21,20 @@ namespace MalachScript {
|
|||
};
|
||||
|
||||
enum class LogicOperator : uint8_t {
|
||||
LogicalAnd, // &&, and
|
||||
LogicalOr, // ||, or
|
||||
LogicalXor, // ^^, xor
|
||||
LogicalAnd, // &&, and
|
||||
LogicalOr, // ||, or
|
||||
LogicalXor, // ^^, xor
|
||||
};
|
||||
|
||||
enum class ComparisonOperator : uint8_t {
|
||||
Equality, // ==
|
||||
Inequality, // !=
|
||||
LessThan, // <
|
||||
LessThanEquals, // <=
|
||||
GreaterThan, // >
|
||||
GreaterThanEquals, // >=
|
||||
Identity, // is
|
||||
InverseIdentity, // !is
|
||||
Equality, // ==
|
||||
Inequality, // !=
|
||||
LessThan, // <
|
||||
LessThanEquals, // <=
|
||||
GreaterThan, // >
|
||||
GreaterThanEquals, // >=
|
||||
Identity, // is
|
||||
InverseIdentity, // !is
|
||||
};
|
||||
|
||||
enum class MathOperator : uint8_t {
|
||||
|
@ -55,15 +55,7 @@ namespace MalachScript {
|
|||
ArithmeticRightShift,
|
||||
};
|
||||
|
||||
enum class PreOperator : uint8_t {
|
||||
Negation,
|
||||
Identity,
|
||||
Inversion,
|
||||
Increment,
|
||||
Decrement,
|
||||
BitwiseComplement,
|
||||
Handle
|
||||
};
|
||||
enum class PreOperator : uint8_t { Negation, Identity, Inversion, Increment, Decrement, BitwiseComplement, Handle };
|
||||
}
|
||||
|
||||
#endif // MALACHSCRIPT_OPERATORS_HPP
|
||||
|
|
|
@ -867,7 +867,7 @@ namespace MalachScript::Parser {
|
|||
return true;
|
||||
}
|
||||
bool Parser::ParseExprStat(const ParsedStatement*& out, const LexToken*& currentToken) {
|
||||
if (!ParseAssign(out, currentToken)){
|
||||
if (!ParseAssign(out, currentToken)) {
|
||||
return false;
|
||||
}
|
||||
EXPECT_TOKEN(currentToken, SemicolonSymbol);
|
||||
|
|
|
@ -319,11 +319,12 @@ namespace MalachScript::Parser {
|
|||
: ParsedStatementImpl(span), _literalValue(literalValue) {}
|
||||
|
||||
[[nodiscard]] inline const T& GetLiteralValue() const noexcept { return _literalValue; }
|
||||
|
||||
private:
|
||||
T _literalValue;
|
||||
};
|
||||
|
||||
class ParsedReturnStatement : public ParsedStatementImpl<ParsedStatementKind::Return>{
|
||||
class ParsedReturnStatement : public ParsedStatementImpl<ParsedStatementKind::Return> {
|
||||
public:
|
||||
ParsedReturnStatement(const TextSpan& span, const ParsedStatement* statement)
|
||||
: ParsedStatementImpl(span), _statement(statement) {}
|
||||
|
@ -332,16 +333,16 @@ namespace MalachScript::Parser {
|
|||
std::unique_ptr<const ParsedStatement> _statement;
|
||||
};
|
||||
|
||||
class ParsedVarAccessStatement : public ParsedStatementImpl<ParsedStatementKind::VarAccess>{
|
||||
class ParsedVarAccessStatement : public ParsedStatementImpl<ParsedStatementKind::VarAccess> {
|
||||
public:
|
||||
ParsedVarAccessStatement(const TextSpan& span, std::vector<Identifier> scope)
|
||||
ParsedVarAccessStatement(const TextSpan& span, std::vector<Identifier> scope)
|
||||
: ParsedStatementImpl(span), _scope(std::move(scope)) {}
|
||||
|
||||
private:
|
||||
std::vector<Identifier> _scope;
|
||||
};
|
||||
|
||||
class ParsedIncrementStatement : public ParsedStatementImpl<ParsedStatementKind::Increment>{
|
||||
class ParsedIncrementStatement : public ParsedStatementImpl<ParsedStatementKind::Increment> {
|
||||
public:
|
||||
ParsedIncrementStatement(const TextSpan& span, const ParsedStatement* statement)
|
||||
: ParsedStatementImpl(span), _statement(statement) {}
|
||||
|
@ -350,7 +351,7 @@ namespace MalachScript::Parser {
|
|||
std::unique_ptr<const ParsedStatement> _statement;
|
||||
};
|
||||
|
||||
class ParsedDecrementStatement : public ParsedStatementImpl<ParsedStatementKind::Decrement>{
|
||||
class ParsedDecrementStatement : public ParsedStatementImpl<ParsedStatementKind::Decrement> {
|
||||
public:
|
||||
ParsedDecrementStatement(const TextSpan& span, const ParsedStatement* statement)
|
||||
: ParsedStatementImpl(span), _statement(statement) {}
|
||||
|
|
Loading…
Reference in New Issue