Mercurial > projects > ddmd
diff dmd/Parser.d @ 23:460959608115
Branch merge.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Mon, 12 Apr 2010 17:00:08 +0100 |
parents | 427f8aa74d28 01cadcfa4842 |
children | 1b81e14880ef |
line wrap: on
line diff
--- a/dmd/Parser.d Mon Apr 12 16:29:33 2010 +0400 +++ b/dmd/Parser.d Mon Apr 12 17:00:08 2010 +0100 @@ -47,6 +47,7 @@ import dmd.AssertExp; import dmd.CompileExp; import dmd.FileExp; +import dmd.TemplateMixin; import dmd.TemplateParameter; import dmd.TemplateTypeParameter; import dmd.TypeidExp; @@ -1076,6 +1077,7 @@ Lerr: return tpl; } +<<<<<<< local /****************************************** * Parse template mixin. @@ -1085,6 +1087,17 @@ * mixin Foo!(args) identifier; * mixin typeof(expr).identifier!(args); */ +======= + +/****************************************** + * Parse template mixin. + * mixin Foo; + * mixin Foo!(args); + * mixin a.b.c!(args).Foo!(args); + * mixin Foo!(args) identifier; + * mixin typeof(expr).identifier!(args); + */ + Dsymbol parseMixin() { TemplateMixin tm; @@ -1129,10 +1142,8 @@ else tiargs = parseTemplateArgument(); } - if (token.value != TOKdot) break; - if (tiargs) { TemplateInstance tempinst = new TemplateInstance(loc, id); @@ -1141,7 +1152,6 @@ tiargs = null; } idents.push(cast(void*)id); - nextToken(); if (token.value != TOKidentifier) { @@ -1152,7 +1162,6 @@ nextToken(); } idents.push(cast(void*)id); - if (token.value == TOKidentifier) { id = token.ident; @@ -1165,7 +1174,6 @@ if (token.value != TOKsemicolon) error("';' expected after mixin"); nextToken(); - return tm; } @@ -6112,4 +6120,4 @@ s.addComment(combineComments(blockComment, token.lineComment)); token.lineComment = null; } -} \ No newline at end of file +}