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.phpdt.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
35 * net.sourceforge.phpdt.internal.compiler.lookup.BlockScope
37 * net.sourceforge.phpdt.internal.compiler.codegen.CodeStream
38 * @param valueRequired
41 // public void generateCode(BlockScope currentScope, CodeStream codeStream,
42 // boolean valueRequired) {
43 // int pc = codeStream.position;
45 // codeStream.aconst_null();
46 // codeStream.recordPositionsFrom(pc, this.sourceStart);
48 public TypeBinding literalType(BlockScope scope) {
55 public char[] source() {
59 public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope scope) {
60 visitor.visit(this, scope);
61 visitor.endVisit(this, scope);