function processExpressions(expressions) {
  parser.clear()
  return expressions.map(expression => {
    const result = calc(expression.source)
    const outputs = formatResult(result)
    // Determine visibility based on the result type:
    // - Undefined results are hidden.
    // - Results with an `isResultSet` property are hidden when empty.
    // - All other results are visible.
    const visible = result === undefined ? false : (result.isResultSet && result.entries.length === 0) ? false : true
    return ({
      ...expression,
      outputs,
      visible
    })
  })
}
Processes an array of expressions by evaluating them, formatting the results,
and determining their visibility.

@param {Array<{from: number, to: number, source: string}>} expressions - An array of objects representing expressions,
  where each object has `from`, `to`, and `source` properties.
@returns {Array<{from: number, to: number, source: string, outputs: any, visible: boolean}>} An array of processed expressions,
  where each object has additional `outputs` and `visible` properties.