shithub: mc

Download patch

ref: cb85a03cb45a25936ce0afaa17651636ca566606
parent: a2f4956537807af8c698423f25b9b6de7ab66c1f
author: Ori Bernstein <ori@markovcorp.com>
date: Tue Jul 25 09:19:49 EDT 2017

Remove spandrels.

	Match patterns can't be null. They haven't been nullable
	for ages. And even if they could be nullable, $2 isn't the
	match statement any more.

--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -61,7 +61,7 @@
 	const flush	: (f : file# -> bool)
 
 	/* seeking */
-	const seek	: (f : file#, std.off -> std.result(std.off, ioerr))
+	const seek	: (f : file#, off : std.off -> std.result(std.off, ioerr))
 
 	/* single unit operations */
 	const putb	: (f : file#, b : byte	-> status(std.size))
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -979,12 +979,10 @@
 matches : match {
 		$$.nl = NULL;
 		$$.nn = 0;
-		if ($1)
-			lappend(&$$.nl, &$$.nn, $1);
+		lappend(&$$.nl, &$$.nn, $1);
 	}
 	| matches Tbor match {
-		if ($2)
-			lappend(&$$.nl, &$$.nn, $3);
+		lappend(&$$.nl, &$$.nn, $3);
 	}
 	;