import { BodyBasedExpression } from '../Expression' ; import { OclExecutionContext } from '../../OclExecutionContext' ; oclExpression oclExample export class AtExpression extends BodyBasedExpression { evaluate ( visitor , localVariables ? ) { const source = this . getSource ( ) . evaluate ( visitor , localVariables ) ; const index = this . getBody ( ) . evaluate ( visitor , localVariables ) ; if ( source instanceof Array && Number . isInteger ( index ) && index >= 1 && index < source . length ) { return source [ index - 1 ] ; } } }