Commit Graph

13 Commits

Author SHA1 Message Date
7393e12555 Allow multiple arguments to IO.print(). 2014-04-09 07:48:35 -07:00
4a8cf3a7bf Move newline handling down into parser.
This lets us make it a grammar feature and not a lexer trick.
Newlines are explicitly ignored in some parts of the grammar. This
lets, for example, things like "|" ignore the newline when used as
an operator, but not when used as a parameter delimiter in a block
argument.
2014-04-04 07:51:18 -07:00
da4cadf16b Unify body handling.
Blocks, functions, and methods now have the same code for handling
their bodies.

This means that single-line methods work like single-line functions:
they return the result of their expression.
2014-04-03 07:48:19 -07:00
b1bae8fc6c Fix #17. 2014-02-14 20:15:49 -08:00
5c2cf641ae Make classes know their name. 2014-01-28 15:31:11 -08:00
b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00
2ec01c558f Clean up the root of the class/metaclass hierarchy. 2013-12-21 20:44:37 -08:00
6c3aa85228 Make IO a static class instead of a singleton. 2013-12-21 19:25:09 -08:00
f2b036420d Fix a bunch of test TODOs.
- Added a bunch of tests.
- Removed some TODOs for stuff that's already done.
- Made list literals handle newlines better.
2013-12-20 12:42:11 -08:00
4d67f2270a Use more conventional syntax for constructors.
They are now invoked like "new Foo".
Also, superclass constructors are now much less semantically
and syntactically weird. Since the instance is created before
any constructor is called, there's no point in time where the
instance isn't there.
2013-12-19 07:02:27 -08:00
c1cfe1b9f6 Handle inherited fields correctly. 2013-12-10 16:13:25 -08:00
b390bdf604 Clean up constructor tests. 2013-11-29 15:21:36 -08:00
56449cdbef Reorganize tests. 2013-11-26 22:52:00 -08:00