Skip to content

Conversation

@georgiy-belyanin
Copy link
Contributor

This patch extends the humanized variant of the const table. Previously, every constant table has been displayed as table. This patch makes short constant tables (having full type name no more than 36 symbols length) humanize into preciser types. See the following examples.

-- a is humanized like `{ [1] = "test", [3] = 4 }`
local a = { [1] = 'test', [3] = 4 }
-- b is humanized like `{ name = "Pete", age = 36 }`
local b = { name = 'pete', age = 36 }
-- c is humanized like `{ a = table }`
local c = { a = { very_very_very_very_very_long = 10000 } }
-- d is humanized like `table`
local d = { very_very_very_very_very_long = 10000 }

@georgiy-belyanin georgiy-belyanin force-pushed the humanize-short-const-tables branch from c97bf83 to 69cfad9 Compare January 31, 2025 14:34
@georgiy-belyanin
Copy link
Contributor Author

Force pushed since I've forgotten the changelog. Sorry.

This patch extends the humanized variant of the const table. Previously,
every constant table has been displayed as `table`. This patch makes
short constant tables (having full type name no more than 36 symbols
length) humanize into preciser types. See the following examples.

```lua
-- a is humanized like `{ [1] = "test", [3] = 4 }`
local a = { [1] = 'test', [3] = 4 }
-- b is humanized like `{ name = "Pete", age = 36 }`
local b = { name = 'pete', age = 36 }
-- c is humanized like `{ a = table }`
local c = { a = { very_very_very_very_very_long = 10000 } }
-- d is humanized like `table`
local d = { very_very_very_very_very_long = 10000 }
```
@georgiy-belyanin georgiy-belyanin force-pushed the humanize-short-const-tables branch from 69cfad9 to 966c4bf Compare January 31, 2025 15:18
@CppCXY CppCXY merged commit fd1e7ac into EmmyLuaLs:main Jan 31, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants