Created
July 1, 2018 12:26
-
-
Save jirfag/4e8e56c46f49fb626a61d69f93aeb854 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func (p *printer) addWhitespace(kind ctrlSymbol, text string) { | |
| p.pending = append(p.pending, whitespace{p.lastTok, kind /*text*/}) | |
| switch kind { | |
| case semi: | |
| p.lastTok = _Semi | |
| case newline: | |
| p.lastTok = 0 | |
| // TODO(gri) do we need to handle /*-style comments containing newlines here? | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment