Explorar o código

ignore phantomjs warnings in output, minor style change in exp-parser

Evan You %!s(int64=12) %!d(string=hai) anos
pai
achega
c56cbdcc39
Modificáronse 2 ficheiros con 13 adicións e 12 borrados
  1. 4 3
      Gruntfile.js
  2. 9 9
      src/exp-parser.js

+ 4 - 3
Gruntfile.js

@@ -1,5 +1,6 @@
-var fs   = require('fs'),
-    path = require('path')
+var fs     = require('fs'),
+    path   = require('path'),
+    stream = require('stream')
 
 module.exports = function( grunt ) {
 
@@ -119,7 +120,7 @@ module.exports = function( grunt ) {
             cmd: 'casperjs',
             args: ['test', '--concise', 'specs/'],
             opts: {
-                stdio: 'inherit',
+                stdio: ['ignore', process.stdout, 'ignore'],
                 cwd: path.resolve('test/functional')
             }
         }, function (err, res) {

+ 9 - 9
src/exp-parser.js

@@ -2,17 +2,17 @@
 
 var KEYWORDS =
         // keywords
-        'break,case,catch,continue,debugger,default,delete,do,else,false'
-        + ',finally,for,function,if,in,instanceof,new,null,return,switch,this'
-        + ',throw,true,try,typeof,var,void,while,with'
+        'break,case,catch,continue,debugger,default,delete,do,else,false' +
+        ',finally,for,function,if,in,instanceof,new,null,return,switch,this' +
+        ',throw,true,try,typeof,var,void,while,with,undefined' +
         // reserved
-        + ',abstract,boolean,byte,char,class,const,double,enum,export,extends'
-        + ',final,float,goto,implements,import,int,interface,long,native'
-        + ',package,private,protected,public,short,static,super,synchronized'
-        + ',throws,transient,volatile'
+        ',abstract,boolean,byte,char,class,const,double,enum,export,extends' +
+        ',final,float,goto,implements,import,int,interface,long,native' +
+        ',package,private,protected,public,short,static,super,synchronized' +
+        ',throws,transient,volatile' +
         // ECMA 5 - use strict
-        + ',arguments,let,yield'
-        + ',undefined',
+        ',arguments,let,yield',
+        
     KEYWORDS_RE = new RegExp(["\\b" + KEYWORDS.replace(/,/g, '\\b|\\b') + "\\b"].join('|'), 'g'),
     REMOVE_RE   = /\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,
     SPLIT_RE    = /[^\w$]+/g,