Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Feb 6, 2017
1 parent a858fba commit 9f09898
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/parser/sequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ function defaultSequence(scope) {

default:
child = this.Number();
break;
}

break;
Expand Down
8 changes: 3 additions & 5 deletions lib/parser/type/Raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ module.exports = function Raw(balanced, endTokenType1, endTokenType2) {
if (balanced) {
scan:
for (; !this.scanner.eof; this.scanner.next()) {
if (stack.length === 0) {
if (popType === 0) {
if (this.scanner.tokenType === endTokenType1 ||
this.scanner.tokenType === endTokenType2) {
if (stack.length === 0) {
break scan;
}
break scan;
}
}

Expand All @@ -33,7 +31,7 @@ module.exports = function Raw(balanced, endTokenType1, endTokenType2) {
case RIGHTPARENTHESIS:
case RIGHTCURLYBRACKET:
case RIGHTSQUAREBRACKET:
if (stack.length !== 0) {
if (popType !== 0) {
this.scanner.error();
}
break scan;
Expand Down
2 changes: 1 addition & 1 deletion lib/parser/type/Type.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var ASTERISK = TYPE.Asterisk;
var VERTICALLINE = TYPE.VerticalLine;

// ident or ident|ident or *|ident or |ident
module.exports = function TypeOrUniversal() {
module.exports = function Type() {
var start = this.scanner.tokenStart;

switch (this.scanner.tokenType) {
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ List.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) {
var cursor = this.cursor;

while (cursor !== null) {
if (prevNew === true || cursor.prev === prevOld) {
if (cursor.prev === prevOld) {
cursor.prev = prevNew;
}

if (nextNew === true || cursor.next === nextOld) {
if (cursor.next === nextOld) {
cursor.next = nextNew;
}

Expand Down

0 comments on commit 9f09898

Please sign in to comment.