class Pratt::BinaryOperatorParselet

Overview

Generic infix parselet for a binary arithmetic operator. The only difference when parsing, "+", "-", "*", "/", and "^" is precedence and associativity, so we can use a single parselet class for all of those.

Included Modules

Defined in:

parselets/binary_operator_parselet.cr

Constructors

Instance Method Summary

Instance methods inherited from module Pratt::InfixParselet

parse(parser : Parser, left : Expression, token : Token) : Expression parse

Constructor Detail

def self.new(m_precedence : Pratt::Precedence, m_is_right : Bool) #

[View source]

Instance Method Detail

def m_precedence : Precedence #

[View source]
def parse(parser : Parser, left : Expression, token : Token) : Expression #

[View source]