1801 Commits

Author SHA1 Message Date
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
3c0fe12102 try; add try implementation + details, update to latest main branch 2021-04-03 21:58:31 -07:00
ecce1f6be9 List; add remove(value)
Having to encode this behaviour at every call site is tedious. It makes a lot of sense to just have the method available on list itself.
2021-04-03 19:55:42 -07:00
4d1d0d972e rename some test functions that clash with libc (#936)
* rename some test functions that clash with cosmopolitan libc
2021-03-07 16:38:29 -08:00
5b290cacc5 Tentative fix for Num class docs issue on the wren.io site. (#932) 2021-03-02 11:11:21 -08:00
dfa7d9c895 doc/site/functions Fn.new() clarification [minor] (#931)
In the description of Fn.new():
- Fix a typo
- Add the referent of "that" for clarity
2021-03-02 09:27:23 -08:00
2bc895c26d added documentation on * operator for strings (#930) 2021-02-18 19:16:09 -08:00
208bbc02a5 revert #826
3a06580b89
2021-02-13 10:17:59 -08:00
9dfbc021a0 wren/compiler: Store value in the correct token. (#923) 2021-02-06 07:53:39 -08:00
ae6fdb3da7 Add docs for newly merged (#905) Num.cbrt method (#918) 2021-01-31 10:22:19 -08:00
3a06580b89 Don't use strtoll() with explicit base to parse hex, instead use strtod() (#826)
`strtod()` automatically recognizes the `0x` and converts to hex

This has two advantages:
 1. Simplify code (no need of argument `isHex` to `makeNumber`, no `if`)
 2. Allow numbers larger than `long long` if they fit into `double`
2021-01-30 21:44:52 -08:00
0fa16a20ec Fix deprecated Python timing in benchmark & give more error info. (#844)
- Note: process_time gives CPU time used and perf_counter is absolute time used.
- Looks to have noise of about 1-2%.
2021-01-30 21:40:20 -08:00
af5227f03b Mention List.[Range] in the docs (#870) 2021-01-30 21:34:27 -08:00
1720a20979 In List.+(other), other should be an iterable, list is not required (#872)
We're iterating over it but do not check it's actually a list:

cb51d61a64/src/vm/wren_core.wren (L363-L369)
2021-01-30 21:33:54 -08:00
4ac41c36db Added hexadecimal number literals example (#876) 2021-01-30 21:32:42 -08:00
79000a320e Proposed additions to Map class docs. (#888)
The Map class documentation is missing a few details which I think should ideally be covered. The proposed changes should be self evident.
2021-01-30 21:22:54 -08:00
f1225ef7dd Add docs for remaining bitwise operators (#887)
I mentioned in #881 that the `^`, `<<` and `>>' bitwise operators were currently undocumented so this fixes that.

Have also added a note to Num.tau to clarify that this means `twice pi `and is not the golden ratio for which `tau` is sometimes used as an alternative to `phi`.
2021-01-30 21:21:59 -08:00
57bebd41ca Adds documentation for System.writeAll method (#886) 2021-01-30 21:21:33 -08:00
0f8b44e61b Fix undocumented methods in the Num class ( #879) (#884) 2021-01-30 21:21:18 -08:00
96eb68bae3 Fix undocumented methods in the List class ( #878) (#883)
Also noted that the ```add``` method returns the added item.
2021-01-30 21:21:07 -08:00
16ddbb66f8 Add docs for Scheduler class (#902)
I think it's time we had a go at this.
2021-01-30 21:15:56 -08:00
3ceb029df9 Add docs for Timer class (#903)
Another class that has remained undocumented for a long time.
2021-01-30 21:15:22 -08:00
ce599259bc wren/core: Add Num::cbrt. (#905) 2021-01-30 21:13:58 -08:00
97bc340737 Happy new year! (#904) 2020-12-31 18:52:09 -08:00
81aff84415 Fix incorrect heading (#871)
There was a space instead of `#`
2020-12-13 20:48:18 -08:00
cb51d61a64 fix unmarked compiler value causing memory issues
https://github.com/wren-lang/wren/issues/869
2020-12-07 12:34:31 -08:00
9da1e265df Remove unused field skipNewlines (#858) 2020-12-03 19:53:26 -08:00
9fbfe6a419 Add slashes before split comment line (#861) 2020-12-03 19:52:17 -08:00
3c07611b0a Syntax-highlight continue keyword (#864) 2020-12-03 19:51:48 -08:00
aac6296317 Add continue to the list of reserved words (#865) 2020-12-03 19:50:56 -08:00
a294da7974 Only the method name should be bold, not including the parameters list (#862) 2020-12-03 19:50:21 -08:00
c572345c3c &infinity; is not a valid HTML symbol - use &infin; (#863) 2020-12-03 19:48:49 -08:00
da3a3f0e0e Update draft 0.4.0 changelog 2020-12-03 14:32:53 -08:00