changeset 307:5f6a173d4ad3

- Don't consider '\!' as an operator when it begins a template argument list.
author aziz
date Tue, 14 Aug 2007 18:19:03 +0000
parents 9c866aadcb5b
children 3b9fc1e72210
files trunk/src/main.d
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/main.d	Tue Aug 14 17:53:03 2007 +0000
+++ b/trunk/src/main.d	Tue Aug 14 18:19:03 2007 +0000
@@ -189,6 +189,10 @@
       writef(`<op c="ne">!=</op>`);
       break;
     case TOK.Not:
+      // Check if this is part of a template instantiation.
+      // TODO: comments aren't skipped.
+      if (token.prev.type == TOK.Identifier && token.next.type == TOK.LParen)
+        goto default;
       writef(`<op c="n">!</op>`);
       break;
     case TOK.Int32, TOK.Int64, TOK.Uint32, TOK.Uint64,