diff --git a/grammar.js b/grammar.js index 00a5ccf..09d8a72 100644 --- a/grammar.js +++ b/grammar.js @@ -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',