summaryrefslogtreecommitdiff
path: root/parse/gram.y
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2017-07-26 11:15:37 -0400
committerOri Bernstein <ori@markovcorp.com>2017-07-26 10:43:43 -0700
commit7be6028358f07d4e01fbadf8d9f31041bf8c2fce (patch)
treec64aaf8b03ad75a0417fa1aeabbeb3d390eace1d /parse/gram.y
parentf7ff6155f5c57b8ece62dd8f1401c69e3bf3c6a4 (diff)
downloadmc-7be6028358f07d4e01fbadf8d9f31041bf8c2fce.tar.gz
Whitespace fixes.
Diffstat (limited to 'parse/gram.y')
-rw-r--r--parse/gram.y9
1 files changed, 4 insertions, 5 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;
}
-