Skip to content

Commit

Permalink
perf: move more common/valid cases first
Browse files Browse the repository at this point in the history
  • Loading branch information
lddubeau committed Jun 25, 2019
1 parent 6c484f3 commit a65586e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/saxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1597,17 +1597,17 @@ class SaxesParser {
if (isS(c)) {
this.state = S_ATTRIB;
}
else if (isNameStartChar(c)) {
this.fail("no whitespace between attributes.");
this.name = String.fromCodePoint(c);
this.state = S_ATTRIB_NAME;
}
else if (c === GREATER) {
this.openTag();
}
else if (c === FORWARD_SLASH) {
this.state = S_OPEN_TAG_SLASH;
}
else if (isNameStartChar(c)) {
this.fail("no whitespace between attributes.");
this.name = String.fromCodePoint(c);
this.state = S_ATTRIB_NAME;
}
else {
this.fail("disallowed character in attribute name.");
}
Expand Down

0 comments on commit a65586e

Please sign in to comment.