forked from limetext/lime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands_generated.go
82 lines (76 loc) · 1.86 KB
/
commands_generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright 2014 The lime Authors.
// Use of this source code is governed by a 2-clause
// BSD-style license that can be found in the LICENSE file.
// This file was generated as part of a build step and shouldn't be manually modified
package sublime
import (
"fmt"
"github.com/limetext/gopy/lib"
"github.com/limetext/lime/backend"
"github.com/quarnster/util/text"
)
var (
_ = backend.View{}
_ = text.Region{}
_ = fmt.Errorf
)
func sublime_Register(tu *py.Tuple) (py.Object, error) {
var (
arg1 string
arg2 interface{}
)
if v, err := tu.GetItem(0); err != nil {
return nil, err
} else {
if v3, err2 := fromPython(v); err2 != nil {
return nil, err2
} else {
if v2, ok := v3.(string); !ok {
return nil, fmt.Errorf("Expected type string for backend.commandHandler.Register() arg1, not %s", v.Type())
} else {
arg1 = v2
}
}
}
if v, err := tu.GetItem(1); err != nil {
return nil, err
} else {
if v3, err2 := fromPython(v); err2 != nil {
return nil, err2
} else {
if v2, ok := v3.(interface{}); !ok {
return nil, fmt.Errorf("Expected type interface {} for backend.commandHandler.Register() arg2, not %s", v.Type())
} else {
arg2 = v2
}
}
}
if err := backend.GetEditor().CommandHandler().Register(arg1, arg2); err != nil {
return nil, err
} else {
return toPython(nil)
}
}
func sublime_Unregister(tu *py.Tuple) (py.Object, error) {
var (
arg1 string
)
if v, err := tu.GetItem(0); err != nil {
return nil, err
} else {
if v3, err2 := fromPython(v); err2 != nil {
return nil, err2
} else {
if v2, ok := v3.(string); !ok {
return nil, fmt.Errorf("Expected type string for backend.commandHandler.Unregister() arg1, not %s", v.Type())
} else {
arg1 = v2
}
}
}
if err := backend.GetEditor().CommandHandler().Unregister(arg1); err != nil {
return nil, err
} else {
return toPython(nil)
}
}