Commit df6226ee authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏢
Browse files

Added FailExpr node

parent f624ba81
...@@ -1696,6 +1696,8 @@ convertRootExpr aliasDummyId (Case kees=:{case_expr, case_guards}) main_dcl_modu ...@@ -1696,6 +1696,8 @@ convertRootExpr aliasDummyId (Case kees=:{case_expr, case_guards}) main_dcl_modu
-> abort "backendconvert:defaultCase, case without id" -> abort "backendconvert:defaultCase, case without id"
// otherwise // otherwise
= DefaultCaseNone = DefaultCaseNone
convertRootExpr _ (FailExpr fail_ident) _
= beNormalNode (beLiteralSymbol BEFailSymb fail_ident.id_name) beNoArgs
convertRootExpr _ expr main_dcl_module_n convertRootExpr _ expr main_dcl_module_n
= convertExpr expr main_dcl_module_n = convertExpr expr main_dcl_module_n
......
...@@ -1235,6 +1235,7 @@ cIsNotStrict :== False ...@@ -1235,6 +1235,7 @@ cIsNotStrict :== False
| TypeCodeExpression !TypeCodeExpression | TypeCodeExpression !TypeCodeExpression
| EE | EE
| NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */ | NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */
| FailExpr !Ident // only allowed on (case) root positions
:: CodeBinding variable :== Env String variable :: CodeBinding variable :== Env String variable
......
...@@ -1226,6 +1226,7 @@ cIsNotStrict :== False ...@@ -1226,6 +1226,7 @@ cIsNotStrict :== False
| TypeCodeExpression !TypeCodeExpression | TypeCodeExpression !TypeCodeExpression
| EE | EE
| NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */ | NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */
| FailExpr !Ident // only allowed on (case) root positions
:: CodeBinding variable :== Env String variable :: CodeBinding variable :== Env String variable
...@@ -1746,6 +1747,7 @@ where ...@@ -1746,6 +1747,7 @@ where
(<<<) file (FreeVar {fv_name}) = file <<< fv_name (<<<) file (FreeVar {fv_name}) = file <<< fv_name
(<<<) file (ClassVariable info_ptr) = file <<< "ClassVariable " <<< info_ptr (<<<) file (ClassVariable info_ptr) = file <<< "ClassVariable " <<< info_ptr
(<<<) file (FailExpr _) = file <<< "** FAIL **"
(<<<) file expr = abort ("<<< (Expression) [line 1290]" )//<<- expr) (<<<) file expr = abort ("<<< (Expression) [line 1290]" )//<<- expr)
instance <<< LetBind instance <<< LetBind
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment