We haven't updated this document in a while and yet there was a fair
amount of performance work, some of which can be documented here.
Note that this is not fully comprehensive in that it excludes a lot of
internal tuning that is difficult to describe other than with "we made
things faster".
Fixes#935:
* String literals that include `\z` escape sequence followed by newline
characters are now correctly highlighted.
* Unescaped backslash (`\`) character at the end of the line no longer
acts like the `\z` escape sequence inside string literals when
highlighting.
- The type list for function declarations does not accept defaults, but
the grammar incorrectly allowed this.
- Allow the empty table type `{}`
- Allow composite types and types surrounded by parentheses (e.g.
`string??`, `(string)`, `(string | number) & boolean`)
---------
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
Originally it was titled "Luau Recap: August 2022" but it got renamed to "Luau Recap: July & August 2022" and we just didn't fix the link here too. Also backports the title change to here too for consistency.
Implements the string interpolation RFC (#165).
Adds the string interpolation as per the RFC.
```lua
local name = "world"
print(`Hello {name}!`) -- Hello world!
```
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
Fix description incorrectly saying that parameter w specifies an upper range. w is actually a width. Proof:
print(bit32.extract(2^32-1, 3, 4)) -- prints 15, not 1.
Also indicate that the position is 0-based, and that the function will error if the selected range exceeds the allowed bounds.
* Recap is ready
* Change the intro format so it shows up in the news section snippet
* Fixed line breaks that were implied
* Update docs/_posts/2022-06-01-luau-recap-may-2022.md
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
* Drop Autocomplete improvements and extend compiler optimization section
In the cross-post to Roblox developer forum, Autocomplete section will be restored, while compiler optimization section can be optionally removed (although it might interest some developers)
* One more optimization
* Update docs/_posts/2022-06-01-luau-recap-may-2022.md
Co-authored-by: dcope-rbx <91100513+dcope-rbx@users.noreply.github.com>
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Co-authored-by: dcope-rbx <91100513+dcope-rbx@users.noreply.github.com>
Update `__pairs` note with `__iter`, change `__len` to unsure as with `__iter` lack of `__len` on tables is the only issue preventing complete user created containers.
Update the typecheck.md page to talk about singleton types and their uses, tagged unions.
As a driveby, improve the documentation on type refinements. And delete the unknown symbols part, this is really dated.
* Update docs/_pages/typecheck.md to fix a typo
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>