From 998ff2c85fc8b29bff3318bc906bd75c11b0b2e7 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Wed, 27 Feb 2019 12:06:43 +0100 Subject: [PATCH] drop un-used empty array ImportDeclaration>specifiers Signed-off-by: Alexander Bezzubov --- driver/normalizer/normalizer.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/driver/normalizer/normalizer.go b/driver/normalizer/normalizer.go index 5e6b062..f35f90f 100644 --- a/driver/normalizer/normalizer.go +++ b/driver/normalizer/normalizer.go @@ -153,9 +153,10 @@ var Normalizers = []Mapping{ }, )), MapSemantic("ImportDeclaration", uast.Import{}, MapObj( - Obj{ - "source": Var("path"), - "specifiers": Arr(), + Fields{ + {Name: "source", Op: Var("path")}, + // empty un-used array + {Name: "specifiers", Drop: true, Op: Arr()}, }, Obj{ "Path": Var("path"),