Documentation
¶
Index ¶
- Constants
- Variables
- func IsSingleOperator(kind string) bool
- func IsStatement(current, prev lexer.Token) (ok bool, withTerminator bool)
- func ParseBlock(b BlockAST, indent int) string
- type Arg
- type Assign
- type AssignSelector
- type Attribute
- type BlockAST
- type Break
- type Builder
- func (b *Builder) Args(tokens []lexer.Token) []Arg
- func (b *Builder) AssignExpr(tokens []lexer.Token, isExpr bool) (assign Assign, ok bool)
- func (b *Builder) AssignStatement(tokens []lexer.Token, isExpr bool) (s Statement, _ bool)
- func (b *Builder) Attribute(tokens []lexer.Token)
- func (b *Builder) Block(tokens []lexer.Token) (block BlockAST)
- func (b *Builder) BreakStatement(tokens []lexer.Token) Statement
- func (b *Builder) Build()
- func (b *Builder) Comment(token lexer.Token)
- func (b *Builder) CommentStatement(token lexer.Token) (s Statement)
- func (b *Builder) ContinueStatement(tokens []lexer.Token) Statement
- func (b *Builder) DataType(tokens []lexer.Token, i *int, err bool) (t DataType, ok bool)
- func (b *Builder) ElseBlock(bs *blockStatement) (s Statement)
- func (b *Builder) ElseIfExpr(bs *blockStatement) (s Statement)
- func (ast *Builder) Ended() bool
- func (b *Builder) Expr(tokens []lexer.Token) (e Expr)
- func (b *Builder) ExprStatement(tokens []lexer.Token) Statement
- func (b *Builder) FreeStatement(tokens []lexer.Token) Statement
- func (b *Builder) Func(tokens []lexer.Token, anonymous bool) (f Func)
- func (b *Builder) FuncCallStatement(tokens []lexer.Token) Statement
- func (b *Builder) FuncDataTypeHead(tokens []lexer.Token, i *int) (string, Func)
- func (b *Builder) FuncRetDataType(tokens []lexer.Token, i *int) (t DataType, ok bool)
- func (b *Builder) GlobalVar(tokens []lexer.Token)
- func (b *Builder) Id(tokens []lexer.Token)
- func (b *Builder) IdStatement(tokens []lexer.Token) (s Statement)
- func (b *Builder) IfExpr(bs *blockStatement) (s Statement)
- func (b *Builder) IterExpr(tokens []lexer.Token) (s Statement)
- func (b *Builder) MapDataType(tokens []lexer.Token, i *int, err bool) (t DataType, _ string)
- func (b *Builder) Params(fn *Func, tokens []lexer.Token)
- func (b *Builder) Pragma(pp *Preprocessor, tokens []lexer.Token) bool
- func (b *Builder) Preprocessor(tokens []lexer.Token)
- func (b *Builder) RetStatement(tokens []lexer.Token) Statement
- func (b *Builder) Statement(bs *blockStatement) (s Statement)
- func (b *Builder) Type(tokens []lexer.Token)
- func (b *Builder) Use(tokens []lexer.Token)
- func (b *Builder) VarStatement(tokens []lexer.Token) (s Statement)
- type Comment
- type Continue
- type CxxEmbed
- type DataType
- type Directive
- type Else
- type ElseIf
- type EnofiDirective
- type Expr
- type ExprStatement
- type ForeachProfile
- type Free
- type Func
- type IExprModel
- type If
- type Iter
- type IterProfile
- type Obj
- type Parameter
- type Preprocessor
- type Ret
- type Statement
- type Type
- type Use
- type Value
- type Var
- type WhileProfile
Constants ¶
View Source
const IndentSpace = 2
Variables ¶
View Source
var Indent int32 = 0
Functions ¶
func IsSingleOperator ¶
func ParseBlock ¶
Types ¶
type Assign ¶
type AssignSelector ¶
func (AssignSelector) String ¶
func (vs AssignSelector) String() string
type Builder ¶
type Builder struct {
Tree []Obj
Errs []jnlog.CompilerLog
Tokens []lexer.Token
Pos int
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) AssignExpr ¶
func (*Builder) AssignStatement ¶
func (*Builder) CommentStatement ¶
func (*Builder) ContinueStatement ¶
func (*Builder) ElseIfExpr ¶
func (*Builder) FuncCallStatement ¶
func (*Builder) FuncDataTypeHead ¶
func (*Builder) FuncRetDataType ¶
func (*Builder) MapDataType ¶
func (*Builder) Preprocessor ¶
type EnofiDirective ¶
type EnofiDirective struct{}
func (EnofiDirective) String ¶
func (EnofiDirective) String() string
type ExprStatement ¶
type ExprStatement struct {
Expr Expr
}
func (ExprStatement) String ¶
func (be ExprStatement) String() string
type ForeachProfile ¶
func (ForeachProfile) ClassicString ¶
func (fp ForeachProfile) ClassicString(iter Iter) string
func (*ForeachProfile) ForeachString ¶
func (fp *ForeachProfile) ForeachString(iter Iter) string
func (ForeachProfile) IterationSring ¶
func (fp ForeachProfile) IterationSring(iter Iter) string
func (ForeachProfile) MapString ¶
func (fp ForeachProfile) MapString(iter Iter) string
func (ForeachProfile) String ¶
func (fp ForeachProfile) String(iter Iter) string
type Func ¶
type Func struct {
Pub bool
Token lexer.Token
Id string
Params []Parameter
RetType DataType
Block BlockAST
}
func (Func) DataTypeString ¶
type IExprModel ¶
type IExprModel interface {
String() string
}
type IterProfile ¶
type Parameter ¶
type Preprocessor ¶
func (Preprocessor) String ¶
func (pp Preprocessor) String() string
type Var ¶
type WhileProfile ¶
type WhileProfile struct {
Expr Expr
}
func (WhileProfile) String ¶
func (wp WhileProfile) String(iter Iter) string
Click to show internal directories.
Click to hide internal directories.