MCPcopy Create free account
hub / github.com/bytebase/bytebase / ConvertTiDBParserErrorPositionToPosition

Function ConvertTiDBParserErrorPositionToPosition

backend/common/position.go:75–80  ·  view source on GitHub ↗
(line, column int32)

Source from the content-addressed store, hash-verified

73}
74
75func ConvertTiDBParserErrorPositionToPosition(line, column int32) *storepb.Position {
76 return &storepb.Position{
77 Line: max(line, 1),
78 Column: max(column, 1),
79 }
80}
81
82// ConvertANTLRTokenToExclusiveEndPosition converts an ANTLR token position to an exclusive end Position.
83// The end token's line and column (0-based) plus its text are used to calculate where the position

Calls

no outgoing calls