[pure-lang-svn] SF.net SVN: pure-lang:[519] pure/trunk
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-08-17 11:39:51
|
Revision: 519
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=519&view=rev
Author: agraef
Date: 2008-08-17 11:40:00 +0000 (Sun, 17 Aug 2008)
Log Message:
-----------
Cosmetic changes.
Modified Paths:
--------------
pure/trunk/expr.cc
pure/trunk/expr.hh
pure/trunk/interpreter.cc
Modified: pure/trunk/expr.cc
===================================================================
--- pure/trunk/expr.cc 2008-08-17 11:25:34 UTC (rev 518)
+++ pure/trunk/expr.cc 2008-08-17 11:40:00 UTC (rev 519)
@@ -252,11 +252,11 @@
}
}
-bool expr::is_tuplexxx(exprl &xs) const
+bool expr::is_tuplel(exprl &xs) const
{
expr x, y;
if (is_pair(x, y) && !(flags()&EXPR::PAREN))
- return x.is_tuplexxx(xs) && y.is_tuplexxx(xs);
+ return x.is_tuplel(xs) && y.is_tuplel(xs);
else {
xs.push_back(*this);
return true;
Modified: pure/trunk/expr.hh
===================================================================
--- pure/trunk/expr.hh 2008-08-17 11:25:34 UTC (rev 518)
+++ pure/trunk/expr.hh 2008-08-17 11:40:00 UTC (rev 519)
@@ -483,9 +483,10 @@
// Always true (see note above). Use is_pair() && istuple(xs) to test for a
// "real" tuple instead.
bool is_tuple(exprl &xs) const;
+ // Check for proper (normalized) tuples.
bool is_tuplex(exprl &xs) const;
// Special check for tuples used in list construction.
- bool is_tuplexxx(exprl &xs) const;
+ bool is_tuplel(exprl &xs) const;
};
/* Rules of the form: lhs -> rhs [if qual]. */
Modified: pure/trunk/interpreter.cc
===================================================================
--- pure/trunk/interpreter.cc 2008-08-17 11:25:34 UTC (rev 518)
+++ pure/trunk/interpreter.cc 2008-08-17 11:40:00 UTC (rev 519)
@@ -1920,7 +1920,7 @@
{
expr *u;
exprl xs;
- if (x->is_pair() && x->is_tuplexxx(xs))
+ if (x->is_pair() && x->is_tuplel(xs))
u = new expr(expr::list(xs));
else
u = new expr(expr::cons(*x, expr::nil()));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|