diff --git a/doc/concept.sh b/doc/concept.sh index 35d11cc..026560f 100644 --- a/doc/concept.sh +++ b/doc/concept.sh @@ -107,14 +107,10 @@ if|ifl $1 # same as `$1 == true` !$1 # same as `$1 != true` -# loosely typed compare +# strongly typed compare $1 == $2 $1 != $2 -# strongly typed compare -$1 === $2 -$1 !== $2 - # numerical / alphabetical compare $1 < $2 $1 <= $2 diff --git a/src/lexer.js b/src/lexer.js index a4efd78..4455aea 100644 --- a/src/lexer.js +++ b/src/lexer.js @@ -78,15 +78,13 @@ class Juicescript_lexer { // OPERATORS // case "!": - if (!this.match("=")) this.token_add({type: Juicescript.token_type.NOT}); - else if (!this.match("=")) this.token_add({type: Juicescript.token_type.NOT_EQUAL}); - else this.token_add({type: Juicescript.token_type.STRICT_NOT_EQUAL}); + if (this.match("=")) this.token_add({type: Juicescript.token_type.NOT_EQUAL}); + else this.token_add({type: Juicescript.token_type.NOT}); break; case "=": - if (!this.match("=")) this.token_add({type: Juicescript.token_type.EQUAL}); - else if (!this.match("=")) this.token_add({type: Juicescript.token_type.EQUAL}); - else this.token_add({type: Juicescript.token_type.STRICT_EQUAL}); + if (this.match("=")) this.token_add({type: Juicescript.token_type.EQUAL}); + else this.warning("unexpected character '" + char + "'"); break; case "<": diff --git a/src/main.js b/src/main.js index 47fb636..9b9cfdf 100644 --- a/src/main.js +++ b/src/main.js @@ -15,7 +15,6 @@ class Juicescript { // operators "NOT", "EQUAL", "NOT_EQUAL", - "STRICT_EQUAL", "STRICT_NOT_EQUAL", "GREATER", "GREATER_EQUAL", "LESS", "LESS_EQUAL",