This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
forked from evilpie/jsctags
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
597d479
commit 385f0e9
Showing
9 changed files
with
51 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/usr/bin/env node | ||
//#!/usr/bin/env node | ||
var tags = require('../lib/jsctags/ctags').Tags, | ||
fs = require('fs'), | ||
util = require('util'), | ||
path = require('path'), | ||
argv = process.argv; | ||
|
||
var argv = process.argv; | ||
var path = require('path'); | ||
require.paths.unshift(path.join(path.dirname(argv[1]), "..", "lib", | ||
"jsctags")); | ||
|
||
var ctags = require('ctags'), fs = require('fs'), util = require('util'); | ||
|
||
var tags = new ctags.Tags(); | ||
var str = fs.readFileSync(argv[2]); | ||
tags.readString(str); | ||
|
||
var result = (argv.length >= 4) ? tags.stem(argv[3]) : tags.tags; | ||
util.puts(util.inspect(result)); | ||
tags = new tags(); | ||
|
||
fs.readFile(argv[2], 'utf-8', function (e, data) { | ||
if (e) throw e; | ||
//tags.readString(data); | ||
tags.scan(data, argv[2]); | ||
|
||
var result = (argv.length >= 4) ? tags.stem(argv[3]) : tags.tags; | ||
util.puts(util.inspect(result)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters