MCPcopy Create free account
hub / github.com/microsoft/typescript-go / enterToken

Method enterToken

internal/printer/printer.go:6150–6155  ·  view source on GitHub ↗
(token ast.Kind, pos int, contextNode *ast.Node, flags tokenEmitFlags)

Source from the content-addressed store, hash-verified

6148)
6149
6150func (p *Printer) enterToken(token ast.Kind, pos int, contextNode *ast.Node, flags tokenEmitFlags) (printerState, int) {
6151 state := printerState{}
6152 state.commentState, pos = p.emitCommentsBeforeToken(token, pos, contextNode, flags)
6153 state.sourceMapState = p.emitSourceMapsBeforeToken(token, pos, contextNode, flags)
6154 return state, pos
6155}
6156
6157func (p *Printer) exitToken(token ast.Kind, pos int, contextNode *ast.Node, previousState printerState) {
6158 p.emitSourceMapsAfterToken(token, pos, contextNode, previousState.sourceMapState)

Callers 1

emitTokenExMethod · 0.95

Calls 2

Tested by

no test coverage detected