shithub: mc

Download patch

ref: 087c86718d19dba36599a02be0ccccbadb1e46b5
parent: 5ed7c4731bfc96db39875e48237404a9f0838d38
author: Ori Bernstein <[email protected]>
date: Mon Dec 30 13:42:50 EST 2013

Rename 'in' to 'within' to avoid keyword conflict.

--- a/interp.myr
+++ b/interp.myr
@@ -95,7 +95,7 @@
 	/* Char matching. Consume exactly one byte from the string. */
 	| `Ibyte b:
 		trace(re, thr, "\t%z:\tByte %b (%c)\n", thr.ip, b, b castto(char))
-		if !in(re, str)
+		if !within(re, str)
 			die(re, thr, "end of string")
 		elif b != str[re.strp]
 			die(re, thr, "not right char")
@@ -105,7 +105,7 @@
 		;;
 	| `Irange (start, end):
 		trace(re, thr, "\t%z:\tRange (%b, %b)\n", thr.ip, start, end)
-		if !in(re, str) || start > str[re.strp] || end < str[re.strp]
+		if !within(re, str) || start > str[re.strp] || end < str[re.strp]
 			die(re, thr, "bad range")
 		else
 			thr.ip++
@@ -222,7 +222,7 @@
 	std.free(thr)
 }
 
-const in = {re, str 
+const within = {re, str 
 	-> re.strp < str.len
 }