Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 497282e58dfe89161c4fed7dc2ec9024c32386d5)
+++ src/Parser/DeclarationNode.cc	(revision 5fcba1437426785703d494193d2d94a7c266b9bc)
@@ -717,8 +717,19 @@
 }
 
-DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body ) {
+DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body, StatementNode * with ) {
 	assert( type );
 	assert( type->kind == TypeData::Function );
 	assert( ! type->function.body );
+	if ( with ) {
+		// convert
+		//  void f(S s) with (s) { x = 0; }
+		// to
+		//  void f(S s) { with(s) { x = 0; } }
+		WithStmt * withStmt = strict_dynamic_cast< WithStmt * >( with->build() );
+		withStmt->stmt = body->build();
+		delete body;
+		delete with;
+		body = new StatementNode( new CompoundStmt( { withStmt } ) );
+	}
 	type->function.body = body;
 	return this;
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 497282e58dfe89161c4fed7dc2ec9024c32386d5)
+++ src/Parser/ParseNode.h	(revision 5fcba1437426785703d494193d2d94a7c266b9bc)
@@ -262,5 +262,5 @@
 	DeclarationNode * addBitfield( ExpressionNode * size );
 	DeclarationNode * addVarArgs();
-	DeclarationNode * addFunctionBody( StatementNode * body );
+	DeclarationNode * addFunctionBody( StatementNode * body, StatementNode * with = nullptr );
 	DeclarationNode * addOldDeclList( DeclarationNode * list );
 	DeclarationNode * setBase( TypeData * newType );
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 497282e58dfe89161c4fed7dc2ec9024c32386d5)
+++ src/Parser/parser.yy	(revision 5fcba1437426785703d494193d2d94a7c266b9bc)
@@ -2412,5 +2412,5 @@
 		{ $$ = nullptr; }
 	| WITH '(' tuple_expression_list ')'
-		{ throw SemanticError("With clause is currently unimplemented."); $$ = nullptr; } // FIX ME
+		{ $$ = new StatementNode( build_with( $3, nullptr ) ); }
 	;
 
@@ -2422,5 +2422,5 @@
 			// Add the function body to the last identifier in the function definition list, i.e., foo3:
 			//   [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; }
-			$1->get_last()->addFunctionBody( $3 );
+			$1->get_last()->addFunctionBody( $3, $2 );
 			$$ = $1;
 		}
@@ -2430,5 +2430,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $2->addFunctionBody( $4 )->addType( $1 );
+			$$ = $2->addFunctionBody( $4, $3 )->addType( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
@@ -2437,5 +2437,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $2->addFunctionBody( $4 )->addQualifiers( $1 );
+			$$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
@@ -2444,5 +2444,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $2->addFunctionBody( $4 )->addQualifiers( $1 );
+			$$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
@@ -2451,5 +2451,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $3->addFunctionBody( $5 )->addQualifiers( $2 )->addQualifiers( $1 );
+			$$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 );
 		}
 
@@ -2460,5 +2460,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addType( $1 );
+			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addType( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
@@ -2467,5 +2467,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );
+			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
@@ -2474,5 +2474,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );
+			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
@@ -2481,5 +2481,5 @@
 			typedefTable.addToEnclosingScope( TypedefTable::ID );
 			typedefTable.leaveScope();
-			$$ = $3->addOldDeclList( $4 )->addFunctionBody( $6 )->addQualifiers( $2 )->addQualifiers( $1 );
+			$$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 );
 		}
 	;
