From 98cbd57eada7de9dd4ba7c2cdb0c65b8ce867987 Mon Sep 17 00:00:00 2001 From: David Majda Date: Tue, 25 Jan 2011 11:21:47 +0100 Subject: [PATCH] Add two missing |var|s (fix global namespace pollution) --- src/parser.js | 4 ++-- src/parser.pegjs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser.js b/src/parser.js index 8d8eb3b..4a4c56c 100644 --- a/src/parser.js +++ b/src/parser.js @@ -2247,8 +2247,8 @@ PEG.parser = (function(){ } var result0 = result1 !== null ? (function(inverted, parts) { - partsConverted = map(parts, function(part) { return part.data; }); - rawText = "[" + var partsConverted = map(parts, function(part) { return part.data; }); + var rawText = "[" + inverted + map(parts, function(part) { return part.rawText; }).join("") + "]"; diff --git a/src/parser.pegjs b/src/parser.pegjs index 2c4ea12..97b772f 100644 --- a/src/parser.pegjs +++ b/src/parser.pegjs @@ -232,8 +232,8 @@ simpleSingleQuotedCharacter class "character class" = "[" inverted:"^"? parts:(classCharacterRange / classCharacter)* "]" __ { - partsConverted = map(parts, function(part) { return part.data; }); - rawText = "[" + var partsConverted = map(parts, function(part) { return part.data; }); + var rawText = "[" + inverted + map(parts, function(part) { return part.rawText; }).join("") + "]";