diff options
Diffstat (limited to 'src/synth/rel.rs')
-rw-r--r-- | src/synth/rel.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/synth/rel.rs b/src/synth/rel.rs index e3c4216..d2fbb70 100644 --- a/src/synth/rel.rs +++ b/src/synth/rel.rs @@ -11,6 +11,19 @@ pub enum RelOp { Less, } +impl RelOp { + pub fn to_param_string(&self) -> &'static str { + match *self { + RelOp::Greater => ">", + RelOp::GreaterEqual => ">=", + RelOp::Equal => "==", + RelOp::NotEqual => "!=", + RelOp::LessEqual => "<=", + RelOp::Less => "<", + } + } +} + /* TODO impl<T: PartialEq<isize>> From<T> for RelOp { fn from(i: T) -> RelOp { |