org.eclipse.epsilon.eol.dom.FeatureCallExpression Maven / Gradle / Ivy
The newest version!
/*********************************************************************
* Copyright (c) 2008 The University of York.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.epsilon.eol.dom;
import org.eclipse.epsilon.common.module.IModule;
import org.eclipse.epsilon.common.parse.AST;
import org.eclipse.epsilon.eol.exceptions.EolIllegalOperationException;
import org.eclipse.epsilon.eol.execute.context.IEolContext;
import org.eclipse.epsilon.eol.execute.operations.AbstractOperation;
import org.eclipse.epsilon.eol.execute.operations.DynamicOperation;
import org.eclipse.epsilon.eol.execute.operations.declarative.IAbstractOperationContributor;
import org.eclipse.epsilon.eol.execute.operations.declarative.IAbstractOperationContributorProvider;
import org.eclipse.epsilon.eol.models.IModel;
import org.eclipse.epsilon.eol.types.EolSequence;
public abstract class FeatureCallExpression extends Expression {
protected boolean arrow, safe;
protected Expression targetExpression;
/**
* The feature name expression.
* @since 1.6
*/
protected NameExpression nameExpression;
@Override
public void build(AST cst, IModule module) {
super.build(cst, module);
this.arrow = "->".equals(cst.getText());
this.safe = "?.".equals(cst.getText());
}
static Object wrap(Object o) {
if (o instanceof Object[]) {
Object[] arr = (Object[]) o;
EolSequence
© 2015 - 2025 Weber Informatics LLC | Privacy Policy