Added:
/test/bug-ostream-input.stupid
Modified:
/src/Stupid/C.pm
/src/stupid.pl
/test/ostream.stupid
/test/test.pl
=======================================
--- /dev/null
+++ /test/bug-ostream-input.stupid Sun Mar 7 15:55:58 2010
@@ -0,0 +1,11 @@
+"EXPECT-BUILD-FAIL:";
+
+function() test(ostream out) {
+ array(uint8, 13) hello = ( "Hello, world!" );
+ uint32 n = 0;
+
+ while(n ne32 13) {
+ out.put(hello[n]);
+ n = n plus32 1;
+ }
+}
=======================================
--- /src/Stupid/C.pm Fri Feb 26 04:53:07 2010
+++ /src/Stupid/C.pm Sun Mar 7 15:55:58 2010
@@ -2,6 +2,8 @@
use strict;
+use Carp;
+
sub Stupid::LanguageWrapper::emitCode {
my $self = shift;
@@ -266,11 +268,15 @@
print "uint8 *$name";
}
-sub Stupid::Type::OStream::emitArg {
+sub Stupid::Type::OStream::emitReturnDecl {
my $self = shift;
my $name = shift;
print "stupid_ostream *$name";
+}
+
+sub Stupid::Type::OStream::emitArg {
+ croak "ostreams must be outputs";
}
sub Stupid::Type::Array::emitReturnDecl {
=======================================
--- /src/stupid.pl Sun Feb 28 06:54:07 2010
+++ /src/stupid.pl Sun Mar 7 15:55:58 2010
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
use strict;
=======================================
--- /test/ostream.stupid Sun Feb 14 05:11:24 2010
+++ /test/ostream.stupid Sun Mar 7 15:55:58 2010
@@ -1,6 +1,6 @@
"EXPECT:Hello, world!";
-function() test(ostream out) {
+function(ostream out) test() {
array(uint8, 13) hello = ( "Hello, world!" );
uint32 n = 0;
=======================================
--- /test/test.pl Tue Mar 2 07:29:31 2010
+++ /test/test.pl Sun Mar 7 15:55:58 2010
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
use strict;
Turns out it didn't, although it did break Java.
I guess for Haskell I wrote dead code that your change suddenly made
live...
--
sudo port install p5-file-slurp
for this to work... what's the best place to build a human-readable list
of dependencies? a README?
Catching up slowly after travel - this looks easy enough to deal with
jetlagged :-)
README is one obvious place, works for me. Presumably in the top
directory...
--
http://www.apache-ssl.org/ben.html http://www.links.org/
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff