You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: create.go
    path of file: ./repos/chai/internal/sql/parser
    
    the code of the file until where you have to start completion: package parser

import (
	"fmt"
	"math"

	"github.com/chaisql/chai/internal/database"
	"github.com/chaisql/chai/internal/expr"
	"github.com/chaisql/chai/internal/query/statement"
	"github.com/chaisql/chai/internal/sql/scanner"
	"github.com/chaisql/chai/internal/tree"
)

// parseCreateStatement parses a create string and returns a Statement AST row.
func (p *Parser) parseCreateStatement() (statement.Statement, error) {
	// Parse "CREATE".
	if err := p.ParseTokens(scanner.CREATE); err != nil {
		return nil, err
	}

	tok, pos, lit := p.ScanIgnoreWhitespace()
	switch tok {
	case scanner.TABLE:
		return p.parseCreateTableStatement()
	case scanner.UNIQUE:
		if tok, pos, lit := p.ScanIgnoreWhitespace(); tok != scanner.IND
    
func (p *Parser) parseCreateIndexStatement(unique bool) (*statement.CreateIndexStmt, error) {
	var err error
	var stmt statement.CreateIndexStmt
	stmt.Info.Unique = unique

	// Parse IF NOT EXISTS
	stmt.IfNotExists, err = p.parseOptional(scanner.IF, scanner.NOT, scanner.EXISTS)
	if err != nil {
		return nil, err
	}

	// Parse optional index name
	stmt.Info.IndexName, err = p.parseIdent()
	if err != nil {
		// if IF NOT EXISTS is set, index name is mandatory
		if stmt.IfNotExists {
			return nil, err
		}

		p.Unscan()
	}

	// Parse "ON"
	if err := p.ParseTokens(scanner.ON); err != nil {
		return nil, err
	}

	// Parse table name
	stmt.Info.Owner.TableName, err = p.parseIdent()
	if err != nil {
		return nil, err
	}

	columns, order, err := p.parseColumnList()
	if err != nil {
		return nil, err
	}
	if len(columns) == 0 {
		tok, pos, lit := p.ScanIgnoreWhitespace()
		return nil, newParseError(scanner.Tokstr(tok, lit), []string{"("}, pos)
	}

	stmt.Info.Columns = columns
	stmt.Info.KeySortOrder = order

	return &stmt, nil
}