diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2017-07-26 11:15:37 -0400 |
---|---|---|
committer | Ori Bernstein <ori@markovcorp.com> | 2017-07-26 10:43:43 -0700 |
commit | 7be6028358f07d4e01fbadf8d9f31041bf8c2fce (patch) | |
tree | c64aaf8b03ad75a0417fa1aeabbeb3d390eace1d | |
parent | f7ff6155f5c57b8ece62dd8f1401c69e3bf3c6a4 (diff) | |
download | mc-7be6028358f07d4e01fbadf8d9f31041bf8c2fce.tar.gz |
Whitespace fixes.
-rw-r--r-- | parse/gram.y | 9 | ||||
-rw-r--r-- | parse/infer.c | 12 |
2 files changed, 10 insertions, 11 deletions
diff --git a/parse/gram.y b/parse/gram.y index 4693e38..fddf7e8 100644 --- a/parse/gram.y +++ b/parse/gram.y @@ -333,7 +333,7 @@ pkgitem : decl { | pkgtydef { /* the type may only be null in a package context, so we can set the type when merging in this case. - + FIXME: clean up the fucking special cases. */ if ($1.type) $1.type->vis = Visexport; @@ -422,7 +422,7 @@ traitdef: Ttrait Tident generictype optauxtypes { /* trait prototype */ 0); for (i = 0; i < $6.nn; i++) { $6.nl[i]->decl.trait = $$; - $6.nl[i]->decl.impls = mkht(tyhash, tyeq); + $6.nl[i]->decl.impls = mkht(tyhash, tyeq); $6.nl[i]->decl.isgeneric = 1; } } @@ -735,7 +735,7 @@ postfixexpr | atomicexpr ; -arglist : expr +arglist : expr {$$.nl = NULL; $$.nn = 0; lappend(&$$.nl, &$$.nn, $1);} | arglist Tcomma expr {lappend(&$$.nl, &$$.nn, $3);} @@ -805,7 +805,7 @@ littok : strlit {$$ = $1;} strlit : Tstrlit { $$ = mkstr($1->loc, $1->strval); } | strlit Tstrlit { Str merged; - + merged.len = $1->lit.strval.len + $2->strval.len; merged.buf = malloc(merged.len); memcpy(merged.buf, $1->lit.strval.buf, $1->lit.strval.len); @@ -1173,4 +1173,3 @@ static Op binop(int tt) } return o; } - diff --git a/parse/infer.c b/parse/infer.c index 5b22886..c99262e 100644 --- a/parse/infer.c +++ b/parse/infer.c @@ -886,10 +886,10 @@ basetype(Type *a) Type *t; t = htget(seqbase, a); - while (!t && a->type == Tyname) { - a = a->sub[0]; - t = htget(seqbase, a); - } + while (!t && a->type == Tyname) { + a = a->sub[0]; + t = htget(seqbase, a); + } if (!t && (a->type == Tyslice || a->type == Tyarray || a->type == Typtr)) t = a->sub[0]; if (t) @@ -2421,8 +2421,8 @@ typesub(Node *n, int noerr) } for (i = 0; i < n->expr.nargs; i++) typesub(n->expr.args[i], noerr); - if (!noerr) - verifyop(n); + if (!noerr) + verifyop(n); break; case Nfunc: pushstab(n->func.scope); |