File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
test/cases/parsing/issue-4709 Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -637,10 +637,12 @@ class Parser extends Tapable {
637637
638638 walkFunctionDeclaration ( statement ) {
639639 this . inScope ( statement . params , function ( ) {
640- if ( statement . body . type === "BlockStatement" )
640+ if ( statement . body . type === "BlockStatement" ) {
641+ this . prewalkStatement ( statement . body ) ;
641642 this . walkStatement ( statement . body ) ;
642- else
643+ } else {
643644 this . walkExpression ( statement . body ) ;
645+ }
644646 } . bind ( this ) ) ;
645647 }
646648
Original file line number Diff line number Diff line change 1+ function getDirectiveRequire ( directive ) {
2+ var require = directive . require || ( directive . controller && directive . name ) ;
3+
4+ if ( ! isArray ( require ) && isObject ( require ) ) {
5+ forEach ( require , function ( value , key ) {
6+ var match = value . match ( REQUIRE_PREFIX_REGEXP ) ;
7+ var name = value . substring ( match [ 0 ] . length ) ;
8+ if ( ! name ) require [ key ] = match [ 0 ] + key ;
9+ } ) ;
10+ }
11+
12+ return require ;
13+ }
14+
15+ it ( "should parse these snippets successfully" , function ( ) {
16+
17+ } ) ;
You can’t perform that action at this time.
0 commit comments