MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / parseOr

Method parseOr

go/engine/expr/parser.go:57–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57func (p *parser) parseOr() (Value, error) {
58 left, err := p.parseAnd()
59 if err != nil {
60 return Value{}, err
61 }
62 for p.peekTwo() == "||" {
63 p.pos += 2
64 right, err := p.parseAnd()
65 if err != nil {
66 return Value{}, err
67 }
68 left = BoolVal(left.AsBool() || right.AsBool())
69 }
70 return left, nil
71}
72
73func (p *parser) parseAnd() (Value, error) {
74 left, err := p.parseEquality()

Callers 2

parseAndEvalFunction · 0.95
parseAtomMethod · 0.95

Calls 4

parseAndMethod · 0.95
peekTwoMethod · 0.95
BoolValFunction · 0.85
AsBoolMethod · 0.80

Tested by

no test coverage detected