on master help sign in
Fix port parser! Copy paste error on the operator.
bdeb36eEvan Czaplicki
compiler/Parse/Declaration.hs+3−3
@@ -63,6 +63,6 @@ port =
63 name <- lowVar
63 name <- lowVar
64 whitespace
64 whitespace
65 let port' op ctor expr = do { try op ; whitespace ; ctor name <$> expr }
65 let port' op ctor expr = do { try op ; whitespace ; ctor name <$> expr }
66− D.Port <$> choice [ port' hasType D.PortAnnotation Type.expr
66+ D.Port <$> choice [ port' hasType D.PortAnnotation Type.expr
67− , port' hasType D.SendDefinition Expr.expr
67+ , port' (string "<-") D.SendDefinition Expr.expr
68− , port' hasType D.SendDefinition Expr.expr ]
68+ , port' (string "->") D.RecvDefinition Expr.expr ]
compiler/SourceSyntax/Declaration.hs+1
@@ -25,6 +25,7 @@ data ParsePort
25 = PortAnnotation String T.Type
25 = PortAnnotation String T.Type
26 | SendDefinition String Expr.LParseExpr
26 | SendDefinition String Expr.LParseExpr
27 | RecvDefinition String Expr.LParseExpr
27 | RecvDefinition String Expr.LParseExpr
28+ deriving (Eq,Show)
28
29
29data Port
30data Port
30 = Send String Expr.LExpr T.Type
31 = Send String Expr.LExpr T.Type