private ParseTree parseFunctionDeclaration ( ) { SourcePosition start = getTreeStartLocation ( ) ; eat ( Keywords . FUNCTION . type ) ; boolean isGenerator = eatOpt ( TokenType . STAR ) != null ; FunctionDeclarationTree . Builder builder = FunctionDeclarationTree . builder ( FunctionDeclarationTree . Kind . DECLARATION ) . setName ( eatId ( ) ) ; parseFunctionTail ( builder , isGenerator ? FunctionFlavor . GENERATOR : FunctionFlavor . NORMAL ) ; return builder . build ( getTreeLocation ( start ) ) ; }
13 Function Definition