repo
stringclasses
341 values
file_path
stringlengths
29
173
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.66M
tokens
int64
2
598k
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-multi-line-string-6.luau
luau
.luau
local foo = "bar\ baz"
8
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-multi-line-string-7.luau
luau
.luau
local a = [=[[%s]]=]
8
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-multi-line-string-8.luau
luau
.luau
local x = [=[\v<((do|load)file|require)\s*\(?['"]\zs[^'"]+\ze['"]]=]
31
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-negative-numbers.luau
luau
.luau
local foo = x-1 local foo = x -1 print(1+-3)
20
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-numbers-1.luau
luau
.luau
_ = 0x02
7
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-numeric-for-loop.luau
luau
.luau
for index = 1, 10 do call(index) end for _ = start, final do end for _ = 1, 10, 2 do end
36
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-paren-expressions.luau
luau
.luau
local x = 1 + (2 - 3)
12
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-repeat-until.luau
luau
.luau
repeat call() until condition
6
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-return-break.luau
luau
.luau
do return 1 end do break end return call()
17
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-semicolons-1.luau
luau
.luau
local x = 1; x = x + 1
12
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-semicolons-2.luau
luau
.luau
local x = 1 return x;
9
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-shebang.luau
luau
.luau
#!/usr/bin/env lua print("Hello world");
11
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-1.luau
luau
.luau
-- hello world -- and doge you too
10
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-2.luau
luau
.luau
call() -- This calls
5
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-3.luau
luau
.luau
-- tab in comment
4
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-4.luau
luau
.luau
--[comment --(comment) --[=comment --
12
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-5.luau
luau
.luau
--`signatures` the value defaults to zero or is ignored if `signatures.length --=== 0`. Whenever possible implementors should make an active decision about
34
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-6.luau
luau
.luau
--随便写点中文
10
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-single-line-comment-7.luau
luau
.luau
local a = 1 --}}封装方便访问的接口==========================================
22
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-strings-escape-newline.luau
luau
.luau
print("foo\ bar")
6
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-strings-escape.luau
luau
.luau
call('\\') call("\\") call({ ["\\"] = "" })
14
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-strings.luau
luau
.luau
call("double") call('single') call("foo\nbar") call("")
16
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructor-1.luau
luau
.luau
local x = { }
5
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructor-2.luau
luau
.luau
local x = {1, 2, 3}
12
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructor-3.luau
luau
.luau
local x = { a = 1, b = 2, c = 3 } local y = { a = 1, b = 2, c = 3, }
40
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructor-4.luau
luau
.luau
local x = { [call()] = 1, }
13
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructor-5.luau
luau
.luau
local x = { [call()] = 1, 2, }
16
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructor-6.luau
luau
.luau
local foo = { bar }
6
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructors-7.luau
luau
.luau
local blacklist = { ["Audio file failed to load (18)."] = true; ["HTTP 0 (HTTP 429 (HTTP/1.1 429 ProvisionedThroughputExceeded))"] = true; ["LoadCharacter can only be called when Player is in the world"] = true; }
65
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-table-constructors-8.luau
luau
.luau
return { ["Noob Attack: Periastron"] = "Noob Attack - Periastron"; ["Noob Attack꞉ Periastron"] = "Noob Attack - Periastron"; }
49
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-trivia-parsing.luau
luau
.luau
local foo = bar -- trailing comment -- leading comment local bar = baz local baz = foo do local foo = bar -- comment local bar = baz end
39
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-unops.luau
luau
.luau
local negativeLiteral = -3 local negativeVariable = -x local notLiteral = not true local notVariable = not x local length = #x
33
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-utf-8.luau
luau
.luau
print("👚 " .. message)
9
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-lua-while.luau
luau
.luau
while condition do call() break end
9
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-compound_assignment.luau
luau
.luau
local x = 1 local y = 2 x += 5 x -= 5 x *= 5 x /= 5 x //= 5 x %= 5 x ^= 5 x += y x -= y x *= y x /= y x //= y x %= y x ^= y local str1 = "Hello, " local str2 = "world!" str1 ..= "world!" str1 ..= str2
103
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-continue.luau
luau
.luau
-- Very important loop here while true do continue end continue() local continue = 4
22
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-decimal_seperators.luau
luau
.luau
local num1 = 1_048_576 local num2 = 0xFFFF_FFFF local num3 = 0b_0101_0101 local num4 = 1_523_423.132_452_312 local num5 = 1e512_412 local num6 = 1e-512_412
74
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-floor_division.luau
luau
.luau
local x = 1 // 2
9
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-generic_functions.luau
luau
.luau
--!strict function _foo<x, y>() end local function _bar<x>() end export type Foo0 = { bar: <T>( a: T, b: nil | number | boolean ) -> T, } local _baz export type Foo1 = { bar: <T>( a: T, b: nil | number | boolean ) -> ((arg0: T) -> ())?, } _baz = function<T>(a: T, b: number | boolean | nil): nil | T r...
121
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-if_expression.luau
luau
.luau
local x = if foo then foo.x else 5 local y = (if x then x.indices else create()):update(if shouldUpdate then information else defaults) local z = (if bar then foo.y else 5) :: number local a = if foo then foo.x elseif bar then bar.x else 5 local b = if foo then if bar then bar else foo else 5 local c = if foo then (fo...
128
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-named_function_arg_types.luau
luau
.luau
type MyCallbackType = (cost: number, name: string) -> string local cb: (amount: number) -> number local function foo(cb: (name: string) -> ()) end local function bar(x: (number)?): (baz: string) -> string end local function bar(x: (number)?): (baz: string) -> ((names: Array<string>) -> ...any) end
87
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-shorthand_array_type.luau
luau
.luau
type Array<T> = { T } type Array<T> = { [number]: T }
19
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-string_interpolation_base.luau
luau
.luau
x(`simple`) x(`hello {"world"}`) x(`1{2}3{"4"}5`) x(`1{`2{"3"}`}`)
34
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-string_interpolation_conformance.luau
luau
.luau
local function assertEq(left, right) assert(typeof(left) == "string", "left is a " .. typeof(left)) assert(typeof(right) == "string", "right is a " .. typeof(right)) if left ~= right then error(string.format("%q ~= %q", left, right)) end end assertEq(`hello {"world"}`, "hello world") assertEq(`Welcome {"to"} {"...
568
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types.luau
luau
.luau
--!strict local _fn3 type Identity<T> = T type Array<T> = { [number]: T } type Map<K, V> = { [K]: V } type Function<T> = (...any) -> ...T type Object = { x: number, y: number } type Typeof = typeof(2 + 2 + _fn3()) type FetchResult = "alice" | "mallet" type Element = { ["$$typeof"]: number } type Callback1 = (string) -...
401
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_chained_optionals.luau
luau
.luau
type Config = { option1: string??, -- you probably need it once in a while option2: string???, -- once a year option3: string?????? -- once in your life! }
47
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_exported.luau
luau
.luau
type Foo = { bar: any } export type Baz = { foo: any }
17
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_generic.luau
luau
.luau
type Array<T> = { T } local x: Array<Array<number>>
15
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_generic_declaration.luau
luau
.luau
--!strict type Foo<T..., U...> = (U...) -> T... type Bar<U, T...> = nil type Function<Args... = ...any, Return... = ()> = (Args...) -> Return... type Baz<U = string, T... = (string, number)> = nil type Indexed<T...> = module.Indexed<T...>
78
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_generic_no_parameters.luau
luau
.luau
type Bar = Foo<> type Baz = module.Foo<>
12
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_indexable.luau
luau
.luau
local x: module.Foo = nil local x: module.Array<string> = { "bar" } local x: module.Foo | string = "bar" local x: module.Foo? = nil local x: module.Foo<...string> = nil
56
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_loops.luau
luau
.luau
for i, v: string in pairs() do end for i: number = 1, 10, 2 do end
29
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_nested_array.luau
luau
.luau
type Foo = { { string } } type Foo = { {Name: string, Foo: number} }
22
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_packs.luau
luau
.luau
--!strict function _foo<T...>(param: () -> T...) end type Foo<T...> = () -> T... function _bar<T...>(...: T...) end type A<Z, P...> = {} type C<S...> = A<number, S...> -- with a generic type pack type B = A<number, ...string> -- with a variadic type pack type D = A<number, ()> -- with an empty type pack type Functi...
149
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_parentheses.luau
luau
.luau
--!strict type GField<_crack, __fuzzing> = {} local TypeInfo = {} function TypeInfo.new( getFieldDefFn: (() -> GField<any, any>?)? ) end export type Thunk<T> = (() -> T) | T export type PromiseLike<T> = { andThen: ( ((T) -> T)? | (PromiseLike<T>)?, -- resolve ((any) -> () | Promis...
206
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_semicolon_delimeter.luau
luau
.luau
type Foo = { bar: number; baz: number; }
14
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-types_variadic.luau
luau
.luau
--!strict type Foo = (...number) -> () type Baz = (string, ...Foo) -> ...Foo type Bar = (...number) -> (string, ...number) -> ...any type Boom = (..."hit" | "miss") -> (string, ...("critical" | "weak" | "normal")) -> ...("dead" | "alive") function _bar(...: number): ...number | string end local f: Boom = function(......
181
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/full-moon-luau-z-escape-string.luau
luau
.luau
print("testing \z twelve") print("Hello \ World")
16
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-1.luau
luau
.luau
local function returnsComplexType() return {} :: { [string]: { number } } end -- Key and [1] both have incorrect highlighting type Inner = typeof(returnsComplexType().Key[1]) -- This has correct highlighting local inner = returnsComplexType().Key[1]
60
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-10.luau
luau
.luau
if test.type ~= "value" then end
10
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-11-multiline-type-declaration.luau
luau
.luau
type Foo = | string | number export type Bar = string | number | boolean type WithComments = -- leading comment | string -- middle comment | number type SingleLine = string | number type Qualified = Foo.Bar | Baz.Qux type WithTable = | { field: string } | number ...
177
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-13-comment-code-block-syntax-error.luau
luau
.luau
local function before() return true end --[[ ```lua pcall(function() end ``` ]] local function after() return true end
34
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-2.luau
luau
.luau
export type A = { LOL: "yes", } local a: xd.Something<{ transparency: typeof(React.createBinding(0)) }> = function() end local c: xd.Something<{ transparency: typeof(React.createBinding(0)), -- this comma is the reason why it diess!! }> = function() -- it dies local a = "hello world" end
82
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-24.luau
luau
.luau
local a = tonumber("1")::number * 1000
14
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-3.luau
luau
.luau
local numbers = {} for k, v in numbers :: any do print(k, v) end
21
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-5.luau
luau
.luau
print(`{ {} }`) print(`{ foo({}).bar }`)
15
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/issue-6.luau
luau
.luau
local x: any x.foo = 20 local function func(header: typeof(Instance.new("Humanoid"))) end local y: any y.foo = 10
36
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/markdown-luau-language.luau
luau
.luau
--[[ ```luau local abc: number = 1 print(abc) ``` ]] --[[ ```lua local abc: number = 1 print(abc) ``` ]]
41
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/metamethods.luau
luau
.luau
function Foo:__index() end function Foo:__iter() end
16
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/multiline-type-cast.luau
luau
.luau
local x = y :: string | number local a = b :: Foo & Bar
22
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/nested-type-declaration.luau
luau
.luau
-- Positive: nested type declarations if true then type Foo = string end do export type Bar = number end while true do type Callback = (string) -> number end -- Positive: top-level (must not regress) type TopLevel = boolean -- Positive: nested type function do export type function Identity(t) en...
131
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/primitives.luau
luau
.luau
local test_nil: nil local test_string: string local test_number: number local test_boolean: boolean local test_thread: thread local test_vector: vector local test_buffer: buffer local test_unknown: unknown local test_never: never local test_any: any local function test( test_nil: nil, test_string: string, ...
198
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/read-write-type-properties.luau
luau
.luau
type Test = { read readonly_property: string, write writeonly_property: string, property: string, }
25
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-ambiguous-syntax.lua.luau
luau
.luau
local baz = foo(bar); (foo and x or y)(bar) function foobar() local baz = foo(bar); (baz and x or y)(bar) end
36
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-anonymous-function.lua.luau
luau
.luau
local foo = function(bar, baz) print(foo) end call(function(x,y) local x = test end)
24
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-assignment.lua.luau
luau
.luau
local foo = 'bar' local bar , baz = 1 , 2
27
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-block-empty-lines.lua.luau
luau
.luau
function foo() local x = 1 return true end function bar() return end do -- comment local x = 1 local foo = bar -- comment end
43
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments-buffer.lua.luau
luau
.luau
local foo_result = foo( --a comment "oof" ) local expr_result = 1 + 2 + 3 + 4 + 5 --a comment + 6 + 6 + 8 print"text" --a comment foo{bar = baz} -- comment for foo, -- test bar in next, -- comment value do print("test", -- comment "foo" ) end if code == 9 -- \t or code == 32 -- <space> then print(code...
134
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments-function-args.lua.luau
luau
.luau
foo( -- comment baz ) foo( baz, -- comment bar ) foo ( baz, -- comment bar ) foo(baz, bar -- comment ) foo(baz, bar) -- comment foo( -- comment baz, bar )
61
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments-function-params.lua.luau
luau
.luau
function sayHello( name, -- YourName foo,--baz greeting -- Message ) return greeting .. ", " .. name end
32
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments-indented-block.lua.luau
luau
.luau
function foo() local x = 1 local y = 1 -- comment end if foo then local x = 1 -- comment end
39
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments-keep-multiline.lua.luau
luau
.luau
if this -- foobar then elseif foobar or code == 10 -- \n then pos = 1 lexer.line = 1 lexer.lineStart = pos - 1 end local function coerceToMap(mapLike) return instanceOf(mapLike, Map) and mapLike -- ROBLOX: order is preservered or Map.new(Object.entries(mapLike)) -- ROBLOX: order is not preserved end if -- com...
191
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments-multiline-expression.lua.luau
luau
.luau
local val = 1 + 2+ 1 -- add foo = bar or #baz -- test local foo = bar or (baz and foo) -- test -- Stop Movement if -- Moved for at least 0.1 seconds ((tick() - Player.PlayerDataLocal.IsRunningTimeStamp.Value) > 0.1) and -- Speed is less than threshold (Utility.Vec3XZLengthSquared(Player.Character.PrimaryPart.Ve...
124
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-comments.lua.luau
luau
.luau
--[[Testing this]] local function foo(bar, baz) print(bar,baz) end --this is a nice function local test = {}--this comment should stay local y = foo -- comment line 1 -- comment line 2, should not be split from above comment local x = test
63
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-complex-args.lua.luau
luau
.luau
React.createElement("span", { key = id }, React.createElement(Consumer, nil, function() return React.createElement("span", nil, "inner") end), React.createElement("span", nil, "outer"))
42
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-condition-operator-precedence.lua.luau
luau
.luau
local instance = someReallyLongConditionExtremelyLongSoLongYourMindWillMelt and someReallyLongCondition and someOtherReallyLongCondition or somethingElse
35
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-condition-parentheses.lua.luau
luau
.luau
if (foo) then print("true") elseif (bar) then print("false") end while (foo) do print("true") end repeat print("yes") until (foo)
44
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-context-long-lines.lua.luau
luau
.luau
do local region = Region3.new(part.Position - (0.5 * part.Size), part.Position + (0.5 * part.Size)) do do return function(...) callback(LOG_FORMAT:format(os.date("%H:%M:%S"), key, level, fmt.fmt(...))) end end end self.digits = math.ceil(math.log10(math.max(math.abs(self.props.maxValue), math.abs(se...
147
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-do-block.lua.luau
luau
.luau
do local x = 5 end
7
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-double-unary-minus.lua.luau
luau
.luau
local x = -(-foo) local y = - -foo local z1 = -(-foo) -- bar local z2 = - -foo -- baz
34
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-empty-function-2.lua.luau
luau
.luau
local function noop() -- comment end function noop() -- comment end call(function() -- comment end)
27
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-empty-function.lua.luau
luau
.luau
local function noop() end function noop() end call(function() end)
16
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-eof-1.lua.luau
luau
.luau
local x = 1
6
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-eof-2.lua.luau
luau
.luau
local x = 1 -- this is a comment
11
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-eof-3.lua.luau
luau
.luau
local x = 1 -- this is a comment
12
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-excess-parentheses.lua.luau
luau
.luau
local x something((x)) local x = (1 + 2) * 3 local y = ((1) * 3) local z = (...) == nil and foo or bar local foo = not (bar and baz) local bar = (#bar) and baz local cond = condition and (not object or object.Value == y) local baz = (-4 + 3) * 2 ({}):foo(); ("hello"):format() function x() return 1, 2 end print(x()...
174
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-function-call-2.lua.luau
luau
.luau
local App = Roact.createElement("Frame", { Size = UDim2.new(0,0,0,0), Position = UDim2.new(0,0,0,0) }, { Child1 = Roact.createElement("TextLabel", { Text = "foo", AnchorPoint = Vector2.new(0, 0), -- comment foo = bar }), Child2 = Roact.createElement("TextLabel", { Text = "foo", AnchorPoint = Vector2.new...
192
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-function-call-3.lua.luau
luau
.luau
setmetatable({ _words = words, _morewords = words, _evenmorewords = words, _words = words, _morewords = words, _evenmorewords = words, }, Class) foo({ foo = bar, }, baz, { bar = baz, }) Roact.createElement("Frame", { foo = bar, bar = baz, }, self.props[Roact.Children])
82
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-function-call-4.lua.luau
luau
.luau
Roact.createElement("ImageLabel", { Size = UDim2.new( 0, TextService:GetTextSize(self.props.PhysicalTool.Name, 16, Enum.Font.SourceSansBold, Vector2.new(100000, 100000)).X + 10, 0, 20 ), })
71
ryanlua/roblox-studio-vscode-theme
ryanlua-roblox-studio-vscode-theme-3690651/tests/stylua-lua-function-call-6.lua.luau
luau
.luau
-- hug table braces with parentheses print({ foo_variable = "some long value", foo_variable = "some long value", foo_variable = "some long value", foo_variable = "some long value", }) print({ foo_variable = "somenge", foo_variable = "malue", foo_variable = "alueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" }) -- but no...
109