use kinako instead of anko

This commit is contained in:
Yasuhiro Matsumoto
2017-06-16 16:06:17 +09:00
parent 28bb992796
commit 9bcfe68591
20 changed files with 2758 additions and 4719 deletions

104
vendor/github.com/mattn/kinako/ast/expr.go generated vendored Normal file
View File

@@ -0,0 +1,104 @@
package ast
type Token struct {
Tok int
Lit string
}
// Position provides interface to store code locations.
type Position struct {
Line int
Column int
}
// Expr provides all of interfaces for expression.
type Expr interface {
expr()
}
// ExprImpl provide commonly implementations for Expr.
type ExprImpl struct {
}
// expr provide restraint interface.
func (x *ExprImpl) expr() {}
// NumberExpr provide Number expression.
type NumberExpr struct {
ExprImpl
Lit string
}
// UnaryExpr provide unary minus expression. ex: -1, ^1, ~1.
type UnaryExpr struct {
ExprImpl
Operator string
Expr Expr
}
// IdentExpr provide identity expression.
type IdentExpr struct {
ExprImpl
Lit string
}
// Stmt provides all of interfaces for statement.
type Stmt interface {
stmt()
}
// StmtImpl provide commonly implementations for Stmt..
type StmtImpl struct {
}
// stmt provide restraint interface.
func (x *StmtImpl) stmt() {}
// LetsStmt provide multiple statement of let.
type LetsStmt struct {
StmtImpl
Lhss []Expr
Operator string
Rhss []Expr
}
// StringExpr provide String expression.
type StringExpr struct {
ExprImpl
Lit string
}
type TernaryOpExpr struct {
ExprImpl
Expr Expr
Lhs Expr
Rhs Expr
}
// ParenExpr provide parent block expression.
type ParenExpr struct {
ExprImpl
SubExpr Expr
}
// BinOpExpr provide binary operator expression.
type BinOpExpr struct {
ExprImpl
Lhs Expr
Operator string
Rhs Expr
}
// ExprStmt provide expression statement.
type ExprStmt struct {
StmtImpl
Expr Expr
}
// LetStmt provide statement of let.
type LetStmt struct {
StmtImpl
Lhs Expr
Operator string
Rhs Expr
}