Leonhard Kipp eb3c2c9e76
Add comments to next LiteCommand (#2846)
This commit applied adds comments preceding a command to the LiteCommands new
field `comments`.

This can be usefull for example when defining a function with `def`. Nushell
could pick up the comments and display them when the user types `help my_def_func`.

Example
```shell
def my_echo [arg] { echo $arg }
```
The LiteCommand def will now contain the comments `My echo` and `It's much
better :)`.

The comment is not associated with the next command if there is a (or multiple) newline
between them.
Example
```shell

echo 42
```

This new functionality is similar to DocStrings. One might introduce a special
notation for such DocStrings, so that the parser can differentiate better
between discardable comments and usefull documentation.
2021-01-08 06:14:51 +13:00
..
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-12-09 06:43:46 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2021-01-02 17:24:32 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-31 06:39:01 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-11-22 13:37:16 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-11-22 13:37:16 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00
2020-10-26 19:55:52 +13:00