leave myself TODOs for the remaining edge cases
This commit is contained in:
@@ -2,6 +2,7 @@ module.exports = grammar({
|
||||
name: 'nixshell',
|
||||
|
||||
rules: {
|
||||
// TODO: allow trailing whitespace on any line
|
||||
source_file: $ => seq($.first_line, repeat($.next_line)),
|
||||
|
||||
first_line: $ => seq($._shebang_open, $._opt_ws, optional(seq($._env, $._ws)), $._nix_shell),
|
||||
@@ -47,6 +48,7 @@ module.exports = grammar({
|
||||
),
|
||||
|
||||
_shebang_open: $ => '#!',
|
||||
// TODO: env accepts flags like `-v` or `--unset=NAME` or `VAR=VALUE` before `nix-shell`,
|
||||
_env: $ => choice(
|
||||
'/usr/bin/env',
|
||||
'/bin/env',
|
||||
|
Reference in New Issue
Block a user