Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added link to if which points to the else if it has any (under this.ast)

  • Loading branch information...
commit ce6fe972642b21b7c2d1e38b1737f2a204e7fdb5 1 parent ee4c3c6
@qfox authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 ZeParser.js
View
4 ZeParser.js
@@ -1079,6 +1079,7 @@ ZeParser.prototype = {
// )
// statement
// [else statement]
+ var ifKeyword = match;
match = this.tokenizer.storeCurrentAndFetchNextToken(false, match, stack);
if (match.value != '(') match = this.failsafe('ExpectedStatementHeaderOpen', match);
if (this.ast) { //#ifdef FULL_AST
@@ -1104,6 +1105,9 @@ ZeParser.prototype = {
// match might be null here... (if the if-statement was end part of the source)
if (match && match.value == 'else') {
+ if (this.ast) { //#ifdef FULL_AST
+ ifKeyword.hasElse = match;
+ } //#endif
match = this.eatElse(match, stack);
}
Please sign in to comment.
Something went wrong with that request. Please try again.