4249f92571
Rename tests.
2015-01-15 06:54:16 -08:00
78e99c6c99
Merge branch 'list-forall' of git://github.com/gsmaverick/wren into gsmaverick-list-forall
2015-01-15 06:52:43 -08:00
b829ce67af
Rename forall to all.
2015-01-14 23:19:31 -08:00
c50e46725f
Implicitly define nonlocal names.
...
If a capitalized name cannot be resolved, a new top-level
variable with its name is implicitly declared. If a real
definition is not found later, a compile time error is raised.
Mutual recursion at the top level works now!
Fix #101 . Fix #106 .
2015-01-14 23:08:25 -08:00
f2b334d7d2
Add more forall test cases.
2015-01-14 22:51:34 -08:00
7716ad6263
Adds forall method on Sequences.
2015-01-13 23:47:01 -08:00
a8e2ba233c
Add support for "nonlocal" (capitalized) names, and change how variable lookup works.
...
Inside a method, all local variable lookup stops at the method boundary. In other
words, methods, do not close over outer local variables.
If a name is not found inside a method and is lowercase, it's a method on this.
If it's capitalized, it's a global variable.
2015-01-13 21:36:42 -08:00
1d9445d9bc
Tests for IO.read().
2015-01-11 21:47:29 -08:00
73b041a78a
Merge branch 'master' of git://github.com/Alek900/wren into Alek900-master
...
Conflicts:
src/wren_compiler.c
2015-01-11 20:01:30 -08:00
21e740d5c3
Test that carriage returns are treated like whitespace.
2015-01-11 19:58:30 -08:00
be0032cc40
Merge branch 'segfault_on_top_level_super_with_no_args' of git://github.com/zeckalpha/wren into zeckalpha-segfault_on_top_level_super_with_no_args
2015-01-11 19:42:26 -08:00
bc29e0929e
Rename a couple of files and tweak some docs.
2015-01-11 19:13:15 -08:00
7557c91b3c
Adds some common methods to strings.
2015-01-11 16:06:56 -08:00
c376d88e61
super at top level: Allow the compiler to continue compilation after erroring. Added two more tests.
2015-01-11 17:44:10 -06:00
3490c8d2f3
Segfault when calling super at top-level with no arguments.
...
If enclosingClass is null, we can't proceed with compilation since we don't have its name.
2015-01-09 15:14:06 -06:00
3116bf97de
Use correct buffer size in string subscript operator.
2015-01-09 07:12:25 -08:00
bcf052436f
Merge pull request #94 from edsrzf/fix-neg-number
...
Don't treat negative numbers as literals
2015-01-09 07:00:12 -08:00
75d28c083c
Don't treat negative numbers as literals
...
Fixes #93 .
Previously, "1 -1" was lexed as two number tokens: a positive literal and
a negative literal. This caused problems when it came to parsing.
Now the '-' and the second number are separate tokens.
Note this is a breaking change, since `-16.sqrt` is now parsed as `-(16.sqrt)`,
as opposed to `(-16).sqrt`.
There is a small bit of overhead to doing it this way, but it might be possible
to optimize that out in the compiler at some point in the future.
2015-01-09 20:17:40 +13:00
a9f1d52ef7
Merge branch 'improve-debugging' of git://github.com/gsmaverick/wren into gsmaverick-improve-debugging
2015-01-08 21:49:20 -08:00
15b0d8777c
Handle toString not returning a string in IO.print and IO.write.
...
Fix #67 .
2015-01-08 07:53:37 -08:00
09bb28735c
Merge branch 'feature-shebang-support' of git://github.com/mauvm/wren into mauvm-feature-shebang-support
2015-01-04 13:02:42 -08:00
a9bb2387a1
Handle empty (or comment-only) files. Fix #57 .
2015-01-04 13:00:53 -08:00
7f90485cff
Let the user know the arity of a missing method in the error message.
2015-01-04 14:42:11 -05:00
4200f18f83
Rename test for invalid shebang.
2015-01-04 20:09:33 +01:00
6c549e0cc5
Use lexError() and add test for invalid shebang.
2015-01-04 19:56:16 +01:00
8a54ef9919
Add tests.
2015-01-03 20:53:17 +01:00
c25cfca18b
Eliminate semicolons entirely.
2015-01-03 10:02:45 -08:00
d1ac8c314f
Added test for whitespace in code
2015-01-03 15:10:04 +01:00
150ea237e9
Added test and fixed skipping whitespace
2015-01-03 14:57:34 +01:00
c967439ead
Add Fiber.abort() method.
2015-01-01 10:40:14 -08:00
a94dfdac10
Add test for too many constants in one function.
2014-12-06 16:39:39 -08:00
f6cbb6ad75
Add Fiber.try().
2014-10-15 06:36:42 -07:00
feb9f7cb53
Fix crash bug in closure capturing.
2014-04-24 17:52:53 -07:00
80a4eb8c9c
Better error message on too many inherited fields.
2014-04-22 07:06:26 -07:00
3087daaece
Add a closure test.
2014-04-19 17:48:06 -07:00
09c707e16a
More tests for super calls.
2014-04-19 11:51:36 -07:00
48dab5323d
A few small cleanups.
2014-04-19 11:44:51 -07:00
05717e763d
Move tests to right directory.
2014-04-19 11:41:21 -07:00
f03895b17e
Symmetric coroutines!
2014-04-14 07:23:05 -07:00
7393e12555
Allow multiple arguments to IO.print().
2014-04-09 07:48:35 -07:00
b2941cbbb6
Docs for operators and some other stuff.
2014-04-08 21:18:17 -07:00
3a55acfe1a
Test string concatenation.
2014-04-08 21:17:49 -07:00
dca58ff747
Require parentheses around operator and setter arguments.
2014-04-08 17:54:37 -07:00
f6dd88937b
Support "new" on lists.
2014-04-08 07:31:23 -07:00
f41be80e5f
Use a growable buffer for globals.
...
Also allows more than 256.
2014-04-06 16:16:15 -07:00
9a8f2edda4
List.addAll().
2014-04-06 08:37:37 -07:00
2da8025cd4
Fiber.create -> new Fiber
2014-04-04 18:24:55 -07:00
f5a9f39568
Check argument type in new Fn.
2014-04-04 18:13:13 -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