MCPcopy
hub / github.com/expr-lang/expr / compareTokens

Function compareTokens

parser/lexer/lexer_test.go:364–377  ·  view source on GitHub ↗
(i1, i2 []Token)

Source from the content-addressed store, hash-verified

362}
363
364func compareTokens(i1, i2 []Token) bool {
365 if len(i1) != len(i2) {
366 return false
367 }
368 for k := range i1 {
369 if i1[k].Kind != i2[k].Kind {
370 return false
371 }
372 if i1[k].Value != i2[k].Value {
373 return false
374 }
375 }
376 return true
377}
378
379func TestLex_location(t *testing.T) {
380 source := file.NewSource("1..2\n3..4")

Callers 1

TestLexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…