-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support operator associativity #23
Conversation
@@ -3,7 +3,9 @@ | |||
use crate::descriptor::DescriptorManager; | |||
use crate::error::Error; | |||
use crate::function::InnerFunctionManager; | |||
use crate::operator::{BinOpType, BinaryOpFuncManager, PostfixOpFuncManager, UnaryOpFuncManager}; | |||
use crate::operator::{ | |||
BinaryOpConfig, BinaryOpFuncManager, BinaryOpType, PostfixOpFuncManager, UnaryOpFuncManager, |
Check warning
Code scanning / clippy
unused import: BinaryOpConfig Warning
BinOpType::CALC => BinaryOpFuncManager::new().get(&op)?(lhs.exec(ctx)?, rhs.exec(ctx)?), | ||
BinOpType::SETTER => { | ||
BinaryOpType::CALC => { | ||
BinaryOpFuncManager::new().get_handler(&op)?(lhs.exec(ctx)?, rhs.exec(ctx)?) |
Check warning
Code scanning / clippy
this expression creates a reference which is immediately dereferenced by the compiler Warning
let (a, b) = (lhs.exec(ctx)?, rhs.exec(ctx)?); | ||
ctx.set_variable( | ||
lhs.get_reference_name()?, | ||
BinaryOpFuncManager::new().get(&op)?(a, b)?, | ||
BinaryOpFuncManager::new().get_handler(&op)?(a, b)?, |
Check warning
Code scanning / clippy
this expression creates a reference which is immediately dereferenced by the compiler Warning
CALC, | ||
SETTER, | ||
} | ||
|
||
#[derive(Clone, PartialEq)] | ||
pub enum BinaryOpAssociativity { | ||
LEFT, |
Check warning
Code scanning / clippy
name LEFT contains a capitalized acronym Warning
#[derive(Clone, PartialEq)] | ||
pub enum BinaryOpAssociativity { | ||
LEFT, | ||
RIGHT, |
Check warning
Code scanning / clippy
name RIGHT contains a capitalized acronym Warning
No description provided.