Permalink
Browse files

Sync'd doctorjs with the latest narcissus.

1. Narcissus is now a git submodule.
2. The directory lib/jsctags/narcissus is gone.
3. The cfa2 files are in lib/cfa2.
4. Removed the files of my demo drjs website, unneeded.
5. Removed interp-old.js, it's been deprecated for a long time.
6. Fixed references to narcissus and jscfa modules in scripts.
7. Changed jscfa.js to use the latest Narcissus AST.
   - Nodes now have a .children property, they don't inherit from Array.
   - The 2nd arg of the Node constructor is now an object.
  • Loading branch information...
1 parent 8d294b4 commit 7d90e7b70a6fe0396d6517a355c3ed133b4ce3a7 @dimvar dimvar committed with dherman Jul 10, 2011
Showing 317 changed files with 203 additions and 3,067 deletions.
View
@@ -0,0 +1,3 @@
+[submodule "narcissus"]
+ path = narcissus
+ url = git@github.com:mozilla/narcissus.git
View
@@ -57,7 +57,7 @@ The directory structure mostly follows the CommonJS packaging scheme:
* `js/`: support files for the HTML demos
* `lib/`: CommonJS-compliant library files
* `lib/ctags/`: the core jsctags code
-* `lib/narcissus/`: the Narcissus engine
+* `narcissus/`: the Narcissus engine
* `test/`: test cases for the indexer
[1]: http://en.wikipedia.org/wiki/Ctags
View
@@ -46,8 +46,8 @@ require.paths.unshift(path.join(libdir, "jsctags"));
var sys = require('sys');
var _ = require('underscore')._;
-var getTags = require('narcissus/jscfa').getTags;
-var parse = require('narcissus/jsparse').parse;
+var getTags = require('../lib/cfa2/jscfa').getTags;
+var parse = require('../narcissus/lib/parser').parse;
var stdin = process.openStdin();
View
@@ -50,8 +50,6 @@ function parse() {
var jsdefs = require('narcissus:jsdefs');
var tokenIds = jsdefs.tokenIds;
- var cfa2 = require('narcissus').cfa2;
-
var astToJSON = function(ast) {
var desc;
if (ast.type in jsdefs.tokens) {
@@ -108,12 +106,6 @@ function parse() {
};
var ast = parse($('#js').val(), 'js', 1);
- // myast = ast;
- //var ast = fixAst(parse($('#js').val(), 'js', 1));
- //var ast = labelAst(fixAst(parse($('#js').val(), 'js', 1)));
- //var ast = tagVarRefsAst(labelAst(fixAst(parse($('#js').val(),'js',1))));
- //cfa2(ast);
- //console.log("adfafasf");
$('#tree').tree({
data: {
@@ -4,7 +4,7 @@
var print = console.log,
readFileSync = require('fs').readFileSync,
spawn = require('child_process').spawn,
- parse = require('./jsparse').parse,
+ parse = require('../../narcissus/lib/parser').parse,
getTags = require('./jscfa').getTags;
var arg = process.argv[2], files = [], done = false;
File renamed without changes.
@@ -4,7 +4,7 @@
var print = console.log,
readFileSync = require('fs').readFileSync,
spawn = require('child_process').spawn,
-parse = require('./jsparse').parse,
+parse = require('../../narcissus/lib/parser').parse,
classify_events = require('./jscfa').classify_events;
var addon = process.argv[2];
File renamed without changes.
Oops, something went wrong.

0 comments on commit 7d90e7b

Please sign in to comment.