Tweak some docs.

This commit is contained in:
Bob Nystrom
2016-01-21 21:38:27 -08:00
parent 39b29ee07a
commit 056ae61493
4 changed files with 56 additions and 49 deletions

View File

@ -4,10 +4,10 @@ Wren is deeply object oriented, so most code consists of invoking methods on
objects, usually something like this:
:::wren
System.print("hello")
System.print("Heyoo!") //> Heyoo!
You have a *receiver* expression (here `System`) followed by a `.`, then a name
(`print`) and an argument list in parentheses (`("hello")`). Multiple arguments
(`print`) and an argument list in parentheses (`("Heyoo!")`). Multiple arguments
are separated by commas:
:::wren
@ -18,7 +18,7 @@ The argument list can also be empty:
:::wren
list.clear()
Semantically, all method calls work like this:
The VM executes a method call like so:
1. Evaluate the receiver and arguments from left to right.
2. Look up the method on the receiver's [class][].