From a59516f89bc8216e460ee319e1874145ae1df5a4 Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 7 May 2012 10:08:24 +0200 Subject: [PATCH] Small reordering of properties when creating |class| nodes General rule: Least important things/flags go last. --- spec/parser.spec.js | 6 +++--- src/parser.js | 6 +++--- src/parser.pegjs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/parser.spec.js b/spec/parser.spec.js index a07ba43..1d8ebca 100644 --- a/spec/parser.spec.js +++ b/spec/parser.spec.js @@ -69,10 +69,10 @@ describe("PEG.js grammar parser", function() { return oneRuleGrammar({ type: "class", - inverted: inverted, - ignoreCase: ignoreCase, parts: parts, - rawText: rawText + rawText: rawText, + inverted: inverted, + ignoreCase: ignoreCase }); } diff --git a/src/parser.js b/src/parser.js index c2cdbcd..b87aab8 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1949,11 +1949,11 @@ PEG.parser = (function(){ return { type: "class", - inverted: inverted === "^", - ignoreCase: flags === "i", parts: partsConverted, // FIXME: Get the raw text from the input directly. - rawText: rawText + rawText: rawText, + inverted: inverted === "^", + ignoreCase: flags === "i" }; })(pos0, result0[1], result0[2], result0[4]); } diff --git a/src/parser.pegjs b/src/parser.pegjs index c9c44b5..a0958a9 100644 --- a/src/parser.pegjs +++ b/src/parser.pegjs @@ -242,11 +242,11 @@ class "character class" return { type: "class", - inverted: inverted === "^", - ignoreCase: flags === "i", parts: partsConverted, // FIXME: Get the raw text from the input directly. - rawText: rawText + rawText: rawText, + inverted: inverted === "^", + ignoreCase: flags === "i" }; }