xgo/ast/empty_stmt.go
2019-01-08 23:17:42 -08:00

26 lines
376 B
Go

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 ";"
}