2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-02-13 12:43:48 +00:00
nushell/crates
Yehuda Katz d07789677f
Clean up lexer ()
* Document the lexer and lightly improve its names

The bulk of this pull request adds a substantial amount of new inline
documentation for the lexer. Along the way, I made a few minor changes
to the names in the lexer, most of which were internal.

The main change that affects other files is renaming `group` to `block`,
since the function is actually parsing a block (a list of groups).

* Further clean up the lexer

- Consolidate the logic of the various token builders into a single type
- Improve and clean up the event-driven BlockParser
- Clean up comment parsing. Comments now contain their original leading
  whitespace as well as trailing whitespace, and know how to move some
  leading whitespace back into the body based on how the lexer decides
  to dedent the comments. This preserves the original whitespace
  information while still making it straight-forward to eliminate leading
  whitespace in help comments.

* Update meta.rs

* WIP

* fix clippy

* remove unwraps

* remove unwraps

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
Co-authored-by: Jonathan Turner <jonathan.d.turner@gmail.com>
2021-02-04 20:20:21 +13:00
..
nu-cli added pow operator, and filesize math () 2021-01-29 07:44:02 -06:00
nu-command Clean up lexer () 2021-02-04 20:20:21 +13:00
nu-data standardize on how to get file size () 2021-02-03 07:19:38 -06:00
nu-engine add $nothing and tests () 2021-02-02 19:23:12 +13:00
nu-errors allow str from to convert more things to string () 2021-01-29 07:43:35 -06:00
nu-json Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu-parser Clean up lexer () 2021-02-04 20:20:21 +13:00
nu-plugin Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu-protocol Value helpers () 2021-02-03 15:06:11 +13:00
nu-source Clean up lexer () 2021-02-04 20:20:21 +13:00
nu-stream Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu-table Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu-test-support Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu-value-ext Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_binaryview Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_chart Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_fetch Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_from_bson Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_from_sqlite Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_inc Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_match Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_post Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_ps update sysinfo due to breaking change with get_version () 2021-01-30 12:21:32 -06:00
nu_plugin_s3 Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_selector Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_start Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_sys update sysinfo due to breaking change with get_version () 2021-01-30 12:21:32 -06:00
nu_plugin_textview Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_to_bson Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_to_sqlite Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_tree Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
nu_plugin_xpath Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00