shithub: mc

Download patch

ref: ef08d1f341b85d8823b0aafbfb655acdcf0d9998
parent: 28deb6d3703a6d8b62f053223c4e79b16419dcce
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Oct 1 17:08:51 EDT 2014

Allow stuff like comments after the package name.

    Before, we expected the full package to be on its own line, as
    in:

        use foo

    now we can do:

        use foo /* for bar function */

--- a/bldfile
+++ b/bldfile
@@ -13,19 +13,5 @@
 	util.myr
 ;
 
-lib testlib =
-	build.myr
-	clean.myr
-	config.myr
-	deps.myr
-	install.myr
-	main.myr
-	opts.myr
-	parse.myr
-	subdir.myr
-        types.myr
-	util.myr
-;
-
 man = mbld.1;
 
--- a/deps.myr
+++ b/deps.myr
@@ -21,7 +21,7 @@
 	var seentab, donetab
 	var obj, usefile, out, useout
 
-	match regex.compile("^\\s*use\\s+(([^\"]\\S+[^\"])|(\"(\\S+)\"))")
+	match regex.compile("^\\s*use\\s+((\\<\\S+\\>)|(\"(\\S+)\")).*")
 	| `std.Ok re:	usepat = re
 	| `std.Fail f:	std.fatal(1, "Failed to compile use pattern regex\n")
 	;;