Tokens/Keywords
(token ast.Kind, writeKind WriteKind, pos int)
| 918 | // |
| 919 | |
| 920 | func (p *Printer) writeTokenText(token ast.Kind, writeKind WriteKind, pos int) int { |
| 921 | // !!! emit leading and trailing comments |
| 922 | // !!! emit leading and trailing source maps |
| 923 | tokenString := scanner.TokenToString(token) |
| 924 | p.writeAs(tokenString, writeKind) |
| 925 | if ast.PositionIsSynthesized(pos) { |
| 926 | return pos |
| 927 | } else { |
| 928 | return pos + len(tokenString) |
| 929 | } |
| 930 | } |
| 931 | |
| 932 | func (p *Printer) emitToken(token ast.Kind, pos int, writeKind WriteKind, contextNode *ast.Node) int { |
| 933 | return p.emitTokenEx(token, pos, writeKind, contextNode, tefNone) |
no test coverage detected