1
0
forked from Mirror/wren
Commit Graph

1783 Commits

Author SHA1 Message Date
59e496e26a Fix CRLF being significant inside of strings, now strings are normalized to \n only and the same output regardless of the file line endings (see #988)
https://github.com/wren-lang/wren/issues/988#issuecomment-842670624
2021-05-21 16:24:12 -07:00
d78f481079 wren_core.wren.inc backslash characters escaped (#1023) 2021-05-21 16:09:00 -07:00
9903ddf76b docs; string; clarify indexOf(_,_) to be clearer 2021-05-16 12:17:31 -07:00
f09ebf6acc fix attributes causing crash when GC is triggered by compiler init 2021-05-05 14:34:16 -07:00
7fb7f6430d minor 2021-05-05 14:29:39 -07:00
aca7c70079 docs; fix example with 'continue' (#1007) 2021-05-04 14:56:53 -07:00
eca90e29e9 Document the Meta class. (#977) 2021-04-16 11:12:32 -07:00
a346494922 Documents 'return from module'. (#976)
Fixes #974.
2021-04-16 11:09:28 -07:00
754d5a59e9 correct attributes example (#978) 2021-04-16 11:08:01 -07:00
8eb51d9327 doc: fix links from Object to values (#975)
Fix two broken links from the documentation for the Object class to the
page describing values.
2021-04-15 21:29:26 -07:00
22ff3b5549 update try to 0.4.0 2021-04-09 12:48:39 -07:00
e4b4df2e62 minor; remove redundant comment bit 2021-04-09 11:17:15 -07:00
46b06f0620 minor formatting fix 2021-04-08 22:22:34 -07:00
d650b60c25 0.4.0 release - fix links and formatting 2021-04-08 22:17:13 -07:00
30c9f1ee37 initial 0.4.0 blog post 2021-04-08 22:09:02 -07:00
4a18fc489f tests; maps; remove test that now asserts in debug
for now, as there doesn't seem to be a way to test for that , it fails CI
0.4.0
2021-04-08 21:46:31 -07:00
d763c72e3d fix use of NULL_VAL, also invalid when nan tagging is disabled 2021-04-08 21:40:06 -07:00
34b01226a4 fix use of UNDEFINED_VAL which is invalid when nan tagging is disabled 2021-04-08 21:34:27 -07:00
a4ae905384 Introduce Attributes (#962)
* introduce Attributes for classes and methods
2021-04-08 21:30:09 -07:00
5244a9d001 Add an additional escape sequence \e. (#963) 2021-04-08 10:16:24 -07:00
9e86b0d26a clarify the list of escapes to show the whole list 2021-04-08 10:11:01 -07:00
e260b467c4 made wren version number accessable via function (#958) 2021-04-08 09:33:22 -07:00
1307bdfb64 value: Rename validateKeyTypeto wrenMapIsValidKey. (#965) 2021-04-08 09:10:55 -07:00
06b71897b0 Surface error messages for map key values in the API with asserts
closes https://github.com/wren-lang/wren/pull/921
2021-04-07 23:08:31 -07:00
059e407ed3 wren/compiler: Allow multiline empty parameter lists and calls. (#925) 2021-04-07 22:58:46 -07:00
fd1d095588 Add preamble for Timer module (#920)
Opening remarks also needed here.
2021-04-07 22:56:51 -07:00
7a131a67e6 Add preamble for Scheduler module (#919)
We need some opening remarks here to get rid of the TODO.
2021-04-07 22:56:29 -07:00
e4052a25d7 wren/vm: Add wrenIsFalsyValue. (#866) 2021-04-07 22:54:49 -07:00
041f1bab8d Fix returning from constructors (#845)
* Fix returning from constructors

 1. Do not allow returning with a value
 2. Return the instance, correctly, even when the user returned explicitly

* revise error message for consistency, revise implementation details a bit, fix extra args to finishBody

* clarify tests a bit

* document constructor return

Co-authored-by: ruby0x1 <ruby0x1@pm.me>
2021-04-07 22:53:05 -07:00
68f5c096d8 Disallow non-Num arguments in Num for min(_), max(_), clamp(_,_), pow(_) and atan(_) (#859)
* Disallow non-Num arguments in `Num.min(_)`, `Num.max(_)`, `Num.clamp(_,_)`

Previously this was an Undefined Behavior

* also validate args for pow, atan2, add tests, fix error messages

Co-authored-by: ruby0x1 <ruby0x1@pm.me>
2021-04-07 22:04:58 -07:00
4847b37789 minor cleanup 2021-04-07 21:56:19 -07:00
28da4b449c Add Num.[max/min]SafeInteger (#874) 2021-04-07 21:45:00 -07:00
61cc6cb745 more minor doc fixes 2021-04-07 21:37:12 -07:00
0ab930c9c2 reorder some docs a bit, fix missing constructor 2021-04-07 21:21:50 -07:00
d38c047a5a documentation revisions and missing pieces 2021-04-07 20:54:18 -07:00
0be504832e fix code documentation 2021-04-07 18:36:11 -07:00
4cd374e1a7 fix amalgamation documentation 2021-04-06 19:59:42 -07:00
5e60bbf0cf document string range indexing for substring 2021-04-06 19:56:28 -07:00
197c0ff4f9 fix loadModuleFn description in header 2021-04-06 19:49:40 -07:00
e3c76a3e76 Raw strings now ignore whitespace on both ends for consistency and clarity
added more tests, updated documentation
2021-04-04 22:28:57 -07:00
8304fd5ecc docs; strings; fix formatting for example 2021-04-04 14:02:07 -07:00
ea684194db try; update for testing latest 2021-04-04 13:54:58 -07:00
981ea4adf1 Add raw string literals
Also document + test multi line literals.
2021-04-04 13:52:32 -07:00
345f919e26 make WREN_API_DLLEXPORT required, fixes statically linked versions
-_-
2021-04-04 13:29:32 -07:00
853f5a3414 fix link in fiber page 2021-04-04 12:31:45 -07:00
11bea3ca01 Add documentation for Fiber.transfer methods (#949) 2021-04-04 12:20:15 -07:00
33ab8be7e3 fix possibility of having no reallocate function (#954)
Before, if a config was provided it was expected to have a reallocate function, now it can remain null and the default will be used.
2021-04-04 11:24:48 -07:00
a501fba4bb add WREN_API declaration for proper symbol export
Brought up by @Orcolom

Detected for MSVC or similar and can be explicitly activated by defining WREN_API_DLLEXPORT (or manually defining WREN_API to __declspec( dllexport ) before include).

Can be disabled by using a blank `#define WREN_API` before include.

Note: to use the import variant, `#define WREN_API __declspec(dllimport)` before including the wren header.
2021-04-04 11:18:40 -07:00
615a6aa208 try; fix random and meta properly 2021-04-03 22:09:19 -07:00
94e835cdd6 minor clean up of try readme 2021-04-03 22:02:13 -07:00