Skip to content

Empty string can now be passed in as an argument to a function / command / etc.

Michael Aaron Murphy requested to merge huntergoldstein:empty_str_args into master

Created by: huntergoldstein

Changes introduced by this pull request:

  • Allow the empty string to be parsed as WordToken::Normal("") by allowing a double quote to be the first char of a WordToken::Normal sequence
  • Added a case where if a WordToken::Normal would be the empty string, replace it with whatever the next token would be
    • This prevents cases like "$FOO" from generating empty tokens due to having a quote immediately before a $
  • Added a regression test for this behavior

Fixes: Closes #345 (closed).

State: Good to go!

Merge request reports