From fce6296369c61c43450d29d15eed9086e78666f6 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Tue, 7 Nov 2017 15:48:41 -0800 Subject: [PATCH] Assign type alias statements --- src/Language/Go/Assignment.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Language/Go/Assignment.hs b/src/Language/Go/Assignment.hs index adbfe6f3c..ae12b98f9 100644 --- a/src/Language/Go/Assignment.hs +++ b/src/Language/Go/Assignment.hs @@ -84,6 +84,7 @@ type Syntax = , Syntax.Empty , Syntax.Identifier , Syntax.Program + , Type.Alias , Type.Annotation , Type.Array , Type.BiDirectionalChannel @@ -323,6 +324,9 @@ sliceTypeDeclaration = makeTerm <$> symbol TypeSpec <*> children (Type.Annotatio pointerTypeDeclaration :: Assignment pointerTypeDeclaration = makeTerm <$> symbol TypeSpec <*> children (Type.Annotation <$> typeIdentifier <*> pointerType) +typeAlias :: Assignment +typeAlias = makeTerm <$> symbol TypeAlias <*> children (Type.Alias <$> expression <*> expression) + typeIdentifierDeclaration :: Assignment typeIdentifierDeclaration = makeTerm <$> symbol TypeSpec <*> children (Type.Annotation <$> typeIdentifier <*> expression) @@ -336,6 +340,7 @@ typeDeclaration = handleError $ makeTerm <$> symbol TypeDeclaration <*> children <|> sliceTypeDeclaration <|> structTypeDeclaration <|> mapTypeDeclaration + <|> typeAlias <|> typeIdentifierDeclaration ))