[Gridflow-cvs] [svn] commit: r3282 - /trunk/base/source_filter.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Mar 25 11:40:22 EDT 2008


Author: matju
Date: Tue Mar 25 11:40:21 2008
New Revision: 3282

Log:
non-matching decl/def pairs is an error, not a warning

Modified:
    trunk/base/source_filter.rb

Modified: trunk/base/source_filter.rb
==============================================================================
--- trunk/base/source_filter.rb (original)
+++ trunk/base/source_filter.rb Tue Mar 25 11:40:21 2008
@@ -25,6 +25,7 @@
 $keywords = %w(class decl def end grdecl)
 $stack = []
 $classes = []
+$exit = 0
 
 ClassDecl = Struct.new(:name,:supername,:methods,:grins,:attrs,:info)
 MethodDecl = Struct.new(:rettype,:selector,:arglist,:minargs,:maxargs,:where,:static)
@@ -148,9 +149,10 @@
 	if qlass.methods[m.selector]
 		n = m; m = qlass.methods[m.selector]
 		if m!=n then
-			STDERR.puts "warning: def does not match decl:"
+			STDERR.puts "ERROR: def does not match decl:"
 			STDERR.puts "#{m.where}: \\decl #{m.inspect}"
 			STDERR.puts "#{n.where}: \\def #{n.inspect}"
+			$exit = 1
 		end
 	else
 		qlass.methods[m.selector] = m
@@ -209,7 +211,7 @@
 	when "void"; Out.print "return Qnil;"
 	when "Ruby","Symbol","Array","String"; Out.print "return foo;"
 	else 
-#		Out.print "gfpost(\"returning 0x%08x\",R(foo).r);"
+#		Out.print "post(\"returning 0x%08x\",R(foo).r);"
 		Out.print "return R(foo).r;"
 	end
 	Out.print "} #{m.rettype} #{classname}::#{m.selector}(VA"
@@ -348,3 +350,5 @@
 	end
 	$linenumber+=1
 }
+
+exit $exit



More information about the Gridflow-cvs mailing list