Commit graph

120 commits

Author SHA1 Message Date
Kampfkarren
92dec74337 Somehow this just worked and I'm scared 2022-08-22 22:08:06 -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
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
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
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
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
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
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
d4dce498f7 Test compile 2022-07-28 17:51:51 -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
e1a229aa80 Fix tests, but introduce a new snaggle 2022-07-27 23:29:57 -07:00
Kampfkarren
cfe339f994 String to make sure interp strings with no expressions are compiled as strings 2022-07-27 22:47:47 -07:00
Kampfkarren
efe3b7ca36 Bespoke error for interpolated string fails 2022-07-27 22:42:37 -07:00
Kampfkarren
63654211c6 Allow interpolated strings without expressions, add TODO test for failing interp strings as types 2022-07-27 22:12:27 -07:00
Kampfkarren
92adca20bf Test constant type interp strings 2022-07-27 18:50:39 -07:00
Kampfkarren
6e97add1ee Support un-interpolated strings 2022-07-27 18:10:06 -07:00
Kampfkarren
8ef45854f7 Add FFlag for %* 2022-07-27 17:59:21 -07:00
Kampfkarren
41fa546a17 Error when given a form 2022-07-27 17:53:15 -07:00
Kampfkarren
77166a3654 Bring back whitespace test in Linter 2022-07-27 17:40:08 -07:00
Kampfkarren
b43fe82465 Better %* 2022-07-27 17:34:16 -07:00
Kampfkarren
dadbd4cd47 FFlag off 2022-07-27 16:47:20 -07:00
Kampfkarren
be781b5083 Fix typechecker 2022-07-27 16:33:20 -07:00
Kampfkarren
11787e8336 Bespoke error for interpolated string after call 2022-07-27 02:25:12 -07:00
Kampfkarren
591192c3e5 Fix location, Transpiler 2022-07-26 23:06:56 -07:00
Kampfkarren
aa9f9c371f Check end brace parse errors 2022-07-26 22:14:28 -07:00
Kampfkarren
c302ea18e6 Fix ScopedFlag include 2022-07-26 21:36:33 -07:00
Kampfkarren
b773f41790 Scoped FFlag for JsonEncoder test 2022-07-26 21:33:02 -07:00
Kampfkarren
8496af7907 JsonEncoder 2022-07-26 21:23:19 -07:00
Kampfkarren
7893ca20bb Linter test 2022-07-26 21:19:15 -07:00
Kampfkarren
38cda27144 A test I haven't made work, Cost branch 2022-07-26 21:04:15 -07:00
Kampfkarren
477cfc4d0d Basic string type 2022-07-26 20:50:46 -07:00
Kampfkarren
12ca7c5bb0 Better error for constant 2022-07-26 19:48:17 -07:00
Kampfkarren
8e409efde8 Use the same error 2022-07-26 19:45:01 -07:00
Kampfkarren
8d0d271cd3 Make interpolated string with no formatting a syntax error 2022-07-26 19:39:54 -07:00
Kampfkarren
f8be1070c3 Make {{ a parse error 2022-07-26 19:30:02 -07:00
Kampfkarren
6cb9054c07 Remove copy paste (though I'm not sure it's much better), start work on {{ parse failure 2022-07-26 19:20:33 -07:00
Kampfkarren
5a9de6ba0a Fix string tests (VS Code was breaking it somehow? Not StyLua) 2022-07-26 18:57:09 -07:00
Kampfkarren
7fbe3a006c Test string shadow 2022-07-26 18:49:50 -07:00