Browse Source

Small reordering of properties when creating |class| nodes

General rule: Least important things/flags go last.
redux
David Majda 10 years ago
parent
commit
a59516f89b
  1. 6
      spec/parser.spec.js
  2. 6
      src/parser.js
  3. 6
      src/parser.pegjs

6
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
});
}

6
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]);
}

6
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"
};
}

Loading…
Cancel
Save