(name string, min, max *int32, nodes ...Node)
| 99 | } |
| 100 | |
| 101 | func NewIntegerArgument(name string, min, max *int32, nodes ...Node) Node { |
| 102 | flags := int8(0) |
| 103 | var props = make([]any, 1, 3) |
| 104 | |
| 105 | if min != nil { |
| 106 | flags &= 0x01 |
| 107 | props = append(props, *min) |
| 108 | } |
| 109 | if max != nil { |
| 110 | flags &= 0x02 |
| 111 | props = append(props, *max) |
| 112 | } |
| 113 | props[0] = flags |
| 114 | |
| 115 | return Node{ |
| 116 | Node: play.Node{ |
| 117 | Flags: play.NodeArgument, |
| 118 | Name: name, |
| 119 | ParserId: Integer, |
| 120 | Properties: props, |
| 121 | }, |
| 122 | children: nodes, |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | func NewStringArgument(name string, typ int, nodes ...Node) Node { |
| 127 | return Node{ |
nothing calls this directly
no outgoing calls
no test coverage detected