diff options
Diffstat (limited to 'vendor/github.com/d5/tengo/compiler/ast/export_stmt.go')
-rw-r--r-- | vendor/github.com/d5/tengo/compiler/ast/export_stmt.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/d5/tengo/compiler/ast/export_stmt.go b/vendor/github.com/d5/tengo/compiler/ast/export_stmt.go new file mode 100644 index 00000000..64eb7606 --- /dev/null +++ b/vendor/github.com/d5/tengo/compiler/ast/export_stmt.go @@ -0,0 +1,27 @@ +package ast + +import ( + "github.com/d5/tengo/compiler/source" +) + +// ExportStmt represents an export statement. +type ExportStmt struct { + ExportPos source.Pos + Result Expr +} + +func (s *ExportStmt) stmtNode() {} + +// Pos returns the position of first character belonging to the node. +func (s *ExportStmt) Pos() source.Pos { + return s.ExportPos +} + +// End returns the position of first character immediately after the node. +func (s *ExportStmt) End() source.Pos { + return s.Result.End() +} + +func (s *ExportStmt) String() string { + return "export " + s.Result.String() +} |