MCPcopy Create free account
hub / github.com/Shopify/go-lua / lessOrEqual

Method lessOrEqual

vm.go:153–170  ·  view source on GitHub ↗
(left, right value)

Source from the content-addressed store, hash-verified

151}
152
153func (l *State) lessOrEqual(left, right value) bool {
154 if lf, ok := left.(float64); ok {
155 if rf, ok := right.(float64); ok {
156 return lf <= rf
157 }
158 } else if ls, ok := left.(string); ok {
159 if rs, ok := right.(string); ok {
160 return ls <= rs
161 }
162 }
163 if result, ok := l.callOrderTagMethod(left, right, tmLE); ok {
164 return result
165 } else if result, ok := l.callOrderTagMethod(right, left, tmLT); ok {
166 return !result
167 }
168 l.orderError(left, right)
169 return false
170}
171
172func (l *State) concat(total int) {
173 t := func(i int) value { return l.stack[l.top-i] }

Callers 3

CompareMethod · 0.95
executeSwitchMethod · 0.95
initFunction · 0.80

Calls 2

callOrderTagMethodMethod · 0.95
orderErrorMethod · 0.95

Tested by

no test coverage detected