Docs.rs
  • ezno-parser-0.0.8
    • ezno-parser 0.0.8
    • Docs.rs crate page
    • MIT
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • kaleidawave
    • Dependencies
      • derive-debug-extras ^0.2.2 normal
      • derive-enum-from-into ^0.1.1 normal
      • derive-finite-automaton ^0.1.3 normal
      • derive-partial-eq-extras ^0.1.2 normal
      • enum-variants-strings ^0.2 normal
      • enum_variant_type ^0.3.1 normal
      • get-field-by-type ^0.0.3 normal
      • iterator-endiate ^0.2.1 normal
      • self-rust-tokenize ^0.3.3 normal
      • serde ^1.0 normal
      • source-map ^0.14.6 normal
      • temporary-annex ^0.1.0 normal
      • ezno-parser-visitable-derive ^0.0.3 normal
      • match_deref ^0.1.1 dev
      • pretty_assertions ^1.3.0 dev
      • tokenizer-lib ^1.5.1 normal
      • tokenizer-lib ^1.5.1 normal
    • Versions
    • 16.78% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

ezno_parser0.0.8

Operator

Required Methods

  • associativity_direction
  • is_associative
  • precedence
  • to_str

Provided Methods

  • precedence_and_associativity_direction

Object Safety

Implementors

In ezno_parser::operators

?
Change settings

Trait ezno_parser::operators::Operator

source ·
pub trait Operator: for<'a> TryFrom<&'a TSXToken> {
    // Required methods
    fn to_str(&self) -> &'static str;
    fn precedence(&self) -> u8;
    fn associativity_direction(&self) -> AssociativityDirection;
    fn is_associative(&self) -> bool;

    // Provided method
    fn precedence_and_associativity_direction(
        &self
    ) -> (u8, AssociativityDirection) { ... }
}

Required Methods§

source

fn to_str(&self) -> &'static str

String representation of operator

source

fn precedence(&self) -> u8

Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table

source

fn associativity_direction(&self) -> AssociativityDirection

Returns the associativity of the operator. Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table

source

fn is_associative(&self) -> bool

Is associative with self https://en.wikipedia.org/wiki/Associative_property

Provided Methods§

source

fn precedence_and_associativity_direction(&self) -> (u8, AssociativityDirection)

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Operator for BinaryAssignmentOperator

source§

impl Operator for BinaryOperator

source§

impl Operator for UnaryOperator

source§

impl Operator for UnaryPrefixAssignmentOperator

source§

impl Operator for UnaryPostfixAssignmentOperator