shithub: mc

Download patch

ref: 38c84bbac428a16ea96b33a106293152575c7b20
parent: 831925aa6419d2901f32b648afb8e38836d19bea
author: Ori Bernstein <[email protected]>
date: Wed Jul 9 18:03:28 EDT 2014

Update to new tuple syntax.

--- a/compile.myr
+++ b/compile.myr
@@ -11,8 +11,8 @@
 
 type tree = union
 	/* basic string building */
-	`Alt	[tree#, tree#]
-	`Cat	[tree#, tree#]
+	`Alt	(tree#, tree#)
+	`Cat	(tree#, tree#)
 
 	/* repetition */
 	`Star	tree#
@@ -27,7 +27,7 @@
 	`Ranges	char[2][:]
 
 	/* meta */
-	`Cap	[std.size, tree#] /* id, tree */
+	`Cap	(std.size, tree#) /* id, tree */
 	`Bol	/* beginning of line */
 	`Eol	/* end of line */
 ;;
@@ -147,7 +147,7 @@
 }
 
 type rangetrie = struct
-	ranges	: [byte, byte][:]
+	ranges	: (byte, byte)[:]
 	link	: rangetrie#[:]
 	end	: bool
 ;;
--- a/interp.myr
+++ b/interp.myr
@@ -259,7 +259,7 @@
 	-> re.strp < str.len
 }
 
-const trace : (re : regex#, thr : rethread#, msg : byte[:], args : ...) = {re, thr, msg, args
+const trace : (re : regex#, thr : rethread#, msg : byte[:], args : ... -> void) = {re, thr, msg, args
 	if re.debug
 		std.putv(msg, std.vastart(&args))
 	;;
--- a/types.myr
+++ b/types.myr
@@ -42,7 +42,7 @@
 	type reinst = union
 		/* direct consumers */
 		`Ibyte	byte
-		`Irange	[byte, byte]
+		`Irange	(byte, byte)
 
 		/* groups */
 		`Ilbra	std.size
@@ -53,7 +53,7 @@
 		`Ieol
 
 		/* control flow */
-		`Ifork	[std.size, std.size]
+		`Ifork	(std.size, std.size)
 		`Ijmp	std.size
 		`Imatch
 	;;