diff --git a/src/char_reader.cr b/src/char_reader.cr index d10b83d..67a1355 100644 --- a/src/char_reader.cr +++ b/src/char_reader.cr @@ -39,6 +39,10 @@ class TopDown::CharReader char end + def previous_assci_char? : Char? + self.source.to_slice[@char_reader.pos - 2]?.try &.chr + end + # Iterates over each *source* character. # # `location` is incremented between each character.