package polyglot.ext.jl.ast;

import polyglot.ast.*;
import polyglot.types.*;
import polyglot.visit.*;
import polyglot.util.*;

/**
 * An integer literal: longs, ints, shorts, bytes, and chars.
 */
public abstract class NumLit_c extends Lit_c implements NumLit
{
    protected long value;

    public NumLit_c(Position pos, long value) {
	super(pos);
	this.value = value;
    }

    /** Get the value of the expression. */
    public long longValue() {
	return this.value;
    }

    /** Get the value of the expression, as an object. */
    public Object objValue() {
        return new Long(this.value);
    }
}

@@ -604,11 +604,160 @@
 );%0A    %7D
+%0A%0A    public void dump(CodeWriter w) %7B%0A        super.dump(w);%0A%0A%09w.allowBreak(4, %22 %22);%0A%09w.begin(0);%0A%09w.write(%22(value %22 + value + %22)%22);%0A%09w.end();%0A    %7D
 %0A%7D%0A

Include value of numerical literals in AST dumps.