Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the obsolete breathe keyword #480

Merged
merged 1 commit into from
Jun 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/back/CodeGen/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ translateDecl (name, expr) = do
instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
-- | Translate an expression into the corresponding C code
translate skip@(A.Skip {}) = namedTmpVar "skip" (A.getType skip) (AsExpr unit)
translate breathe@(A.Breathe {}) =
namedTmpVar "breathe"
(A.getType breathe)
(Call (Nam "call_respond_with_current_scheduler") ([] :: [CCode Expr]))

translate null@(A.Null {}) = namedTmpVar "literal" (A.getType null) Null
translate true@(A.BTrue {}) = namedTmpVar "literal" (A.getType true) (Embed "1/*True*/"::CCode Expr)
translate false@(A.BFalse {}) = namedTmpVar "literal" (A.getType false) (Embed "0/*False*/"::CCode Expr)
Expand Down
1 change: 0 additions & 1 deletion src/ir/AST/PrettyPrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ ppSugared e = case getSugared e of

ppExpr :: Expr -> Doc
ppExpr Skip {} = "()"
ppExpr Breathe {} = "breathe"
ppExpr MethodCall {target, name, args} =
maybeParens target <> "." <> ppName name <>
parens (commaSep (map ppExpr args))
Expand Down
5 changes: 0 additions & 5 deletions src/parser/Parser/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ lexer =
,"class"
,"def"
,"stream"
,"breathe"
,"int"
,"string"
,"char"
Expand Down Expand Up @@ -633,7 +632,6 @@ highOrderExpr = adtExpr

expr :: Parser Expr
expr = unit
<|> breathe
<|> try embed
<|> try path
<|> try functionCall
Expand Down Expand Up @@ -686,9 +684,6 @@ expr = unit
unit = do pos <- getPosition
reservedOp "()"
return $ Skip (meta pos)
breathe = do pos <- getPosition
reserved "breathe"
return $ Breathe (meta pos)
path = do pos <- getPosition
root <- parens expression <|> try functionCall <|> varAccess <|> stringLit
first <- pathComponent
Expand Down
10 changes: 0 additions & 10 deletions src/tests/encore/basic/breathe.enc

This file was deleted.

2 changes: 0 additions & 2 deletions src/tests/encore/basic/breathe.out

This file was deleted.

5 changes: 0 additions & 5 deletions src/types/Typechecker/Typechecker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,6 @@ instance Checkable Expr where
-- E |- () : void
doTypecheck skip@(Skip {}) = return $ setType voidType skip

--
-- ----------------
-- E |- breathe : void
doTypecheck breathe@(Breathe {}) = return $ setType voidType breathe

--- |- t
-- E |- body : t
-- ----------------------
Expand Down