currentLocation returns the source location of the current token. Span information is embedded directly in models.TokenWithSpan so no separate position-mapping slice is required.
()
| 125 | // Span information is embedded directly in models.TokenWithSpan so no |
| 126 | // separate position-mapping slice is required. |
| 127 | func (p *Parser) currentLocation() models.Location { |
| 128 | if p.currentPos < len(p.tokens) { |
| 129 | return p.tokens[p.currentPos].Start |
| 130 | } |
| 131 | return models.Location{} |
| 132 | } |
| 133 | |
| 134 | // MaxRecursionDepth defines the maximum allowed recursion depth for parsing operations. |
| 135 | // This prevents stack overflow from deeply nested expressions, CTEs, or other recursive structures. |
no outgoing calls
no test coverage detected