1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpeclipse.internal.compiler.ast;
13 import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor;
14 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
15 import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
17 public class NullLiteral extends MagicLiteral {
19 static final char[] source = {'n' , 'u' , 'l' , 'l'};
21 public NullLiteral(int s , int e) {
26 public void computeConstant() {
28 constant = NotAConstant;
32 * Code generation for the null literal
34 * @param currentScope net.sourceforge.phpdt.internal.compiler.lookup.BlockScope
35 * @param codeStream net.sourceforge.phpdt.internal.compiler.codegen.CodeStream
36 * @param valueRequired boolean
38 // public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
39 // int pc = codeStream.position;
41 // codeStream.aconst_null();
42 // codeStream.recordPositionsFrom(pc, this.sourceStart);
44 public TypeBinding literalType(BlockScope scope) {
51 public char[] source() {
55 public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope scope) {
56 visitor.visit(this, scope);
57 visitor.endVisit(this, scope);