import { BodyBasedExpression } from '../Expression' ; import { OclExecutionContext } from '../../OclExecutionContext' ; oclExpression oclExample export class AppendExpression extends BodyBasedExpression { evaluate ( visitor , localVariables ? ) { const source = this . getSource ( ) . evaluate ( visitor , localVariables ) ; const body = this . getBody ( ) ? this . getBody ( ) . evaluate ( visitor , localVariables ) : undefined ; if ( Array . isArray ( source ) && ! ! body ) { source . push ( body ) ; } return source ; } }