Skip to content

Commit

Permalink
🚧 WIP: Update ResponseParser for seq-last-command
Browse files Browse the repository at this point in the history
  • Loading branch information
nevans committed Nov 8, 2024
1 parent ea47e34 commit 6507765
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/net/imap/response_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,18 @@ def sequence_set
end
end

# *note*: seq-last-command will just return the string "$".
#
# sequence-set = (seq-number / seq-range) ["," sequence-set]
# sequence-set =/ seq-last-command
# ; Allow for "result of the last command"
# ; indicator.
# seq-last-command = "$"
def sequence_set_or_atom
str = atom
Patterns::SEQUENCE_SET_STR.match?(str) ? SequenceSet.new(str) : str
end

# ASTRING-CHAR = ATOM-CHAR / resp-specials
# resp-specials = "]"
ASTRING_CHARS_TOKENS = [*ATOM_TOKENS, T_RBRA].freeze
Expand Down

0 comments on commit 6507765

Please sign in to comment.