diff options
Diffstat (limited to 'doc/docs/doc/README.md')
| -rwxr-xr-x | doc/docs/doc/README.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/docs/doc/README.md b/doc/docs/doc/README.md index d862777..b5051d4 100755 --- a/doc/docs/doc/README.md +++ b/doc/docs/doc/README.md | |||
| @@ -1588,6 +1588,19 @@ print ok, count, first | |||
| 1588 | 1588 | ||
| 1589 | YueScript is a whitespace significant language. You have to write some code block in the same indent with space **' '** or tab **'\t'** like function body, value list and some control blocks. And expressions containing different whitespaces might mean different things. Tab is treated like 4 space, but it's better not mix the use of spaces and tabs. | 1589 | YueScript is a whitespace significant language. You have to write some code block in the same indent with space **' '** or tab **'\t'** like function body, value list and some control blocks. And expressions containing different whitespaces might mean different things. Tab is treated like 4 space, but it's better not mix the use of spaces and tabs. |
| 1590 | 1590 | ||
| 1591 | ### Statement Separator | ||
| 1592 | |||
| 1593 | A statement normally ends at a line break. You can also use a semicolon `;` to explicitly terminate a statement, which allows writing multiple statements on the same line: | ||
| 1594 | |||
| 1595 | ```moonscript | ||
| 1596 | a = 1; b = 2; print a + b | ||
| 1597 | ``` | ||
| 1598 | <YueDisplay> | ||
| 1599 | <pre> | ||
| 1600 | a = 1; b = 2; print a + b | ||
| 1601 | </pre> | ||
| 1602 | </YueDisplay> | ||
| 1603 | |||
| 1591 | ### Multiline Chaining | 1604 | ### Multiline Chaining |
| 1592 | 1605 | ||
| 1593 | You can write multi-line chaining function calls with a same indent. | 1606 | You can write multi-line chaining function calls with a same indent. |
