From b923af743e556aa62d79497e9a490ff78dca6ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvar=20Hyv=C3=B6nen?= Date: Fri, 3 Jan 2020 10:21:18 +0200 Subject: [PATCH] Added import related syntax. --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c830ed2..27214f5 100644 --- a/README.md +++ b/README.md @@ -989,11 +989,22 @@ sample output shows inconsistent naming convention: 3 err 8 ex -## statement (Statement) +## import-dec (ImportDeclaration) -## dec (Declaration) +Test match the source of an import declaration and then select the provided specifier. + + # import { logger } from 'common/util/logger' + grasp 'import-dec[source.value~=/util/] > import-specifier[local=#logger]' + +## import-specifier (ImportSpecifier) +## import-default-specifier (ImportDefaultSpecifier) +## import-namespace-specifier (ImportNamespaceSpecifier) + +## statement (Statement) + +## dec (Declaration) ## exp (Expression)