gkz/grasp-squery — pull request #2 by monjudoh (2014-04-08 12:40:33+00:00)
Title: Exclude nodeValue instanceof RegExp.

```js:fuga.js
(function () {
var grasp = require('grasp');
var replacer = grasp.replace('squery', 'literal[val=hoge]', 'fuga');
console.log(replacer('var a = "hoge";').toString());// var a = fuga;
console.log(replacer('var a = "hoge";var b = /a/;').toString());// var a = fuga;var b = /a/;
})();
```

```sh
$ node fuga.js
var a = fuga;

/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:37
ref$ = syntaxFlat[ast.type], nodes = ref$.nodes, nodeArrays = ref$.nodeArr
^
TypeError: Cannot read property 'nodes' of undefined
at visitPre (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:37:46)
at new Cache (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:10:5)
at isMatchComplex (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/match.js:495:13)
at /Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/match.js:131:50
at visitPre (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:36:5)
at visitPre (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:46:9)
at visitPre (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:56:11)
at visitPre (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/common.js:56:11)
at matchAst (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/match.js:128:11)
at matchAst (/Users/monjudoh/temp/grasp/node_modules/grasp/node_modules/grasp-squery/lib/match.js:318:32)
```