private ParseTree parseImportSpecifier() {
    SourcePosition start = getTreeStartLocation();
    IdentifierToken importedName = eatIdOrKeywordAsId();
    IdentifierToken destinationName = null;
    if (peekPredefinedString(PredefinedName.AS)) {
      eatPredefinedString(PredefinedName.AS);
      destinationName = eatId();
    } else if (isKeyword(importedName.value)) {
      reportExpectedError(null, PredefinedName.AS);
    }
    return new ImportSpecifierTree(
        getTreeLocation(start), importedName, destinationName);
  }
private ParseTree parseImportSpecifier ( ) { SourcePosition start = getTreeStartLocation ( ) ; IdentifierToken importedName = eatIdOrKeywordAsId ( ) ; IdentifierToken destinationName = null ; if ( peekPredefinedString ( PredefinedName . AS ) ) { eatPredefinedString ( PredefinedName . AS ) ; destinationName = eatId ( ) ; } else if ( isKeyword ( importedName . value ) ) { reportExpectedError ( null , PredefinedName . AS ) ; } return new ImportSpecifierTree ( getTreeLocation ( start ) , importedName , destinationName ) ; }
ImportSpecifier ::= Identifier ('as' Identifier)?