/*
 * Copyright (c) 2009-2013 Topi Nieminen
 */
/**
 * 
 */
package com.appspot.relaxe.expr;

import com.appspot.relaxe.types.PrimitiveType;

public class IntLiteral	
	implements Token, ValueExpression {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2349786152502099361L;
	private int value;
	
	
	/**
	 * No-argument constructor for GWT Serialization
	 */
	public IntLiteral() {
		this(0);
	}
	
	public IntLiteral(int value) {
		this.value = value;
	}

	@Override
	public String getTerminalSymbol() {
		return Integer.toString(this.value);
	}

	@Override
	public void traverse(VisitContext vc, ElementVisitor v) {		
		v.start(vc, (Token) this);
		v.end(this);			
	}
	
	@Override
	public int getType() {
		return PrimitiveType.INTEGER;
	}

	@Override
	public boolean isOrdinary() {
		return true;
	}
	
	@Override
	public ColumnName getColumnName() {
		return null;
	}
}
@@ -282,16 +282,18 @@
 99361L;%0A
+%09%0A
 %09private
@@ -308,16 +308,135 @@
 ue;%0A%09%0A%09%0A
+%09public static final IntLiteral ZERO = new IntLiteral(0);%0A%09public static final IntLiteral ONE = new IntLiteral(1); %0A%09%09%0A
 %09/**%0A%09 *

Add IntLiteral.ZERO and IntLiteral.ONE