ast

package
v0.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserEntityRequiredErr = errors.New("user entity required")

UserEntityRequiredErr -

Functions

This section is empty.

Types

type ActionStatement

type ActionStatement struct {
	Token               token.Token // token.ACTION
	Name                token.Token // token.IDENT
	ExpressionStatement Statement
}

ActionStatement -

func (*ActionStatement) String

func (ls *ActionStatement) String() string

String -

func (*ActionStatement) TokenLiteral

func (ls *ActionStatement) TokenLiteral() string

TokenLiteral -

type EntityStatement

type EntityStatement struct {
	Token              token.Token // token.ENTITY
	Name               token.Token // token.IDENT
	RelationStatements []Statement
	ActionStatements   []Statement
	Option             token.Token // token.OPTION
}

EntityStatement -

func (*EntityStatement) String

func (ls *EntityStatement) String() string

String -

func (*EntityStatement) TokenLiteral

func (ls *EntityStatement) TokenLiteral() string

TokenLiteral -

type Expression

type Expression interface {
	Node

	IsInfix() bool
	Type() string
	// contains filtered or unexported methods
}

Expression -

type ExpressionStatement

type ExpressionStatement struct {
	Expression Expression
}

ExpressionStatement struct

func (*ExpressionStatement) String

func (es *ExpressionStatement) String() string

func (*ExpressionStatement) TokenLiteral

func (es *ExpressionStatement) TokenLiteral() string

TokenLiteral function on ExpressionStatement

type Identifier

type Identifier struct {
	Token token.Token // token.IDENT
	Value string
}

Identifier -

func (*Identifier) IsInfix

func (ls *Identifier) IsInfix() bool

IsInfix -

func (*Identifier) String

func (ls *Identifier) String() string

String -

func (*Identifier) TokenLiteral

func (ls *Identifier) TokenLiteral() string

TokenLiteral -

func (*Identifier) Type

func (ls *Identifier) Type() string

Type -

type InfixExpression

type InfixExpression struct {
	Token    token.Token // The operator token, e.g. and, or
	Left     Expression
	Operator string
	Right    Expression
}

InfixExpression -

func (*InfixExpression) IsInfix

func (ie *InfixExpression) IsInfix() bool

IsInfix -

func (*InfixExpression) String

func (ie *InfixExpression) String() string

String -

func (*InfixExpression) TokenLiteral

func (ie *InfixExpression) TokenLiteral() string

TokenLiteral -

func (*InfixExpression) Type

func (ie *InfixExpression) Type() string

Type -

type Node

type Node interface {
	TokenLiteral() string
	String() string
}

Node -

type PrefixExpression

type PrefixExpression struct {
	Token    token.Token // not
	Operator string
	Value    string
}

PrefixExpression -

func (*PrefixExpression) IsInfix

func (pe *PrefixExpression) IsInfix() bool

IsInfix -

func (*PrefixExpression) String

func (pe *PrefixExpression) String() string

String -

func (*PrefixExpression) TokenLiteral

func (pe *PrefixExpression) TokenLiteral() string

TokenLiteral -

func (*PrefixExpression) Type

func (pe *PrefixExpression) Type() string

Type -

type RelationStatement

type RelationStatement struct {
	Token         token.Token // token.RELATION
	Name          token.Token // token.IDENT
	RelationTypes []Statement
	Option        token.Token // token.OPTION
}

RelationStatement -

func (*RelationStatement) String

func (ls *RelationStatement) String() string

String -

func (*RelationStatement) TokenLiteral

func (ls *RelationStatement) TokenLiteral() string

TokenLiteral -

type RelationTypeStatement

type RelationTypeStatement struct {
	Sign  token.Token // token.sign
	Token token.Token // token.IDENT
}

RelationTypeStatement -

func (*RelationTypeStatement) String

func (ls *RelationTypeStatement) String() string

func (*RelationTypeStatement) TokenLiteral

func (ls *RelationTypeStatement) TokenLiteral() string

TokenLiteral -

type Schema

type Schema struct {
	Statements []Statement
}

Schema -

func (Schema) Validate added in v0.3.1

func (sch Schema) Validate() (err error)

Validate -

type Statement

type Statement interface {
	Node
	// contains filtered or unexported methods
}

Statement -

Jump to

Keyboard shortcuts

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