1
0

TODO structure

This commit is contained in:
Jon Michael Aanes 2017-07-24 19:16:29 +02:00
parent 3ea1aa2efe
commit 0250c0f014
2 changed files with 17 additions and 8 deletions

View File

@ -102,19 +102,27 @@ option a bad value.
## TODO ## TODO
I'm looking into implementing following features: Tasks to be done before `pretty` can be called version 1.0.0, in order of
priority:
- Add a dedicated unicode submodule, to handle a bunch of cases. - Depricate `max_depth`, `short_builtins` and `recursion` options.
- Add support for `setmetatable`, and exploring the values accessible through - Add a dedicated unicode submodule, to handle some minor alignment and
it. character escaping issues. `pretty` should escape all malformed unicode
sequences.
- Align numbers towards right for tabular views.
- Add support for `setmetatable`, and exploring values in metatables.
- Provide nice formatting for `cdata` datatype in LuaJIT. - Provide nice formatting for `cdata` datatype in LuaJIT.
- Expand on the comment output in output, for `__tostring` methods, and global - Find a better name than `pretty`.
namespaces like `io` or `math`. - Enhance internal structure some amount. See `TODO` markers in files.
- Attempt to fit output within a predefined width limit. Default to 80.
It would be nice to have the following, but these are secondary:
- Add option for colored output. Primarily syntax highlighting, but also - Add option for colored output. Primarily syntax highlighting, but also
[BlueJ-style](www.bluej.org/about.html) scope highlighting, with some faint [BlueJ-style](www.bluej.org/about.html) scope highlighting, with some faint
background colors. background colors.
- Find a better name than `pretty`. - Expand on the comment output in output, for `__tostring` methods, and global
namespaces like `io` or `math`.
- Fit output within a predefined width limit. Default to 80.
## Alternative pretty printers ## Alternative pretty printers

View File

@ -547,6 +547,7 @@ local KNOWN_OPTIONS = {
_table_addr_comment = { type = 'boolean', default = false, debug = 'debug' }, -- TODO: Maybe automatically display table address when depth = 0? _table_addr_comment = { type = 'boolean', default = false, debug = 'debug' }, -- TODO: Maybe automatically display table address when depth = 0?
indent = { type = 'string', default = ' ' }, indent = { type = 'string', default = ' ' },
max_depth = { type = 'number', default = math.huge }, max_depth = { type = 'number', default = math.huge },
short_builtins = { type = 'boolean', default = false }, -- TODO: Outphase this. Rather automatically use the short versions in places where it would be strange to find the function, like keys, etc. short_builtins = { type = 'boolean', default = false }, -- TODO: Outphase this. Rather automatically use the short versions in places where it would be strange to find the function, like keys, etc.
recursion = { type = 'string', default = 'ignore', accepted = {['ignore'] = true, ['marked'] = true, ['revisit'] = true} }, -- TODO: Completely depricate this option. I do not like it. recursion = { type = 'string', default = 'ignore', accepted = {['ignore'] = true, ['marked'] = true, ['revisit'] = true} }, -- TODO: Completely depricate this option. I do not like it.