public Tuple < Expr > parseExpressions ( EnclosingScope scope , boolean terminated ) { ArrayList < Expr > returns = new ArrayList <> ( ) ; // A return statement may optionally have a return expression. // Therefore, we first skip all whitespace on the given line. int next = skipLineSpace ( index ) ; // Then, we check whether or not we reached the end of the line. If not, // then we assume what's remaining is the returned expression. This // means expressions must start on the same line as a return. Otherwise, // a potentially cryptic error message will be given. returns . add ( parseExpression ( scope , terminated ) ) ; while ( tryAndMatch ( false , Comma ) != null ) { returns . add ( parseExpression ( scope , terminated ) ) ; } return new Tuple <> ( returns ) ; }
Parse a multi - expression ; that is a sequence of one or more expressions separated by comma s