diff --git a/acorn.js b/acorn.js index 510cc45a70..e83706b5f0 100644 --- a/acorn.js +++ b/acorn.js @@ -422,17 +422,17 @@ // Test whether a given character code starts an identifier. - function isIdentifierStart(code) { + var isIdentifierStart = exports.isIdentifierStart = function(code) { if (code < 65) return code === 36; if (code < 91) return true; if (code < 97) return code === 95; if (code < 123)return true; return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } + }; // Test whether a given character is part of an identifier. - function isIdentifierChar(code) { + var isIdentifierChar = exports.isIdentifierChar = function(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; @@ -440,7 +440,7 @@ if (code < 97) return code === 95; if (code < 123)return true; return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } + }; // ## Tokenizer diff --git a/index.html b/index.html index ade82c8ec3..9686e03470 100644 --- a/index.html +++ b/index.html @@ -252,13 +252,13 @@ code point above 128.
Whether a single character denotes a newline.
var newline = /[\n\r\u2028\u2029]/;Matches a whole line break (where CRLF is considered a single -line break). Used to count lines.
var lineBreak = /\r\n|[\n\r\u2028\u2029]/g;Test whether a given character code starts an identifier.
function isIdentifierStart(code) {
+line break). Used to count lines. var lineBreak = /\r\n|[\n\r\u2028\u2029]/g;Test whether a given character code starts an identifier.
var isIdentifierStart = exports.isIdentifierStart = function(code) {
if (code < 65) return code === 36;
if (code < 91) return true;
if (code < 97) return code === 95;
if (code < 123)return true;
return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
- }Test whether a given character is part of an identifier.
function isIdentifierChar(code) {
+ };Test whether a given character is part of an identifier.
var isIdentifierChar = exports.isIdentifierChar = function(code) {
if (code < 48) return code === 36;
if (code < 58) return true;
if (code < 65) return false;
@@ -266,7 +266,7 @@ line break). Used to count lines. These are used when options.locations is on, for the
+ };
These are used when options.locations is on, for the
tokStartLoc and tokEndLoc properties.
function line_loc_t() {
this.line = tokCurLine;
this.column = tokPos - tokLineStart;