nushell/crates/nu-parser/src
mike fb72da0e82
unify the *-BuiltinVar parser errors (#8944)
# Description

this pr condenses `MutBuiltinVar`, `LetBuiltinVar` and `ConstBuiltinVar`
into one error:
```nu
Error: nu::parser::name_is_builtin_var

  × `in` used as variable name.
   ╭─[entry #69:1:1]
 1 │ let in = 420
   ·     ─┬
   ·      ╰── already a builtin variable
   ╰────
  help: 'in' is the name of a builtin Nushell variable and cannot be used
        as a variable name
```

it also fixes this case which was previously not handled
```nu
let $nu = 420 # this variable would have been 'lost'
```
2023-04-20 19:44:31 +02:00
..
deparse.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
eval.rs allow register to accept a const argument (#8758) 2023-04-08 15:04:57 -05:00
flatten.rs Relax the closure syntax, highlight differently (#8846) 2023-04-12 05:21:52 +12:00
known_external.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
lex.rs Fix strange error on unbalanced curly braces (#8906) 2023-04-17 21:51:10 +12:00
lib.rs Refactor to support multiple parse errors (#8765) 2023-04-07 12:35:45 +12:00
lite_parser.rs Refactor to support multiple parse errors (#8765) 2023-04-07 12:35:45 +12:00
parse_keywords.rs unify the *-BuiltinVar parser errors (#8944) 2023-04-20 19:44:31 +02:00
parse_patterns.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00
parser.rs Hopefully speedup startup (#8913) 2023-04-18 20:19:08 +12:00
type_check.rs improve operation mismatch errors (#8800) 2023-04-08 09:32:44 +12:00