Undo fix and actually use a macro in the accumulation test .. just incase.
authorDale Weiler <killfieldengine@gmail.com>
Fri, 18 Oct 2013 00:34:16 +0000 (20:34 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 18 Oct 2013 00:34:16 +0000 (20:34 -0400)
ftepp.c
tests/accumulate.qc

diff --git a/ftepp.c b/ftepp.c
index 36299b35ea05e72ca91df0de7c1928ad74f0f50c..fe63fbf656cb9c172ee060abf7f68b3d4a8aaa01 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1513,8 +1513,6 @@ static bool ftepp_hash(ftepp_t *ftepp)
         case TOKEN_KEYWORD:
         case TOKEN_IDENT:
         case TOKEN_TYPENAME:
-        case TOKEN_ATTRIBUTE_CLOSE:
-        case TOKEN_ATTRIBUTE_OPEN:
             if (!strcmp(ftepp_tokval(ftepp), "define")) {
                 ftepp_inmacro(ftepp, "define");
                 return ftepp_define(ftepp);
index 46e04463f7747299e98010281af95f62e5594a2f..3fad9b705dd9b67e02d5c1445a9eee82c8a09957 100644 (file)
@@ -1,10 +1,15 @@
-[[accumulate]] void foo() {
+#define ACCUMULATE_FUNCTION(FUNC) \
+    [[accumulate]] void FUNC ()
+
+ACCUMULATE_FUNCTION(foo) {
     print("hello ");
 }
-[[accumulate]] void foo() {
+
+ACCUMULATE_FUNCTION(foo) {
     print("accumulation ");
 }
-[[accumulate]] void foo() {
+
+ACCUMULATE_FUNCTION(foo) {
     print("world\n");
 }