JUCE  v5.2.0-514-g49784a029
JUCE API
juce::littlefoot::Compiler::BinaryOperator Struct Reference
Inheritance diagram for juce::littlefoot::Compiler::BinaryOperator:
Collaboration diagram for juce::littlefoot::Compiler::BinaryOperator:

Public Member Functions

 BinaryOperator (const CodeLocation &l, BlockPtr parent, ExpPtr a, ExpPtr b, TokenType op) noexcept
 
virtual bool alwaysReturns () const
 
void emit (CodeGenerator &cg, Type requiredType, int stackDepth) const override
 
void emitOpAndCast (CodeGenerator &cg, Type requiredType, OpCode op) const
 
Type getResultType (Type typeA, Type typeB) const noexcept
 
Type getType (CodeGenerator &cg) const override
 
ExpPtr simplify (SyntaxTreeBuilder &stb) override
 
ExpPtr simplifyBool (bool a, bool b, LiteralValue *literal)
 
ExpPtr simplifyFloat (double a, double b, LiteralValue *literal)
 
ExpPtr simplifyInt (int a, int b, LiteralValue *literal)
 
void visitSubStatements (Statement::Visitor &visit) const override
 

Public Attributes

ExpPtr lhs
 
CodeLocation location
 
TokenType operation
 
BlockPtr parentBlock
 
ExpPtr rhs
 

Constructor & Destructor Documentation

◆ BinaryOperator()

juce::littlefoot::Compiler::BinaryOperator::BinaryOperator ( const CodeLocation l,
BlockPtr  parent,
ExpPtr  a,
ExpPtr  b,
TokenType  op 
)
inlinenoexcept

Member Function Documentation

◆ alwaysReturns()

virtual bool juce::littlefoot::Compiler::Statement::alwaysReturns ( ) const
inlinevirtualinherited

◆ emit()

void juce::littlefoot::Compiler::BinaryOperator::emit ( CodeGenerator cg,
Type  requiredType,
int  stackDepth 
) const
inlineoverridevirtual

◆ emitOpAndCast()

void juce::littlefoot::Compiler::BinaryOperator::emitOpAndCast ( CodeGenerator cg,
Type  requiredType,
OpCode  op 
) const
inline

◆ getResultType()

Type juce::littlefoot::Compiler::BinaryOperator::getResultType ( Type  typeA,
Type  typeB 
) const
inlinenoexcept

◆ getType()

Type juce::littlefoot::Compiler::BinaryOperator::getType ( CodeGenerator cg) const
inlineoverridevirtual

◆ simplify()

ExpPtr juce::littlefoot::Compiler::BinaryOperator::simplify ( SyntaxTreeBuilder stb)
inlineoverridevirtual

◆ simplifyBool()

ExpPtr juce::littlefoot::Compiler::BinaryOperator::simplifyBool ( bool  a,
bool  b,
LiteralValue literal 
)
inline

◆ simplifyFloat()

ExpPtr juce::littlefoot::Compiler::BinaryOperator::simplifyFloat ( double  a,
double  b,
LiteralValue literal 
)
inline

◆ simplifyInt()

ExpPtr juce::littlefoot::Compiler::BinaryOperator::simplifyInt ( int  a,
int  b,
LiteralValue literal 
)
inline

◆ visitSubStatements()

void juce::littlefoot::Compiler::BinaryOperator::visitSubStatements ( Statement::Visitor visit) const
inlineoverridevirtual

Member Data Documentation

◆ lhs

ExpPtr juce::littlefoot::Compiler::BinaryOperator::lhs

◆ location

CodeLocation juce::littlefoot::Compiler::Statement::location
inherited

◆ operation

TokenType juce::littlefoot::Compiler::BinaryOperator::operation

◆ parentBlock

BlockPtr juce::littlefoot::Compiler::Statement::parentBlock
inherited

◆ rhs

ExpPtr juce::littlefoot::Compiler::BinaryOperator::rhs

The documentation for this struct was generated from the following file: