Skip to content

Commit

Permalink
fix: regression in plain ProxyJump
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
ObserverOfTime committed Apr 19, 2024
1 parent d518b25 commit 77450e8
Show file tree
Hide file tree
Showing 5 changed files with 12,579 additions and 12,551 deletions.
16 changes: 9 additions & 7 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = grammar({
extras: _ => [],

conflicts: $ => [
// XXX: conflict in _forward_value[12]
[$._file_string, $._string]
[$._file_string, $._string],
[$._file_string, $._plain_string]
],

inline: $ => [
Expand Down Expand Up @@ -767,17 +767,17 @@ module.exports = grammar({
_proxy_jump: $ => seq(
u.keyword('ProxyJump'),
$._sep,
u.list(',', u.argument($._proxy_jump_value))
u.list(',', $._proxy_jump_value)
),

_proxy_jump_value: $ => choice(
'none',
u.argument('none'),
seq(
optional(seq(
field('user', alias(/[\w+-]+/, $.string)),
field('user', $._plain_string),
'@'
)),
field('host', alias(/[\w.+-]+/, $.string)),
field('host', $._plain_string),
optional(seq(
':',
field('port', $.number)
Expand Down Expand Up @@ -1130,10 +1130,12 @@ module.exports = grammar({
),

_string: $ => choice(
alias(repeat1(/\S/), $.string),
$._plain_string,
seq('"', alias(repeat1(/[^"]/), $.string), '"')
),

_plain_string: $ => alias(repeat1(/\S/), $.string),

_file_pattern: $ => choice(
alias(u.pattern(/\S/, $._file_token), $.pattern),
seq('"', alias(u.pattern(/[^"]/, $._file_token), $.pattern), '"'),
Expand Down
70 changes: 32 additions & 38 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 77450e8

Please sign in to comment.