1 using System;
2 using System.IO;
3 using antlr;
4 using antlr.collections;
5 
6 /** A simple node to represent MULT operation */
7 public class MULTNode : BinaryOperatorAST {
MULTNode()8 	public MULTNode() {
9 	}
10 
MULTNode(Token tok)11 	public MULTNode(Token tok) {
12 	}
13 
14 	/** Compute value of subtree; this is heterogeneous part :) */
Value()15 	public override int Value() {
16 		return Left().Value() * Right().Value();
17 	}
18 
ToString()19 	public override string ToString() {
20 		return " *";
21 	}
22 
xmlSerializeRootOpen(TextWriter outWriter)23 	public override void xmlSerializeRootOpen(TextWriter outWriter) {
24 		outWriter.Write("<MULT>");
25 	}
26 
xmlSerializeRootClose(TextWriter outWriter)27 	public override void xmlSerializeRootClose(TextWriter outWriter) {
28 		outWriter.Write("</MULT>");
29 	}
30 }
31