MCPcopy Index your code
hub / github.com/microsoft/typescript-go / emitSourceMapsAfterNode

Method emitSourceMapsAfterNode

internal/printer/printer.go:5896–5913  ·  view source on GitHub ↗
(node *ast.Node, previousState *sourceMapState)

Source from the content-addressed store, hash-verified

5894}
5895
5896func (p *Printer) emitSourceMapsAfterNode(node *ast.Node, previousState *sourceMapState) {
5897 if previousState == nil {
5898 return
5899 }
5900
5901 emitFlags := previousState.emitFlags
5902 loc := previousState.sourceMapRange
5903
5904 if emitFlags&EFNoNestedSourceMaps != 0 {
5905 p.sourceMapsDisabled = false
5906 }
5907
5908 if !ast.IsNotEmittedStatement(node) &&
5909 emitFlags&EFNoTrailingSourceMap == 0 &&
5910 !ast.PositionIsSynthesized(loc.End()) {
5911 p.emitSourcePos(p.sourceMapSource, loc.End())
5912 }
5913}
5914
5915func (p *Printer) emitSourceMapsBeforeToken(token ast.Kind, pos int, contextNode *ast.Node, flags tokenEmitFlags) *sourceMapState {
5916 if !p.shouldEmitTokenSourceMaps(token, pos, contextNode, flags) {

Callers 2

exitNodeMethod · 0.95
exitTokenNodeMethod · 0.95

Calls 4

emitSourcePosMethod · 0.95
IsNotEmittedStatementFunction · 0.92
PositionIsSynthesizedFunction · 0.92
EndMethod · 0.65

Tested by

no test coverage detected