Arseny Kapoulkine
cfc7aa9cf7
Forgot to fix the grammar comment
2022-08-23 11:34:37 -07:00
Arseny Kapoulkine
fcc5ca1cf1
Remove support for f arg
for now, RFC update incoming
2022-08-23 11:32:35 -07:00
Arseny Kapoulkine
1be19b5248
Switch to std::unique_ptr, no need for refcounting
2022-08-23 11:17:43 -07:00
Arseny Kapoulkine
176e0add87
Update Ast/src/Lexer.cpp
...
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
2022-08-23 11:06:53 -07:00
Kampfkarren
92dec74337
Somehow this just worked and I'm scared
2022-08-22 22:08:06 -07:00
Kampfkarren
008952714e
Only escape for interpolated strings
2022-08-22 21:55:26 -07:00
Kampfkarren
0283d38cb4
Test {{oops}
2022-08-22 21:37:28 -07:00
Kampfkarren
89f407a587
Test sane double brace lexing
2022-08-22 15:50:02 -07:00
Kampfkarren
adbe64fffc
Support unicode escapes
2022-08-22 15:22:28 -07:00
Kampfkarren
0c9cfa9570
= -> this
2022-08-22 14:56:39 -07:00
Kampfkarren
1c172d2884
Merge remote-tracking branch 'upstream/master' into string-interpolation
2022-08-22 14:55:09 -07:00
Kampfkarren
2781709ea9
Uncomment test (that works)
2022-08-22 14:43:11 -07:00
Kampfkarren
486c9264f1
Optimization for brace stack with just '{'
2022-08-22 14:42:40 -07:00
Kampfkarren
cbe84bd5ea
More tests
2022-08-22 14:41:27 -07:00
Arseny Kapoulkine
be2769ad14
Sync to upstream/release/541 ( #644 )
...
- Fix autocomplete not suggesting globals defined after the cursor (fixes #622 )
- Improve type checker stability
- Reduce parser C stack consumption which fixes some stack overflow crashes on deeply nested sources
- Improve performance of bit32.extract/replace when width is implied (~3% faster chess)
- Improve performance of bit32.extract when field/width are constants (~10% faster base64)
- Heap dump now annotates thread stacks with local variable/function names
2022-08-18 14:32:08 -07:00
Kampfkarren
83dad7bdf3
Only get one error rather than two
2022-08-17 16:51:17 -07:00
Kampfkarren
3b26ab85a0
Better lexer tostring
2022-08-17 16:34:25 -07:00
Kampfkarren
09b5821768
enum class
2022-08-17 16:33:11 -07:00
Arseny Kapoulkine
0e118b54bb
Update generalized-iteration.md ( #640 )
...
Use a more precise pseudocode snippet for __iter handling which matches runtime semantics
2022-08-17 10:02:08 -07:00
Kampfkarren
8bb8f47325
New lexer method
2022-08-17 09:45:12 -07:00
XmiliaH
4ded555cc5
Prevent overflow in lua_newuserdatadtor ( #639 )
...
In case a large userdata size is passed to lua_newuserdatadtor it might overflow the size resulting in luaU_newudata actually allocating the object without a memory error. This will then result in overwriting part of the metatable pointer of the userdata.
This PR fixes this issue by checking for the overflow and in such cases pass a size value which will cause a memory error in luaU_newudata.
2022-08-16 15:32:48 -07:00
Arseny Kapoulkine
cd26f88d56
Update compatibility.md
...
Add NaN keys from Lua 5.2
2022-08-12 09:10:42 -07:00
Mactavsin
b7d126bf99
Fix lint.md formatting ( #637 )
...
This pull requests fixes a mistake in lint.md file that causes incorrect formatting of the text:
2022-08-12 07:14:38 -07:00
Arseny Kapoulkine
8b390a33aa
Update benchmark.yml
...
Switch to bench.json file so that bench-gcc is the only outlier, as everything else is built with clang.
2022-08-11 14:14:32 -07:00
Arseny Kapoulkine
f7d8ad0774
Sync to upstream/release/540 ( #635 )
...
Also adjust benchmark runs to use config=profile and run clang for all benchmarks + gcc for runtime
2022-08-11 14:01:33 -07:00
Arseny Kapoulkine
2c40b7661c
Update lint.md ( #634 )
...
Add documentation for IntegerParsing and ComparisonPrecedence lints
2022-08-11 08:42:31 -07:00
JohnnyMorganz
e15b0728be
Add autocomplete context to result ( #611 )
...
Closes #599
Not sure if these context definitions are distinct enough, but they work for my use cases.
I repurposed (a majority of) the existing unit tests for this, but if it should live in separate test cases let me know
---
* Add autocomplete context to result
* Update tests
* Remove comments
* Fix expression context issues
2022-08-10 13:04:08 -07:00
Kampfkarren
7a437aad17
Revert lstrlib to upstream/master
2022-08-04 18:17:31 -07:00
Kampfkarren
cce6b98821
Merge remote-tracking branch 'upstream/master' into string-interpolation
2022-08-04 18:15:53 -07:00
Arseny Kapoulkine
1b20fcd43c
Sync to upstream/release/539 ( #625 )
2022-08-04 15:35:33 -07:00
boyned//Kampfkarren
4658219df2
Add %* format specifier ( #619 )
...
RFC: https://github.com/Roblox/luau/pull/165
2022-08-04 07:22:16 -07:00
Arseny Kapoulkine
2c12badb5c
Update RFC status page
2022-08-03 15:40:57 -07:00
Arseny Kapoulkine
4692c55687
Mark never/unknown types RFC as implemented
2022-08-03 15:40:24 -07:00
Arseny Kapoulkine
b39fcc7e77
Mark __len RFC as implemented
2022-08-03 15:38:45 -07:00
Jay Kruer
b204981aca
Add Ctrl-C handling to the REPL ( #537 )
...
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
2022-08-02 09:32:22 -07:00
Arseny Kapoulkine
d3b566c258
Sync to upstream/release/538 ( #616 )
2022-07-28 21:24:07 -07:00
Kampfkarren
08494dc57a
Interpolated strings as args
2022-07-28 18:56:10 -07:00
Kampfkarren
90f7bf6f72
Reserve format capacity
2022-07-28 17:56:28 -07:00
Kampfkarren
d4dce498f7
Test compile
2022-07-28 17:51:51 -07:00
Kampfkarren
acf5c78dcc
LUA_ASSERT in readInterpolatedStringBegin
2022-07-28 17:49:41 -07:00
Kampfkarren
c8d7fd171f
Escape interpolated strings better
2022-07-28 17:45:02 -07:00
Kampfkarren
3683436dbe
Explicit bytecode test
2022-07-28 17:33:10 -07:00
Kampfkarren
ea9d29658c
Remove luaL_reservebuffer
2022-07-28 17:31:31 -07:00
Kampfkarren
7229853372
Remove interpolated string FFlag check
2022-07-28 17:30:38 -07:00
Kampfkarren
e7176f8ebf
Remove commented code
2022-07-28 17:30:08 -07:00
Kampfkarren
856ef34719
string.append
2022-07-28 17:29:54 -07:00
Kampfkarren
bfca408753
Fix line endings on Parser.h
2022-07-28 17:27:07 -07:00
Kampfkarren
9246edd601
Fix lineendings on Parser
2022-07-28 17:26:43 -07:00
Alexander McCord
cb16555608
RFC: Disallow name T
and name(T)
in future syntactic extensions for type annotations ( #589 )
2022-07-28 14:48:17 -07:00
Alexander McCord
185370fa1d
RFC: Update the rules on string interpolation in light of feedback ( #615 )
...
We make four adjustments in this RFC:
1. `{{` is not allowed. This is likely a valid but poor attempt at escaping coming from C#, Rust, or Python.
2. We now allow `` `this` `` with zero interpolating expressions.
3. We now allow `` f `this` `` also.
4. Explicitly say that `` `this` `` and `` `this {that}` `` are not valid type annotation syntax.
2022-07-28 14:48:05 -07:00