Comparing version 0.0.2 to 0.0.3
@@ -33,3 +33,3 @@ #!/usr/bin/env node | ||
var json = require("../package.json"); | ||
util.puts(json.name + ' ' + json.version); | ||
console.log(json.name + ' ' + json.version); | ||
return; | ||
@@ -39,3 +39,3 @@ } | ||
if (argv._.length < 1) { | ||
util.puts('The input file is not specified.'); | ||
console.error('The input file is not specified.'); | ||
return; | ||
@@ -54,5 +54,5 @@ } | ||
fs.writeFileSync(argv.output, content); | ||
util.puts(util.format('%j cbml output complete.', filenames)); | ||
console.log(util.format('%j cbml output complete.', filenames)); | ||
} else { | ||
console.log(content); | ||
} |
{ | ||
"name": "cbml", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "CBML Parser", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/cbml/cbmljs", |
@@ -47,3 +47,4 @@ (function(exportName) { | ||
function tokenizer(code, options) { | ||
code = String(code); | ||
code = String(code).replace(/\r\n?|[\n\u2028\u2029]/g, '\n') | ||
.replace(/^\uFEFF/, ''); // 数据清洗 | ||
options = options || {}; | ||
@@ -99,4 +100,3 @@ /** | ||
var S = { // 扫描的信息 | ||
text: String(code).replace(/\r\n?|[\n\u2028\u2029]/g, '\n') | ||
.replace(/^\uFEFF/, ''), // 数据清洗 | ||
text: code, | ||
pos: 0 // 扫描位置 | ||
@@ -103,0 +103,0 @@ }; |