Unverified Commit 6d2bed05 authored by Evan W. Patton's avatar Evan W. Patton Committed by GitHub

Fix text not equals semantics (#2383)

Change-Id: I5d7de7966f27b5ae64ea38662daa00ea12ab519e
parent f4309793
...@@ -92,6 +92,9 @@ Blockly.Yail['text_compare'] = function() { ...@@ -92,6 +92,9 @@ Blockly.Yail['text_compare'] = function() {
+ Blockly.Yail.YAIL_CLOSE_COMBINATION + Blockly.Yail.YAIL_SPACER; + Blockly.Yail.YAIL_CLOSE_COMBINATION + Blockly.Yail.YAIL_SPACER;
code = code + Blockly.Yail.YAIL_DOUBLE_QUOTE + operator2 code = code + Blockly.Yail.YAIL_DOUBLE_QUOTE + operator2
+ Blockly.Yail.YAIL_DOUBLE_QUOTE + Blockly.Yail.YAIL_CLOSE_COMBINATION; + Blockly.Yail.YAIL_DOUBLE_QUOTE + Blockly.Yail.YAIL_CLOSE_COMBINATION;
if (mode == 'NEQ') {
code = '(not ' + code + ')';
}
return [ code, Blockly.Yail.ORDER_ATOMIC ]; return [ code, Blockly.Yail.ORDER_ATOMIC ];
}; };
...@@ -99,7 +102,7 @@ Blockly.Yail['text_compare'].OPERATORS = { ...@@ -99,7 +102,7 @@ Blockly.Yail['text_compare'].OPERATORS = {
LT: ['string<?', 'text<', Blockly.Yail.ORDER_NONE], LT: ['string<?', 'text<', Blockly.Yail.ORDER_NONE],
GT: ['string>?', 'text>', Blockly.Yail.ORDER_NONE], GT: ['string>?', 'text>', Blockly.Yail.ORDER_NONE],
EQUAL: ['string=?', 'text=', Blockly.Yail.ORDER_NONE], EQUAL: ['string=?', 'text=', Blockly.Yail.ORDER_NONE],
NEQ: ['yail-not-equal?', 'not =', Blockly.Yail.ORDER_NONE] NEQ: ['string=?', 'not =', Blockly.Yail.ORDER_NONE]
}; };
Blockly.Yail['text_trim'] = function() { Blockly.Yail['text_trim'] = function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment