nushell/tests
Yehuda Katz 57af9b5040 Add Range and start Signature support
This commit contains two improvements:

- Support for a Range syntax (and a corresponding Range value)
- Work towards a signature syntax

Implementing the Range syntax resulted in cleaning up how operators in
the core syntax works. There are now two kinds of infix operators

- tight operators (`.` and `..`)
- loose operators

Tight operators may not be interspersed (`$it.left..$it.right` is a
syntax error). Loose operators require whitespace on both sides of the
operator, and can be arbitrarily interspersed. Precedence is left to
right in the core syntax.

Note that delimited syntax (like `( ... )` or `[ ... ]`) is a single
token node in the core syntax. A single token node can be parsed from
beginning to end in a context-free manner.

The rule for `.` is `<token node>.<member>`. The rule for `..` is
`<token node>..<token node>`.

Loose operators all have the same syntactic rule: `<token
node><space><loose op><space><token node>`.

The second aspect of this pull request is the beginning of support for a
signature syntax. Before implementing signatures, a necessary
prerequisite is for the core syntax to support multi-line programs.

That work establishes a few things:

- `;` and newlines are handled in the core grammar, and both count as
  "separators"
- line comments begin with `#` and continue until the end of the line

In this commit, multi-token productions in the core grammar can use
separators interchangably with spaces. However, I think we will
ultimately want a different rule preventing separators from occurring
before an infix operator, so that the end of a line is always
unambiguous. This would avoid gratuitous differences between modules and
repl usage.

We already effectively have this rule, because otherwise `x<newline> |
y` would be a single pipeline, but of course that wouldn't work.
2019-12-11 16:41:07 -08:00
..
fixtures Add from_xlsx for importing excel files 2019-11-17 16:18:41 +13:00
helpers Remove unused Display implementations 2019-11-25 10:07:20 -08:00
command_cd_tests.rs Add Range and start Signature support 2019-12-11 16:41:07 -08:00
command_config_test.rs Stream support (#812) 2019-10-13 17:12:43 +13:00
command_cp_tests.rs Trim trailing whitespace and set it in editorconfig 2019-09-03 02:52:52 +02:00
command_enter_test.rs Cover failure not found files cases. 2019-10-22 08:08:24 -05:00
command_get_tests.rs Clean up feature build flags. 2019-11-22 03:11:36 -05:00
command_ls_tests.rs Move off 'sum' to internal command 'count' for tests. 2019-10-15 05:16:47 -05:00
command_mkdir_tests.rs Readability improvement. 2019-08-29 01:31:56 -05:00
command_mv_tests.rs run rustfmt 2019-09-11 10:36:50 -04:00
command_open_tests.rs --no-edit 2019-11-21 14:22:32 -08:00
command_rm_tests.rs run rustfmt 2019-09-11 10:36:50 -04:00
commands_test.rs Add Range and start Signature support 2019-12-11 16:41:07 -08:00
external_tests.rs run rustfmt 2019-09-11 10:36:50 -04:00
filter_inc_tests.rs run rustfmt 2019-09-11 10:36:50 -04:00
filter_str_tests.rs improve duration print 2019-12-02 11:02:58 -08:00
filter_where_tests.rs Add =~ and !~ operators on strings 2019-11-25 15:06:11 -05:00
filters_test.rs Move str and inc to core plugins 2019-12-10 13:59:13 +13:00
tests.rs Add format command 2019-11-10 13:14:59 +13:00