All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dynjs.parser.ast.ThisExpression Maven / Gradle / Ivy

package org.dynjs.parser.ast;

import org.dynjs.parser.CodeVisitor;
import org.dynjs.parser.js.Position;
import org.dynjs.runtime.ExecutionContext;

/**
 * The this keyword evaluates to the value of the ThisBinding of
 * the current execution context.
 * 
 * see 11.1.1
 * @author Douglas Campos
 * @author Bob McWhirter
 * 
 */
public class ThisExpression extends BaseExpression {
    
    public ThisExpression(Position position) {
        super(position);
    }

    public String toString() {
        return "this";
    }
    
    public int getSizeMetric() {
        return 3;
    }

    @Override
    public void accept(ExecutionContext context, CodeVisitor visitor, boolean strict) {
        visitor.visit( context, this, strict );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy