@@ -8,7 +8,7 @@ const std::array<Operation::Type, 33> Operation::Types = {
88 Operation::Type::DIV, Operation::Type::DIF, Operation::Type::MOD,
99 Operation::Type::POW, Operation::Type::GCD, Operation::Type::LEX,
1010 Operation::Type::BIN, Operation::Type::LOG, Operation::Type::NRT,
11- Operation::Type::DIS , Operation::Type::DIR , Operation::Type::EQU,
11+ Operation::Type::DGS , Operation::Type::DGR , Operation::Type::EQU,
1212 Operation::Type::NEQ, Operation::Type::LEQ, Operation::Type::GEQ,
1313 Operation::Type::MIN, Operation::Type::MAX, Operation::Type::BAN,
1414 Operation::Type::BOR, Operation::Type::BXO, Operation::Type::LPB,
@@ -47,10 +47,10 @@ const Operation::Metadata& Operation::Metadata::get(Type t) {
4747 Operation::Type::LOG, " log" , 2 , true , true , true };
4848 static Operation::Metadata nrt{
4949 Operation::Type::NRT, " nrt" , 2 , true , true , true };
50- static Operation::Metadata dis {
51- Operation::Type::DIS , " dis " , 2 , true , true , true };
52- static Operation::Metadata dir {
53- Operation::Type::DIR , " dir " , 2 , true , true , true };
50+ static Operation::Metadata dgs {
51+ Operation::Type::DGS , " dgs " , 2 , true , true , true };
52+ static Operation::Metadata dgr {
53+ Operation::Type::DGR , " dgr " , 2 , true , true , true };
5454 static Operation::Metadata equ{
5555 Operation::Type::EQU, " equ" , 2 , true , true , true };
5656 static Operation::Metadata neq{
@@ -114,10 +114,10 @@ const Operation::Metadata& Operation::Metadata::get(Type t) {
114114 return log;
115115 case Operation::Type::NRT:
116116 return nrt;
117- case Operation::Type::DIS :
118- return dis ;
119- case Operation::Type::DIR :
120- return dir ;
117+ case Operation::Type::DGS :
118+ return dgs ;
119+ case Operation::Type::DGR :
120+ return dgr ;
121121 case Operation::Type::EQU:
122122 return equ;
123123 case Operation::Type::NEQ:
@@ -163,9 +163,16 @@ const Operation::Metadata& Operation::Metadata::get(const std::string& name) {
163163 return m;
164164 }
165165 }
166- if (name == " cmp" ) { // backwards compatibility
166+ // for backwards compatibility
167+ if (name == " cmp" ) {
167168 return get (Operation::Type::EQU);
168169 }
170+ if (name == " dis" ) {
171+ return get (Operation::Type::DGS);
172+ }
173+ if (name == " dir" ) {
174+ return get (Operation::Type::DGR);
175+ }
169176 throw std::runtime_error (" invalid operation: " + name);
170177}
171178
0 commit comments