ftp.nice.ch/pub/next/developer/languages/java/guavac.0.2.5.s.tar.gz#/guavac-0.2.5/compiler/BinaryExpression.h

This is BinaryExpression.h in view mode; [Download] [Up]

// Copyright (c) 1996  David Engberg  All rights reserved
// $Id: BinaryExpression.h,v 1.3 1996/04/25 21:10:43 geppetto Exp $
#ifndef _BinaryExpression_h
#define _BinaryExpression_h
#pragma interface

#include "Expression.h"

//
//  Class name : CBinaryExpression
//  Description : Represents an expression composed of a pair of expressions
//    joined with a binary operator.  Stores the operator and both expressions.
//    I put this in a separate file since it's so ungodly huge.
//
class CBinaryExpression : public CExpression {
  DynamicCastDeclarations;
public:
  CBinaryExpression(CExpression* leftExpression, unsigned short binaryOperator,
		    CExpression* rightExpression);
  CBinaryExpression(const CBinaryExpression& source);
  virtual ~CBinaryExpression();
  virtual CExpression* Clone() const { return new CBinaryExpression(*this); }
  virtual CCompileError* CreateConstantExpression(CExpression*& result,
			  CCompileContext& context) const;
  virtual CCompileError* GenerateCode(CCodeSequence& code,
		   CCompileContext& context, unsigned short& stackUsed,
	           bool isStatement = false);
  const CExpression* GetLeftArgument() const { return fLeft; }
  const CExpression* GetRightArgument() const { return fRight; }
protected:
  virtual CCompileError* HandleEvaluateType(CCompileContext& context,
					    CJavaTypeSignature& setType);
  CCompileError* AppendToStringBuffer(CCodeSequence& code,
	      CExpression* childExpression, CCompileContext& compiler,
	      unsigned short& stackUsed);
private:
  CExpression* fLeft;
  CExpression* fRight;
  unsigned short fOperator;   // taken from parser.y/h
};

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.