DRY and generally reduce code in scanPunctuator function.

Performance impact is negligible.
Minimized the number of skipComment calls