Commit Graph

17 Commits

Author SHA1 Message Date
D.E. Akers bc32a948bf add HAS AN keyword for grammatically correct declarations
http://forum.lolcode.org/viewtopic.php?f=4&t=13#p19
2015-08-30 15:46:36 -07:00
D.E. Akers f1881ad63f add INVISIBLE operator for writing to stderr
Printing warnings and the like to the standard error stream is common
courtesy, not least because it avoids cluttering the program's output
with diagnostic messages.

Neither the 1.2 specification nor any of the proposals for 1.3 mention
using `INVISIBLE` for this purpose. Nevertheless, the operator and the
behavior described herein have seen sufficiently wide adoption in other
LOLCODE interpreters that I believe `lci` would do well to follow suit.

This patch attempts to be minimally invasive. Rather than adding a new
node type and all that that entails, the `PrintStmtNode` structure now
has a `FILE *` field containing the file to which the node should print
during interpretation. This saves a branch in `interpretPrintStmtNode()`
at the cost of making the structure negligibly larger on most systems.

Adding tests for `INVISIBLE` would require rethinking the test driver,
which presently uses the existence of output on `stderr` to detect that
an "expected error" has occurred. I'll happily try my hand at making the
necessary modifications if this patch comes to be accepted.
2015-08-30 15:45:26 -07:00
Justin Meza c412ec117a patched ElColmo's system command code with some minor style changes 2014-05-09 23:59:18 -04:00
Mark J. Reed 343d661a4d use long long integers instead of ints 2013-12-19 12:51:13 -05:00
Justin Meza e58ece8ef7 fixed keywords with question marks 2013-02-26 21:35:54 -05:00
Justin Meza 5337b65513 cleaning up binding code 2013-02-24 15:44:33 -05:00
Justin J. Meza 5751d3fd42 minor bookkeeping changes 2012-12-13 00:02:17 -05:00
Justin J. Meza 5e8d706cf0 started adding new error infrastructure 2012-03-24 11:58:04 -04:00
Justin J. Meza 6d58808ba6 added support for alternate array declaration inheritance 2011-12-23 11:09:11 -05:00
Justin J. Meza 177466aac8 added basic support for array inheritance 2011-10-28 18:31:36 -04:00
Justin J. Meza 9ab725d97d Added support for array initialization. 2011-09-26 16:16:19 -04:00
Justin J. Meza a6ef5811e8 Added basic array functionality and cleaned up documentation. 2011-06-14 23:54:12 -07:00
Justin J. Meza 78456aabfd Merged SRS and de-linted code 2010-12-21 03:20:31 -05:00
Justin J. Meza a90bf070f0 Added new functions, stored as values; updated EBNF 2010-11-16 00:25:51 -05:00
Justin J. Meza 1736db5f0f Implemented variable deallocation 2010-09-02 01:37:20 -07:00
Justin J. Meza a2db1d932f Added variable type initialization 2010-09-01 20:53:46 -07:00
Justin J. Meza 2e14ac0b3f Initial project import 2010-08-09 00:01:59 -07:00