MCPcopy Create free account
hub / github.com/TypicalDefender/entangleDB / Operator

Interface Operator

src/sql/parser/mod.rs:582–591  ·  view source on GitHub ↗

An operator trait, to help with parsing of operators

Source from the content-addressed store, hash-verified

580
581/// An operator trait, to help with parsing of operators
582trait Operator: Sized {
583 /// Looks up the corresponding operator for a token, if one exists
584 fn from(token: &Token) -> Option<Self>;
585 /// Augments an operator by allowing it to parse any modifiers.
586 fn augment(self, parser: &mut Parser) -> Result<Self>;
587 /// Returns the operator's associativity
588 fn assoc(&self) -> u8;
589 /// Returns the operator's precedence
590 fn prec(&self) -> u8;
591}
592
593const ASSOC_LEFT: u8 = 1;
594const ASSOC_RIGHT: u8 = 0;

Callers

nothing calls this directly

Implementers 1

mod.rssrc/sql/parser/mod.rs

Calls

no outgoing calls

Tested by

no test coverage detected