code: private IfStatement parseIfStatement(Token token) throws IOException {
          SourceInfo info = token.getSourceInfo();
  
          Expression condition = parseExpression();
  
          if (!(condition instanceof ParenExpression)) {
              error("if.condition", condition.getSourceInfo());
          }
  
          Block thenPart = parseBlock();
          Block elsePart = null;
  
          token = peek();
          if (token.getID() != Token.ELSE) {
              info = info.setEndPosition(thenPart.getSourceInfo());
          }
          else {
              read(); // read the else keyword
              token = peek();
              if (token.getID() == Token.IF) {
                  elsePart = new Block(parseIfStatement(read()));
              }
              else {
                  elsePart = parseBlock();
              }
  
              info = info.setEndPosition(elsePart.getSourceInfo());
          }
  
          return new IfStatement(info, condition, thenPart, elsePart);
      }
docs: When this is called, the keyword "if" has already been read.