/// <summary>
        /// Evaluate a table cell expression.
        /// </summary>
        /// <param name="theExpressionNode">The table cell expression node.</param>
        /// <param name="theWorkspace">The workspace.</param>
        /// <returns>A domain value.</returns>
        internal DomainValue Evaluate(TableExpressionNode theExpressionNode, WorkspaceModel theWorkspace)
        {
            Debug.Assert(!string.IsNullOrWhiteSpace(theExpressionNode.TableReferenceNode.Name));

            // The table reference is compulsory
            var theTableTab = (TableTabModel)theWorkspace.GetVisualizerBy(theExpressionNode.TableReferenceNode.Name);
            var theTable    = theTableTab.Table;

            switch (theExpressionNode.InnerExpression)
            {
            case TableRangeExpressionNode rangeExpression:
                return(EvaluateRangeExpression(rangeExpression, theTable));

            case TableListExpressionNode listExpression:
                return(EvaluateListExpression(listExpression, theTable));

            default:
                throw new NotImplementedException("Unknown table expression.");
            }
        }