* Processes the provided declaration. * @param {Declaration} declaration declaration * @param {OnIdent} onIdent on ident callback
(declaration, onIdent)
| 2929 | * @param {OnIdent} onIdent on ident callback |
| 2930 | */ |
| 2931 | enterDeclaration(declaration, onIdent) { |
| 2932 | switch (declaration.type) { |
| 2933 | case "VariableDeclaration": |
| 2934 | for (const declarator of declaration.declarations) { |
| 2935 | switch (declarator.type) { |
| 2936 | case "VariableDeclarator": { |
| 2937 | this.enterPattern(declarator.id, onIdent); |
| 2938 | break; |
| 2939 | } |
| 2940 | } |
| 2941 | } |
| 2942 | break; |
| 2943 | case "FunctionDeclaration": |
| 2944 | this.enterPattern(declaration.id, onIdent); |
| 2945 | break; |
| 2946 | case "ClassDeclaration": |
| 2947 | this.enterPattern(declaration.id, onIdent); |
| 2948 | break; |
| 2949 | } |
| 2950 | } |
| 2951 | |
| 2952 | /** |
| 2953 | * Module pre walk export named declaration. |
no test coverage detected