xgo/ast/empty_stmt.go

27 lines
376 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package ast
import "github.com/d5/tengo/scanner"
type EmptyStmt struct {
Semicolon scanner.Pos
Implicit bool
}
func (s *EmptyStmt) stmtNode() {}
func (s *EmptyStmt) Pos() scanner.Pos {
return s.Semicolon
}
func (s *EmptyStmt) End() scanner.Pos {
if s.Implicit {
return s.Semicolon
}
return s.Semicolon + 1
}
func (s *EmptyStmt) String() string {
return ";"
}