/**
 * Copyright (C) 2016 Joshua Auerbach 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.qcert.camp.data;


/**
 * Represents the dfloat data constructor
 */
public class FloatData extends CampData {
	private final double value;

	public FloatData(double value) {
		this.value = value;
	}

	/* (non-Javadoc)
	 * @see org.qcert.camp.data.CampData#getKind()
	 */
	@Override
	public Kind getKind() {
		return Kind.dfloat;
	}

	/* (non-Javadoc)
	 * @see org.qcert.camp.CampAST#getOperands()
	 */
	@Override
	protected Object[] getOperands() {
		return new Object[] {value};
	}

	/* (non-Javadoc)
	 * @see org.qcert.camp.CampAST#getTag()
	 */
	@Override
	protected String getTag() {
		return "Dfloat";
	}

	/**
	 * @return the value
	 */
	public double getValue() {
		return value;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return String.valueOf(value);
	}
}

@@ -641,16 +641,45 @@
 ata;%0D%0A%0D%0A
+import java.io.PrintWriter;%0D%0A
 %0D%0A/**%0D%0A 
@@ -911,97 +911,132 @@
 amp.
-data.CampData#getKind()%0D%0A%09 */%0D%0A%09@Override%0D%0A%09public Kind getKind() %7B%0D%0A%09%09return Kind.dfloat
+CampAST#emit(java.io.PrintWriter)%0D%0A%09 */%0D%0A%09@Override%0D%0A%09public void emit(PrintWriter pw) %7B%0D%0A%09%09pw.append(String.valueOf(value))
 ;%0D%0A%09
@@ -1087,27 +1087,29 @@
 amp.
-CampAST#getOpera
+data.CampData#getKi
 nd
-s
 ()%0D%0A
@@ -1132,37 +1132,26 @@
 %0D%0A%09p
-rotected Object%5B%5D getOpera
+ublic Kind getKi
 nd
-s
 () %7B
@@ -1165,28 +1165,106 @@
 urn 
-new Object%5B%5D %7B
+Kind.dfloat;%0D%0A%09%7D%0D%0A%0D%0A%09/**%0D%0A%09 * @return the value%0D%0A%09 */%0D%0A%09public double getValue() %7B%0D%0A%09%09return 
 value
-%7D
 ;%0D%0A%09
@@ -1300,36 +1300,32 @@
 see 
-org.qcert.camp.CampAST#getTa
+java.lang.Object#toStrin
 g()%0D
@@ -1349,24 +1349,21 @@
 %0D%0A%09p
-rotected
+ublic
  String 
 getT
@@ -1362,13 +1362,15 @@
 ing 
-getTa
+toStrin
 g() 
@@ -1385,104 +1385,245 @@
 urn 
-%22Dfloat%22;%0D%0A%09%7D%0D%0A%0D%0A%09/**%0D%0A%09 * @return the value%0D%0A%09 */%0D%0A%09public double getValue() %7B%0D%0A%09%09return value;
+String.valueOf(value);%0D%0A%09%7D%0D%0A%0D%0A%09/* (non-Javadoc)%0D%0A%09 * @see org.qcert.camp.CampAST#getOperands()%0D%0A%09 */%0D%0A%09@Override%0D%0A%09protected Object%5B%5D getOperands() %7B%0D%0A%09%09throw new IllegalStateException();  // emit is overridden, this should not be called
 %0D%0A%09%7D
@@ -1658,32 +1658,36 @@
 see 
-java.lang.Object#toStrin
+org.qcert.camp.CampAST#getTa
 g()%0D
@@ -1703,37 +1703,40 @@
 Override%0D%0A%09p
-ublic
+rotected
  String 
 toString() %7B
@@ -1715,39 +1715,37 @@
 rotected String 
-toStrin
+getTa
 g() %7B%0D%0A%09%09return 
@@ -1741,37 +1741,92 @@
 %0D%0A%09%09
-return String.valueOf(value);
+throw new IllegalStateException();  // emit is overridden, this should not be called
 %0D%0A%09%7D

Make emitting "more correct"