// Copyright (c) 1996-2002 Brian D. Carlstrom

package bdc.scheme.expression;

import bdc.scheme.Environment;
import bdc.scheme.Stack;
import bdc.scheme.Writer;
import bdc.scheme.compiler.CompileTimeEnvironment;
import bdc.util.Fmt;

public class Quoted extends Expression
{
    public Object textOfQuotation;

    public Quoted (Object textOfQuotation)
    {
        this.textOfQuotation = textOfQuotation;
    }

    public Object eval (Environment environment, Stack stack)
    {
        return textOfQuotation;
    }

    /**
        Quoteds don't need to fixup anything
    */
    public Expression fixupVariables (CompileTimeEnvironment environment)
    {
        return this;
    }

    public String toString ()
    {
        return Fmt.S("'%s", Writer.write(textOfQuotation));
    }
}
