diff src/pt-arg-list.cc @ 10206:37a08e0ce2dc

support Matlab-style empty output/input arguments
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 27 Jan 2010 12:41:49 +0100
parents cd96d29c5efa
children 57a59eae83cc
line wrap: on
line diff
--- a/src/pt-arg-list.cc	Wed Jan 27 02:24:17 2010 -0500
+++ b/src/pt-arg-list.cc	Wed Jan 27 12:41:49 2010 +0100
@@ -39,6 +39,7 @@
 #include "parse.h"
 #include "pt-arg-list.h"
 #include "pt-exp.h"
+#include "pt-id.h"
 #include "pt-pr-code.h"
 #include "pt-walk.h"
 #include "toplev.h"
@@ -77,6 +78,12 @@
 
   if (! list_includes_magic_end && s && s->has_magic_end ())
     list_includes_magic_end = true;
+
+  if (! list_includes_magic_tilde && s && s->is_identifier ())
+    {
+      tree_identifier *id = dynamic_cast<tree_identifier *> (s);
+      list_includes_magic_tilde = id && id->is_black_hole ();
+    }
 }
 
 bool