home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / jikepg12.zip / jikespg / examples / expr / AstParen.java < prev    next >
Encoding:
Text File  |  1999-11-04  |  789 b   |  25 lines

  1. // $Id: AstParen.java,v 1.3 1999/11/04 14:02:18 shields Exp $
  2. // This software is subject to the terms of the IBM Jikes Compiler
  3. // License Agreement available at the following URL:
  4. // http://www.ibm.com/research/jikes.
  5. // Copyright (C) 1983, 1999, International Business Machines Corporation
  6. // and others.  All Rights Reserved.
  7. // You must accept the terms of that agreement to use this software.
  8.  
  9. class AstParen extends Ast
  10. {
  11.     Ast expression;
  12.  
  13.     public int Value() { return expression.Value(); }
  14.  
  15.     public String toString(LexStream lex_stream)
  16.     {
  17.         StringBuffer buffer = new StringBuffer();
  18.         buffer.append('(');
  19.         buffer.append(expression.toString(lex_stream));
  20.         buffer.append(')');
  21.  
  22.         return buffer.toString();
  23.     }
  24. }
  25.