mirror of
https://github.com/github/semantic.git
synced 2024-12-30 02:14:20 +03:00
Treat ts internal modules as namespaces as well
This commit is contained in:
parent
df48086911
commit
18b5e1b7e6
@ -131,7 +131,6 @@ type Syntax = '[
|
||||
, TypeScript.Syntax.ImportAlias
|
||||
, TypeScript.Syntax.Debugger
|
||||
, TypeScript.Syntax.ShorthandPropertyIdentifier
|
||||
, TypeScript.Syntax.InternalModule
|
||||
, TypeScript.Syntax.Super
|
||||
, TypeScript.Syntax.Undefined
|
||||
, TypeScript.Syntax.ClassHeritage
|
||||
@ -759,7 +758,7 @@ optionalParameter = makeOptionalParam <$> symbol Grammar.OptionalParameter <*> c
|
||||
where makeOptionalParam loc (modifier, readonly, subject, annotation, initializer) = makeTerm loc (TypeScript.Syntax.OptionalParameter [modifier, readonly, annotation] (makeTerm loc (Statement.Assignment [] subject initializer)))
|
||||
|
||||
internalModule :: Assignment
|
||||
internalModule = makeTerm <$> symbol Grammar.InternalModule <*> children (TypeScript.Syntax.InternalModule <$> term (string <|> identifier <|> nestedIdentifier) <*> statements)
|
||||
internalModule = makeTerm <$> symbol Grammar.InternalModule <*> children (Declaration.Namespace <$> term (string <|> identifier <|> nestedIdentifier) <*> statements)
|
||||
|
||||
module' :: Assignment
|
||||
module' = makeTerm <$> symbol Module <*> children (Declaration.Namespace <$> term (string <|> identifier <|> nestedIdentifier) <*> (statements <|> pure []))
|
||||
|
Loading…
Reference in New Issue
Block a user