private TranslationContext(
     ExpressionAnalysisVisitor analyzer,
     Translator globalTranslator,
     TranslationSettings settings)
 {
     _analyzer         = analyzer;
     _globalTranslator = globalTranslator;
     Settings          = settings;
 }
Example #2
0
        public static ExpressionAnalysis For(Expression expression, TranslationSettings settings)
        {
            switch (expression.NodeType)
            {
            case ExpressionType.DebugInfo:
            case ExpressionType.Default:
            case ExpressionType.Extension:
            case ExpressionType.Parameter:
            case ExpressionType.RuntimeVariables:
                return(settings.EmptyAnalysis);
            }

            var analysis = new ExpressionAnalysis(settings);

            analysis.Visit(expression);
            analysis.Finalise();

            return(analysis);
        }
Example #3
0
 public ExpressionAnalysis(TranslationSettings settings)
 {
     _settings = settings;
 }
 internal TranslationFormattingSettings()
 {
     _wrappedSettings = new TranslationSettings();
 }