* Let syntax.
This commit is contained in:
		
							parent
							
								
									a2a9bacd82
								
							
						
					
					
						commit
						1b4184ccbb
					
				
					 2 changed files with 14 additions and 0 deletions
				
			
		|  | @ -160,6 +160,11 @@ Expr evalExpr2(EvalState & state, Expr e) | |||
|     if (ATmatch(e, "Rec([<list>])", &bnds)) | ||||
|         return expandRec(e, (ATermList) bnds); | ||||
| 
 | ||||
|     /* Let expressions `let {..., body = ...}' are just desugared
 | ||||
|        into `(rec {..., body = ...}).body'. */ | ||||
|     if (ATmatch(e, "LetRec(<term>)", &e1)) | ||||
|         return evalExpr(state, ATmake("Select(Rec(<term>), \"body\")", e1)); | ||||
| 
 | ||||
|     /* Barf. */ | ||||
|     throw badTerm("invalid expression", e); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue