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.*;
14 import net.sourceforge.phpdt.internal.compiler.lookup.*;
16 public abstract class Literal extends Expression {
19 public Literal(int s,int e) {
23 public abstract void computeConstant() ;
24 //ON ERROR constant STAYS NULL
25 public abstract TypeBinding literalType(BlockScope scope);
26 public TypeBinding resolveType(BlockScope scope) {
27 // compute the real value, which must range its type's range
30 if (constant == null) {
31 scope.problemReporter().constantOutOfRange(this);
32 constant = Constant.NotAConstant;
35 return literalType(scope);
37 public abstract char[] source() ;