aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/robertkrimen/otto/result.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/robertkrimen/otto/result.go')
-rw-r--r--Godeps/_workspace/src/github.com/robertkrimen/otto/result.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/result.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/result.go
new file mode 100644
index 000000000..63642e7d0
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/robertkrimen/otto/result.go
@@ -0,0 +1,30 @@
+package otto
+
+import ()
+
+type _resultKind int
+
+const (
+ resultNormal _resultKind = iota
+ resultReturn
+ resultBreak
+ resultContinue
+)
+
+type _result struct {
+ kind _resultKind
+ value Value
+ target string
+}
+
+func newReturnResult(value Value) _result {
+ return _result{resultReturn, value, ""}
+}
+
+func newContinueResult(target string) _result {
+ return _result{resultContinue, emptyValue, target}
+}
+
+func newBreakResult(target string) _result {
+ return _result{resultBreak, emptyValue, target}
+}