[pure-lang-svn] SF.net SVN: pure-lang: [356] pure/trunk
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-07-01 21:05:44
|
Revision: 356 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=356&view=rev Author: agraef Date: 2008-07-01 14:04:46 -0700 (Tue, 01 Jul 2008) Log Message: ----------- 'list' command now also prints fixity and nullary declarations of listed symbols. Modified Paths: -------------- pure/trunk/ChangeLog pure/trunk/lexer.ll Modified: pure/trunk/ChangeLog =================================================================== --- pure/trunk/ChangeLog 2008-07-01 14:50:04 UTC (rev 355) +++ pure/trunk/ChangeLog 2008-07-01 21:04:46 UTC (rev 356) @@ -1,5 +1,8 @@ 2008-07-01 Albert Graef <Dr....@t-...> + * lexer.ll: 'list' command now also prints fixity and nullary + declarations of listed symbols. + * lib/math.pure: Added various bits and pieces, most notably the complex numbers. Also moved sqrt function from primitives.pure to math.pure. Modified: pure/trunk/lexer.ll =================================================================== --- pure/trunk/lexer.ll 2008-07-01 14:50:04 UTC (rev 355) +++ pure/trunk/lexer.ll 2008-07-01 21:04:46 UTC (rev 356) @@ -505,6 +505,25 @@ sout << "def " << sym.s << " = " << *jt->second.cval << ";\n"; } else { + if (sym.fix == nullary) + sout << "nullary " << sym.s << ";\n"; + else if (sym.prec < 10) { + switch (sym.fix) { + case infix: + sout << "infix"; break; + case infixl: + sout << "infixl"; break; + case infixr: + sout << "infixr"; break; + case prefix: + sout << "prefix"; break; + case postfix: + sout << "postfix"; break; + case nullary: + assert(0 && "this can't happen"); break; + } + sout << " " << (int)sym.prec << " " << sym.s << ";\n"; + } if (xt != interp.externals.end()) { const ExternInfo& info = xt->second; sout << info << ";"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |