More work on #234:
To be able to correctly deal with single and double quotes and their various nested combinations, I switched the implementation to a single-pass state machine-like approach. To my mind, it is more concise at may be adjusted more easily should we find more edge cases in Xcode.