mirror of
https://github.com/github/semantic.git
synced 2024-12-18 20:31:55 +03:00
Conditionally match against Indexed nodes when applying toTermName for Import Syntax
This commit is contained in:
parent
dfc11385d8
commit
36eb60d05d
@ -219,7 +219,9 @@ toTermName source term = case unwrap term of
|
||||
S.Commented _ _ -> termNameFromChildren term (toList $ unwrap term)
|
||||
S.Module identifier _ -> toTermName' identifier
|
||||
S.Import identifier [] -> toTermName' identifier
|
||||
S.Import identifier expr -> intercalate ", " (termNameFromSource <$> expr) <> " from " <> toTermName' identifier
|
||||
S.Import identifier exprs'@(expr:exprs)-> case unwrap expr of
|
||||
S.Indexed _ -> intercalate ", " (termNameFromSource <$> exprs) <> "from " <> toTermName' identifier
|
||||
_ -> intercalate ", " (termNameFromSource <$> exprs') <> "from " <> toTermName' identifier
|
||||
S.Export Nothing expr -> "{ " <> intercalate ", " (termNameFromSource <$> expr) <> " }"
|
||||
S.Export (Just identifier) [] -> "{ " <> toTermName' identifier <> " }"
|
||||
S.Export (Just identifier) expr -> "{ " <> intercalate ", " (termNameFromSource <$> expr) <> " }" <> " from " <> toTermName' identifier
|
||||
|
Loading…
Reference in New Issue
Block a user