Commit 69cfad9
committed
extend const table type humanization
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 }
```1 parent d7e1dec commit 69cfad9
File tree
2 files changed
+44
-2
lines changed- crates/code_analysis/src/db_index/type
2 files changed
+44
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
248 | 288 | | |
249 | 289 | | |
250 | 290 | | |
| |||
0 commit comments