shithub: mc

Download patch

ref: 24584aefe1ada81dc018464bdaa012f5a4f73609
parent: 2a0ea983cd6365e3212abe5a5ce3cf74a554daf9
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jul 3 18:36:01 EDT 2017

Errors are conventionally lowercase.

--- a/parse/stab.c
+++ b/parse/stab.c
@@ -346,7 +346,7 @@
 
 	td = htget(st->ty, n);
 	if (!td)
-		die("No type %s to update", namestr(n));
+		die("no type %s to update", namestr(n));
 	td->type = t;
 }
 
@@ -393,7 +393,7 @@
 			htput(st->ty, td->name, td);
 		}
 	} else if (!mergetype(ty, t)) {
-		fatal(n, "Type %s already declared on %s:%d", tystr(ty), fname(ty->loc),
+		fatal(n, "type %s already declared on %s:%d", tystr(ty), fname(ty->loc),
 				lnum(ty->loc));
 	}
 }
@@ -430,11 +430,11 @@
 	st = findstab(st, n);
 	t = gettrait(st, n);
 	if (t && !mergetrait(t, c))
-		fatal(n, "Trait %s already defined on %s:%d",
+		fatal(n, "trait %s already defined on %s:%d",
 			namestr(n), fname(t->loc), lnum(t->loc));
 	ty = gettype(st, n);
 	if (ty)
-		fatal(n, "Trait %s defined as a type on %s:%d",
+		fatal(n, "trait %s defined as a type on %s:%d",
 			namestr(n), fname(ty->loc), lnum(ty->loc));
 	td = xalloc(sizeof(Traitdefn));
 	td->loc = n->loc;
@@ -473,7 +473,7 @@
 	st = findstab(st, n->impl.traitname);
 	impl = getimpl(st, n);
 	if (impl && !mergeimpl(impl, n))
-		fatal(n, "Trait %s already implemented over %s at %s:%d",
+		fatal(n, "trait %s already implemented over %s at %s:%d",
 			namestr(n->impl.traitname), tystr(n->impl.type),
 			fname(n->loc), lnum(n->loc));
 	/*
@@ -518,7 +518,7 @@
 	Tydefn *td;
 
 	if (st->name)
-		die("Stab %s already has namespace; Can't set to %s", st->name, name);
+		die("stab %s already has namespace; Can't set to %s", st->name, name);
 	st->name = strdup(name);
 	htput(file->file.ns, st->name, st);