1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.ast;
13 import net.sourceforge.phpdt.internal.compiler.impl.Constant;
14 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
15 import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
17 public abstract class Literal extends Expression {
20 public Literal(int s,int e) {
24 public abstract void computeConstant() ;
25 //ON ERROR constant STAYS NULL
26 public abstract TypeBinding literalType(BlockScope scope);
27 public TypeBinding resolveType(BlockScope scope) {
28 // compute the real value, which must range its type's range
31 if (constant == null) {
32 scope.problemReporter().constantOutOfRange(this);
33 constant = Constant.NotAConstant;
36 return literalType(scope);
38 public abstract char[] source() ;