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

Method finishNodeWithEnd

internal/parser/parser.go:5934–5943  ·  view source on GitHub ↗
(node *ast.Node, pos int, end int)

Source from the content-addressed store, hash-verified

5932}
5933
5934func (p *Parser) finishNodeWithEnd(node *ast.Node, pos int, end int) *ast.Node {
5935 node.Loc = core.NewTextRange(pos, end)
5936 node.Flags |= p.contextFlags
5937 if p.hasParseError {
5938 node.Flags |= ast.NodeFlagsThisNodeHasError
5939 p.hasParseError = false
5940 }
5941 p.overrideParentInImmediateChildren(node)
5942 return node
5943}
5944
5945func (p *Parser) overrideParentInImmediateChildren(node *ast.Node) {
5946 p.currentParent = node

Callers 10

finishNodeMethod · 0.95
makeNewCastMethod · 0.95
parseTagCommentsMethod · 0.95
parseJSDocLinkMethod · 0.95
parseTypedefTagMethod · 0.95
parseCallbackTagMethod · 0.95
parseOverloadTagMethod · 0.95

Calls 2

NewTextRangeFunction · 0.92

Tested by

no test coverage detected