import { SourceBasedExpression } from '../Expression' ; import { OclExecutionContext } from '../../OclExecutionContext' ; oclExpression oclExample export class LastExpression extends SourceBasedExpression { evaluate ( visitor , localVariables ? ) { const source = this . getSource ( ) . evaluate ( visitor , localVariables ) ; if ( source instanceof Array ) { return source [ source . length - 1 ] ; } } }