1301410142
Merge branch 'num_methods' of git://github.com/bjorn/wren into bjorn-num_methods
2015-03-21 12:54:08 -07:00
07951bbeae
Added Num.pi and some tests
2015-03-19 21:12:50 +01:00
a3abf31da0
Merge pull request #222 from bjorn/sequence_contains
...
Moved List.contains to Sequence.contains, added tests and docs
2015-03-18 07:54:55 -07:00
be11d09bd8
Store hash code in strings.
...
Makes string equality and string map keys much faster.
Also did some other general string clean-up.
2015-03-18 07:09:03 -07:00
b80ba29b0e
Merge branch 'master' of https://github.com/munificent/wren
2015-03-17 07:01:09 -07:00
b4fa4acce1
Handle empty string map keys.
2015-03-17 07:00:54 -07:00
d7a91117ac
Reverse the argument order of List.insert
...
The previous order, insert(element, index), was counter-intuitive.
I'm not aware of any list API that uses this order. I've checked:
* Ruby Array.insert(index, obj...)
* JavaScript array.splice(start, deleteCount[, item1[, item2[, ...]]])
* C++ / QList::insert(int i, const T & value)
* C++ / std::vector::insert
* Lua table.insert (list, [pos,] value)
* C# List<T>.Insert(int index, T item)
* Java Interface List<E>.add(int index, E element)
* Python list.insert(i, x)
So it seemed to me more like an oversight in Wren.
2015-03-15 22:51:24 +01:00
fc1dc4c54b
Moved List.contains to Sequence.contains, added tests and docs
2015-03-15 15:59:42 +01:00
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
5459993857
Add Class.supertype.
...
Thanks, Michel!
2015-03-14 09:48:45 -07:00
69567c5eb5
Control string representation of infinity.
2015-03-13 07:35:10 -07:00
b36b71d3c6
Merge pull request #212 from soveran/io-read-eof
...
Change IO.read to return null on EOF
2015-03-07 13:47:07 -08:00
05ba7d9fbf
Add fiber features needed for to write an external scheduler:
...
- Allow yielding the main fiber. This exits the interpreter. The
host can resume it by calling a method.
- Allow getting a reference to the current fiber.
2015-03-07 12:32:11 -08:00
542a783cb4
Change IO.read to return null on EOF
2015-03-07 09:10:18 +00:00
632a01d584
Merge branch 'num_methods' of git://github.com/MarcoLizza/wren into MarcoLizza-num_methods
2015-03-06 22:43:02 -08:00
d35e3c917c
Add count to Sequence.
2015-03-06 07:01:02 -08:00
d56e2d6398
Removing old tests.
2015-03-05 11:27:56 +01:00
130d0df957
Fixing the test a bit.
2015-03-05 11:24:54 +01:00
fde6f74d15
Adding tests.
2015-03-04 16:12:08 +01:00
90aa43450b
Merge branch 'master' of git://github.com/bjorn/wren into bjorn-master
2015-03-03 07:23:47 -08:00
28005ed47a
Refactor number parsing a bit.
2015-03-03 07:17:56 -08:00
0ec31433c8
Generate an error if a number literal is too large to be represented with the Num class.
2015-03-03 00:07:55 -08:00
8f985847d4
Added Sequence.any as complement to Sequence.all
2015-03-01 23:14:32 +01:00
c27a094882
Reorganize superclass validation a bit.
2015-02-27 08:08:27 -08:00
46713a5bb3
Merge branch 'issue-70' of git://github.com/verpeteren/wren into verpeteren-issue-70
2015-02-27 07:41:25 -08:00
96ceaa528b
Allow empty argument list methods.
...
- Compile them as calls and definitions.
- Use them for call(), clear(), run(), try(), and yield().
- Update the docs.
2015-02-26 23:08:36 -08:00
1aaa8cff52
Use more comprehensive signature strings for methods.
2015-02-26 21:56:15 -08:00
f05d6143f5
Generating a runtime error on subclassing of builtins
...
As discussed in https://github.com/munificent/wren/issues/70 , it is not allowed to subclass built-in types.
2015-02-25 20:13:37 +01:00
6a10d9740c
Merge pull request #187 from MarcoLizza/bitwise_precedence
...
Bitwise precedence
2015-02-25 07:14:31 -08:00
fc2ed6f6e1
Don't allow trailing non-number characters when parsing a string to a number.
2015-02-25 07:07:54 -08:00
cec1f9160a
Moving bitwise precedence-test to the correct folder.
2015-02-25 16:00:53 +01:00
f4a39bc943
Code review changes.
2015-02-25 01:20:53 -08:00
dfa1b51663
Add bitwise operators precedence test.
2015-02-23 17:29:31 +01:00
03a5b96040
Add a fromString static method on Num that converts strings to numbers.
2015-02-22 20:06:17 -08:00
0f9e15833f
Unify argument parsing. Fix #24 .
2015-02-22 10:42:49 -08:00
ae88ee539d
Merge branch 'master' of https://github.com/munificent/wren
2015-02-18 07:55:38 -08:00
b2ca4c0381
Allow zero or multiple imported names.
2015-02-17 07:32:33 -08:00
00cdef303c
Adding new bitwise operands tests.
2015-02-16 11:30:15 +01:00
a44d479643
Basic import syntax.
2015-02-14 16:46:00 -08:00
bc5a793c41
Split out the core and main modules.
...
- Implicitly import everything in core into every imported module.
- Test cyclic imports.
2015-02-11 10:06:45 -08:00
2005e1e0a2
Add ".wren" to modules in the embedder.
2015-02-06 11:52:05 -08:00
bb647d4247
Start getting module loading working.
...
Right now, it uses a weird "import_" method on String which
should either be replaced or at least hidden behind some syntax.
But it does roughly the right thing. Still lots of corner cases to
clean up and stuff to fix. In particular:
- Need to handle compilation errors in imported modules.
- Need to implicitly import all core and IO types into imported module.
- Need to handle circular imports.
(Just need to give entry module the right name for this to work.)
2015-02-06 07:01:15 -08:00
55caae343b
Add "." to comments. :)
2015-02-04 20:26:29 -08:00
ddd20c687e
Merge branch 'master' into MarcoLizza-8_bit_strings_tests
2015-02-04 20:25:12 -08:00
878be6fb6b
Clean up wrenStringFind() a bit.
2015-02-04 20:23:50 -08:00
d73b19967d
Adding 8-bit strings test cases.
2015-02-04 13:58:16 +01:00
0aa4d7c2bd
Fix crash when doing a lookup on an empty map.
2015-01-28 19:19:04 -08:00
f482a53d0e
Define equality on ranges.
2015-01-25 19:50:54 -08:00
41d9ba9b3d
Merge branch 'hex-literals' of git://github.com/gsmaverick/wren into gsmaverick-hex-literals
2015-01-25 17:49:05 -08:00
4579171afa
Add remove() to Map.
2015-01-25 17:42:36 -08:00