AST represents the root of the Abstract Syntax Tree produced by parsing one or more SQL statements. AST is obtained from the pool via NewAST and must be returned via ReleaseAST when the caller no longer needs it: tree, err := p.ParseFromModelTokens(tokens) if err != nil { return err } defer ast
| 1875 | // SQL() returns the canonical SQL string for all statements joined by ";\n". |
| 1876 | // Span() returns the union of all statement spans for source-location tracking. |
| 1877 | type AST struct { |
| 1878 | Statements []Statement |
| 1879 | Comments []models.Comment // Comments captured during tokenization, preserved during formatting |
| 1880 | } |
| 1881 | |
| 1882 | // TokenLiteral implements Node. Returns an empty string - the AST root has no |
| 1883 | // representative keyword. |
nothing calls this directly
no outgoing calls
no test coverage detected