MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / LessThan

Method LessThan

utils/vscode/src/parser/parser.go:133–146  ·  view source on GitHub ↗

LessThan returns true iff o is before p.

(o Position)

Source from the content-addressed store, hash-verified

131
132// LessThan returns true iff o is before p.
133func (p Position) LessThan(o Position) bool {
134 switch {
135 case !p.IsValid() || !o.IsValid():
136 return false
137 case p.Line < o.Line:
138 return true
139 case p.Line > o.Line:
140 return false
141 case p.Column < o.Column:
142 return true
143 default:
144 return false
145 }
146}
147
148// GreaterThan returns true iff o is greater than p.
149func (p Position) GreaterThan(o Position) bool {

Callers 3

tokAtMethod · 0.95
ContainsMethod · 0.80
growMethod · 0.80

Calls 1

IsValidMethod · 0.95

Tested by

no test coverage detected