Skip to content
Browse files

es.next.js: is, isnt で error を出さない程度に対応

  • Loading branch information...
1 parent 0b2b5c1 commit bf957db1e440446ed0e59146f61838f9e3f20cd3 @caisui committed Mar 8, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 plugin/es.next.js
View
15 plugin/es.next.js
@@ -1,6 +1,6 @@
// vim: set sw=4 ts=4 fdm=marker et :
var INFO = //{{{
-<plugin name="ES.next" version="0.0.2"
+<plugin name="ES.next" version="0.0.3"
href="http://github.com/caisui/vimperator/blob/master/plugin/es.next.js"
summary="ES.next"
xmlns="http://vimperator.org/namespaces/liberator">
@@ -291,7 +291,18 @@ var INFO = //{{{
break;
case "Assignment":
case "BinaryExpression":
- s = _compile(stmt.left) + " " + stmt.op + " " + _compile(stmt.right);
+ var op = stmt.op;
+
+ //xxx: 代替手段がわからない
+ switch (op) {
+ case "is":
+ op = "===";
+ break;
+ case "isnt":
+ op = "!==";
+ break;
+ }
+ s = _compile(stmt.left) + " " + op + " " + _compile(stmt.right);
//括弧付与
var pre = stack[stack.length -2];

0 comments on commit bf957db

Please sign in to comment.
Something went wrong with that request. Please try again.