private static IEnumerable <UnifiedExpression> CreateStatement(IStatement statement)
 {
     return(TypeDispatcher <IEnumerable <UnifiedExpression> > .Create(statement)
            .Case <ProcessAndAssignStatement>(CreateProcessAndAssignStatement)
            .Case <AssignStatement>(CreateAssignStatement)
            .Case <IfStatement>(CreateIfStatement)
            .Case <SwitchStatement>(CreateSwitchStatement)
            .Case <ForLoopStatement>(CreateForStatement)
            .Case <StaticCallExpression>(CreateCallExpression)
            .Case <NewLineToken>(Skip)
            .Case <SpaceToken>(Skip)
            .Case <BlockEndStatement>(Skip)
            .Result());
 }
        private static UnifiedExpression CreatePhrase(IPhrase phrase)
        {
            //var g = phrase.GetType().GetGenericArguments();
            //if (g.Length == 1 && g[0] == typeof(Int32)) {
            //    var value = Int32.Parse(phrase.Text);
            //    return UnifiedIntegerLiteral.CreateInt32(value);
            //}

            return(TypeDispatcher <UnifiedExpression> .Create(phrase)
                   .Case <VariableToken>(CreateVariableToken)
                   .Case <NumberToken <sbyte> >(CreateNumberToken)
                   .Case <NumberToken <short> >(CreateNumberToken)
                   .Case <NumberToken <int> >(CreateNumberToken)
                   .Case <NumberToken <long> >(CreateNumberToken)
                   .Case <NumberToken <byte> >(CreateNumberToken)
                   .Case <NumberToken <ushort> >(CreateNumberToken)
                   .Case <NumberToken <uint> >(CreateNumberToken)
                   .Case <NumberToken <ulong> >(CreateNumberToken)
                   .Case <StringConstPhrase>(CreateStringConstPhrase)
                   .Case <MathFunctionStylePhrase>(CreateMathFunctionStylePhrase)
                   .Case <ConditionSentenceSuffix>(CreateConditionSentenceSuffix)
                   .Result());
        }