Permalink
Browse files

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

  • Loading branch information...
1 parent ee4c3c6 commit ce6fe972642b21b7c2d1e38b1737f2a204e7fdb5 @qfox committed Oct 6, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 ZeParser.js
View
@@ -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);
}

0 comments on commit ce6fe97

Please sign in to comment.