diff --git a/classes.html b/classes.html index 790cf227..f442ba2b 100644 --- a/classes.html +++ b/classes.html @@ -4,7 +4,7 @@ Classes – Wren - + @@ -263,6 +263,7 @@ class using is when you declare the class:

This declares a new class Pegasus that inherits from Unicorn.

+

Note that you should not create classes that inherit from the built-in types (Bool, Num, String, Range, List). The built-in types expect their internal bit representation to be very specific and get horribly confused when you invoke one of the inherited built-in methods on the derived type.

The metaclass hierarchy does not parallel the regular class hierarchy. So, if Pegasus inherits from Unicorn, Pegasus's metaclass will not inherit from Unicorn's metaclass. In more prosaic terms, this means that static methods diff --git a/contributing.html b/contributing.html index 2a429c04..2d43ac6f 100644 --- a/contributing.html +++ b/contributing.html @@ -4,7 +4,7 @@ Contributing – Wren - + diff --git a/control-flow.html b/control-flow.html index 30d30dc1..bc557d1d 100644 --- a/control-flow.html +++ b/control-flow.html @@ -4,7 +4,7 @@ Control Flow – Wren - + diff --git a/core-library.html b/core-library.html index 57c35f8b..1aae2550 100644 --- a/core-library.html +++ b/core-library.html @@ -4,7 +4,7 @@ Core Library – Wren - + @@ -227,19 +227,33 @@ unsigned values. The result is then a 32-bit unsigned number where each bit is

...(other) operator #

TODO

String Class #

-

TODO

+

A string of Unicode code points stored in UTF-8.

contains(other) #

-

TODO

+

Checks if other is a substring of the string.

+

It is a runtime error if other is not a string.

count #

-

TODO

+

Returns the length of the string.

+

endsWith(suffix) #

+

Checks if the string ends with suffix.

+

It is a runtime error if suffix is not a string.

+

indexOf(search) #

+

Returns the index of search in the string or -1 if search is not a +substring of the string.

+

It is a runtime error if search is not a string.

+

startsWith(prefix) #

+

Checks if the string starts with prefix.

+

It is a runtime error if prefix is not a string.

+(other) operator #

-

TODO

+

Returns a new string that concatenates this string and other.

+

It is a runtime error if other is not a string.

==(other) operator #

-

TODO

+

Checks if the string is equal to other.

!=(other) operator #

-

TODO

+

Check if the string is not equal to other.

[index] operator #

-

TODO

+

Returns a one character string of the value at index.

+

It is a runtime error if index is greater than the length of the string.

+

Note: This does not currently handle UTF-8 characters correctly.

List Class #

TODO

add(item) #

@@ -248,6 +262,8 @@ unsigned values. The result is then a 32-bit unsigned number where each bit is

Removes all items from the list.

count #

The number of items in the list.

+

all(predicate) #

+

Tests whether all the elements in the list pass the predicate.

insert(item, index) #

TODO

iterate(iterator), iteratorValue(iterator) #

diff --git a/embedding-api.html b/embedding-api.html index 3c4d7be3..481e8e77 100644 --- a/embedding-api.html +++ b/embedding-api.html @@ -4,7 +4,7 @@ Embedding API – Wren - + diff --git a/error-handling.html b/error-handling.html index 8c28bd44..2a2ed38b 100644 --- a/error-handling.html +++ b/error-handling.html @@ -4,7 +4,7 @@ Error Handling – Wren - + diff --git a/expressions.html b/expressions.html index dc609c05..be17433c 100644 --- a/expressions.html +++ b/expressions.html @@ -4,7 +4,7 @@ Expressions – Wren - + @@ -248,7 +248,7 @@ argument is evaluated and returned:

The conditional operator ?: #

Also known as the "ternary" operator since it takes three arguments, Wren has the little "if statement in the form of an expression" you know and love from C -and its bretheren.

+and its brethren.

IO.print(1 != 2 ? "math is sane" : "math is not sane!")
 
diff --git a/fibers.html b/fibers.html index 9b43854c..4662c5a9 100644 --- a/fibers.html +++ b/fibers.html @@ -4,7 +4,7 @@ Fibers – Wren - + diff --git a/functions.html b/functions.html index b6bc640a..c77edf06 100644 --- a/functions.html +++ b/functions.html @@ -4,7 +4,7 @@ Functions – Wren - + diff --git a/getting-started.html b/getting-started.html index 4cf529d3..772e3379 100644 --- a/getting-started.html +++ b/getting-started.html @@ -4,7 +4,7 @@ Getting Started – Wren - + @@ -71,7 +71,7 @@ Mac and you can rock a command line, it's just:

hack on Wren. That's what I develop in. It builds fine from there but may not have the exact same build settings. The Makefile is the canonical way to compile it.

-

For our Windows bretheren, there's still a little work to be done. Ideally, the +

For our Windows brethren, there's still a little work to be done. Ideally, the repo would include a Visual Studio solution for building Wren. I don't have a Windows machine, but if you do, I would be delighted to take a patch for this.

Interactive mode #

diff --git a/index.html b/index.html index 5e6bc9f5..ca66a8a5 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Welcome – Wren - + @@ -100,8 +100,8 @@ a familiar, modern syntax.

  • Wren is a scripting language. Wren is intended for embedding in applications. It has no dependencies, a small standard library, - and an easy-to-use C API. It's written in warning-free - standard C99.

    + and an easy-to-use C API. It compiles cleanly as C99, C++98 + or anything later.

  • If you like the sound of this, give it a try! Even better, you can diff --git a/lists.html b/lists.html index 892a3177..af8db0cb 100644 --- a/lists.html +++ b/lists.html @@ -4,7 +4,7 @@ Lists – Wren - + diff --git a/maps.html b/maps.html index 925f6aea..e3f4c918 100644 --- a/maps.html +++ b/maps.html @@ -4,7 +4,7 @@ Maps – Wren - + diff --git a/performance.html b/performance.html index dff37eab..ef367645 100644 --- a/performance.html +++ b/performance.html @@ -4,7 +4,7 @@ Performance – Wren - + diff --git a/qa.html b/qa.html index 64b87058..cbc661db 100644 --- a/qa.html +++ b/qa.html @@ -4,7 +4,7 @@ Q & A – Wren - + diff --git a/syntax.html b/syntax.html index 5a85102a..c8193ef8 100644 --- a/syntax.html +++ b/syntax.html @@ -4,7 +4,7 @@ Syntax – Wren - + diff --git a/values.html b/values.html index 5b2d2693..9c29c727 100644 --- a/values.html +++ b/values.html @@ -4,7 +4,7 @@ Values – Wren - + diff --git a/variables.html b/variables.html index c2d1dc34..c5a542fe 100644 --- a/variables.html +++ b/variables.html @@ -4,7 +4,7 @@ Variables – Wren - +