Skip to content

Commit

Permalink
fixup! Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
faho committed Mar 27, 2024
1 parent b3a8086 commit 228bc14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/reader.rs
Expand Up @@ -4337,7 +4337,7 @@ fn expand_replacer(
))
}

// Extract all the token ranges in \p str, along with whether they are an undecorated command.
// Extract all the token ranges in \p str, along with whether they are a command.
// Tokens containing command substitutions are skipped; this ensures tokens are non-overlapping.
struct PositionedToken {
range: SourceRange,
Expand All @@ -4350,7 +4350,7 @@ fn extract_tokens(s: &wstr) -> Vec<PositionedToken> {
| ParseTreeFlags::LEAVE_UNTERMINATED;
let ast = Ast::parse(s, ast_flags, None);

// Helper to check if a node is the command portion of an undecorated statement.
// Helper to check if a node is the command portion of a decorated statement.
let is_command = |node: &dyn ast::Node| {
let mut cursor = Some(node);
while let Some(cur) = cursor {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/abbrs.rs
Expand Up @@ -131,7 +131,7 @@ fn test_abbreviations() {
// Others should not be.
validate!("of gc", None);

// Others should not be.
// Other decorations generally should be.
validate!("command gc", None, "command git checkout");

// yin/yang expands everywhere.
Expand Down

0 comments on commit 228bc14

Please sign in to comment.