Skip to content

Commit

Permalink
revert: internal commands with spaces (nushell#184)
Browse files Browse the repository at this point in the history
In case we might want to revert nushell#161 as
[discussed](zed-industries/extensions#2068 (comment))
  • Loading branch information
blindFS authored Feb 22, 2025
1 parent 2a153c8 commit ba6db53
Show file tree
Hide file tree
Showing 14 changed files with 302,638 additions and 314,791 deletions.
13 changes: 0 additions & 13 deletions grammar.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
const fs = require("fs");
const internals = fs
.readFileSync("./internal.txt", "utf-8")
.split("\n")
.filter((x) => x.length > 0);

/// <reference types="tree-sitter-cli/dsl" />
// @ts-check
module.exports = grammar({
Expand Down Expand Up @@ -1573,13 +1567,6 @@ function _command_rule(parenthesized) {
choice(
field("head", seq(optional(PUNC().caret), $.cmd_identifier)),
field("head", seq(PUNC().caret, $._stringish)),
field(
"head",
alias(
token(seq(choice(...internals), /[_a-zA-Z-]*/)),
$.cmd_identifier,
),
),
),
repeat(seq(sep, optional($._cmd_arg))),
),
Expand Down
Loading

0 comments on commit ba6db53

Please sign in to comment.