File tree 3 files changed +10
-0
lines changed
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ type OperationRule struct {
43
43
ReturnType * TypeRule
44
44
}
45
45
46
+ func (r OperationRule ) Argument (name string ) ArgumentRule {
47
+ if r .Arguments == nil {
48
+ return ArgumentRule {}
49
+ }
50
+ return r .Arguments [name ]
51
+ }
52
+
46
53
type ArgumentRules map [string ]ArgumentRule
47
54
48
55
type ArgumentRule struct {
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ func createOperation(
137
137
IdlType : arg .IdlType ,
138
138
ArgumentSpec : esArgumentSpec ,
139
139
Ignore : esArgumentSpec .Ignored ,
140
+ CustomRule : opRules .Argument (arg .Name ),
140
141
}
141
142
if len (arg .IdlType .Types ) > 0 {
142
143
slog .Warn (
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package model
3
3
import (
4
4
"fmt"
5
5
6
+ "github.com/gost-dom/code-gen/customrules"
6
7
"github.com/gost-dom/code-gen/script-wrappers/configuration"
7
8
"github.com/gost-dom/webref/idl/legacy"
8
9
)
@@ -14,6 +15,7 @@ type ESOperationArgument struct {
14
15
Variadic bool
15
16
IdlType legacy.IdlTypes
16
17
ArgumentSpec configuration.ESMethodArgument
18
+ CustomRule customrules.ArgumentRule
17
19
Ignore bool
18
20
}
19
21
You can’t perform that action at this time.
0 commit comments