Commit Graph
11 Commits
Author SHA1 Message Date
Bob Nystrom 71ab3ca887 Use "construct" instead of "this" to define constructors. 2015-07-21 07:24:53 -07:00
Bob Nystrom 5fb6186d7d Make constructors just methods.
* Eliminate "new" reserved word.
* Allow "this" before a method definition to define a constructor.
* Only create a default constructor for classes that don't define one.
2015-07-10 09:18:22 -07:00
Bob Nystrom fa8ac84a8b Fix broken test runner (!).
If a test expected an error and found at least one, it would not fail
on any other expected errors that didn't occur.

Also, some tests were expecting a compile time error message even though
the test script doesn't validate those (yet).

The test function was getting monolithic, so I went ahead and split it
into a separate little class.
2015-07-09 08:06:33 -07:00
Bob Nystrom 8834dcfe1d Add (failing) tests. 2015-05-19 06:47:42 -07:00
Bob Nystrom a907c143c8 Test referring to lowercase class name inside class.
Fix #251.
2015-04-25 10:47:55 -07:00
Bob Nystrom 92a054f76a Don't make locals in scope in their own initializer. 2015-04-01 07:05:40 -07:00
Bob Nystrom 72c38a59ce More stuff for working with strings and bytes!
- "\x" escape sequence to put byte values in strings: "\x34"
- String.byteAt(index) gets value of byte in string.
- String.bytes returns a raw sequence of bytes for a string.
- String.codePointAt(index) gets the code point at an offset as a raw number.
2015-03-27 20:44:07 -07:00
Bob Nystrom 322eea1af5 Generate a runtime error if a foreign method was not found. 2015-03-26 07:17:09 -07:00
Bob Nystrom 89ebffb582 Rearrange a bit. 2015-03-23 06:48:08 -07:00
Gavin Schulz 91c69ccbf0 If module name does not specify a file try to load it as a module package instead. 2015-03-21 16:05:02 -07:00
Bob Nystrom 64eccdd9be Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will
also be useful when there are tests of the embedding API.
2015-03-14 12:45:56 -07:00