Small reordering of properties when creating |class| nodes

General rule: Least important things/flags go last.
redux
David Majda 12 years ago
parent 55a255a882
commit a59516f89b

@ -69,10 +69,10 @@ describe("PEG.js grammar parser", function() {
return oneRuleGrammar({ return oneRuleGrammar({
type: "class", type: "class",
inverted: inverted,
ignoreCase: ignoreCase,
parts: parts, parts: parts,
rawText: rawText rawText: rawText,
inverted: inverted,
ignoreCase: ignoreCase
}); });
} }

@ -1949,11 +1949,11 @@ PEG.parser = (function(){
return { return {
type: "class", type: "class",
inverted: inverted === "^",
ignoreCase: flags === "i",
parts: partsConverted, parts: partsConverted,
// FIXME: Get the raw text from the input directly. // 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]); })(pos0, result0[1], result0[2], result0[4]);
} }

@ -242,11 +242,11 @@ class "character class"
return { return {
type: "class", type: "class",
inverted: inverted === "^",
ignoreCase: flags === "i",
parts: partsConverted, parts: partsConverted,
// FIXME: Get the raw text from the input directly. // FIXME: Get the raw text from the input directly.
rawText: rawText rawText: rawText,
inverted: inverted === "^",
ignoreCase: flags === "i"
}; };
} }

Loading…
Cancel
Save