Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions crates/lsh/definitions/powershell.lsh
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,35 @@ pub fn powershell() {
} else if /'/ {
loop {
yield string;
if /\\./ {}
else if /'/ { yield string; break; }
if /'/ { yield string; break; }
await input;
}
} else if /@"/ {
} else if /@'\s*$/ {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this avoids marking invalid ones as invalid, but it does still reject them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it falls through to the normal string case later, which gobbles until it gets a ')

yield string;
loop {
if /.*/ {}
yield string;
if /\\./ {}
else if /"@/ { yield string; break; }
await input;
if /'@/ {
yield string;
break;
}
}
} else if /@"\s*$/ {
yield string;
loop {
if /.*/ {}
yield string;
await input;
if /"@/ {
yield string;
break;
}
}
} else if /"/ {
loop {
yield string;
if /\\./ {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, woops lol

if /`./ {}
else if /"/ { yield string; break; }
await input;
}
Expand Down
Loading