parser

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Overview

Package parser implements a parser for T-SQL.

Index

Constants

View Source
const (
	LOWEST       int
	OR_PREC      // OR
	AND_PREC     // AND
	NOT_PREC     // NOT
	COMPARE      // =, <>, <, >, <=, >=
	BETWEEN_PREC // BETWEEN, IN, LIKE
	BITOR        // |
	BITXOR       // ^
	BITAND       // &
	SHIFT        // <<, >>
	SUM          // +, -
	PRODUCT      // *, /, %
	PREFIX       // -X, ~X
	CALL         // function()
	INDEX        // table.column
)

Operator precedence levels

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser represents a T-SQL parser.

func New

func New(l *lexer.Lexer) *Parser

New creates a new Parser.

func (*Parser) Errors

func (p *Parser) Errors() []string

Errors returns the parser errors.

func (*Parser) ParseProgram

func (p *Parser) ParseProgram() *ast.Program

ParseProgram parses the entire program.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL