You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/10/05 02:17:29 UTC
[lucy-commits] svn commit: r1179016 - in
/incubator/lucy/branches/clownfish_lemon/clownfish: src/CFCParseHeader.y
t/103-float_type.t
Author: marvin
Date: Wed Oct 5 00:17:29 2011
New Revision: 1179016
URL: http://svn.apache.org/viewvc?rev=1179016&view=rev
Log:
Support const float, const double types.
Modified:
incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParseHeader.y
incubator/lucy/branches/clownfish_lemon/clownfish/t/103-float_type.t
Modified: incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParseHeader.y
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParseHeader.y?rev=1179016&r1=1179015&r2=1179016&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParseHeader.y (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCParseHeader.y Wed Oct 5 00:17:29 2011
@@ -111,3 +111,8 @@ float_type(A) ::= float_type_specifier(B
A = (CFCBase*)CFCType_new_float(0, B);
}
+float_type(A) ::= CONST float_type_specifier(B).
+{
+ A = (CFCBase*)CFCType_new_float(CFCTYPE_CONST, B);
+}
+
Modified: incubator/lucy/branches/clownfish_lemon/clownfish/t/103-float_type.t
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/t/103-float_type.t?rev=1179016&r1=1179015&r2=1179016&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/t/103-float_type.t (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/t/103-float_type.t Wed Oct 5 00:17:29 2011
@@ -16,7 +16,7 @@
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 15;
use Clownfish::Type;
use Clownfish::Parser;
@@ -31,12 +31,10 @@ like( $float_type->to_c, qr/const/, "'co
my $parser = Clownfish::Parser->new;
for my $specifier (qw( float double)) {
- is( $parser->c_float_specifier($specifier),
- $specifier, "c_float_specifier: $specifier" );
my $type = $parser->parse($specifier);
isa_ok( $type, "Clownfish::Type" );
ok( $type && $type->is_floating, "parsed specifier is_floating()" );
- $type = $parser->float_type("const $specifier");
+ $type = $parser->parse("const $specifier");
isa_ok( $type, "Clownfish::Type" );
ok( $type && $type->is_floating, "parsed const specifier is_floating()" );
ok( $type && $type->const, "parsed const specifier is_floating()" );