mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:25:07 +00:00
Shell: Parse comments
This commit is contained in:
parent
a862c230b1
commit
1d0d0e9d00
3 changed files with 20 additions and 0 deletions
|
@ -782,6 +782,9 @@ static Vector<String> process_arguments(const Vector<Token>& args)
|
|||
{
|
||||
Vector<String> argv_string;
|
||||
for (auto& arg : args) {
|
||||
if (arg.type == Token::Comment)
|
||||
continue;
|
||||
|
||||
// This will return the text passed in if it wasn't a variable
|
||||
// This lets us just loop over its values
|
||||
auto expanded_parameters = expand_parameters(arg.text);
|
||||
|
@ -863,6 +866,9 @@ static ExitCodeOrContinuationRequest run_command(const StringView& cmd)
|
|||
case Token::Special:
|
||||
dbgprintf("<%s> ", arg.text.characters());
|
||||
break;
|
||||
case Token::Comment:
|
||||
dbgprintf("<%s> ", arg.text.characters());
|
||||
break;
|
||||
}
|
||||
}
|
||||
dbgprintf("\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue