本文整理汇总了C#中Crayon.ParseTree.Expression.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Expression.GetType方法的具体用法?C# Expression.GetType怎么用?C# Expression.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Crayon.ParseTree.Expression
的用法示例。
在下文中一共展示了Expression.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TranslateExpression
public void TranslateExpression(List<string> output, Expression expr)
{
if (expr is BinaryOpChain) this.TranslateBinaryOpChain(output, (BinaryOpChain)expr);
else if (expr is Variable) this.TranslateVariable(output, (Variable)expr);
else if (expr is IntegerConstant) this.TranslateIntegerConstant(output, (IntegerConstant)expr);
else if (expr is StructInstance) this.TranslateStructInstance(output, (StructInstance)expr);
else if (expr is NullConstant) this.TranslateNullConstant(output, (NullConstant)expr);
else if (expr is FunctionCall) this.TranslateFunctionCall(output, (FunctionCall)expr);
else if (expr is BracketIndex) this.TranslateBracketIndex(output, (BracketIndex)expr);
else if (expr is BooleanConstant) this.TranslateBooleanConstant(output, (BooleanConstant)expr);
else if (expr is DotStep) this.TranslateDotStep(output, (DotStep)expr);
else if (expr is Increment) throw new ParserException(expr.FirstToken, "++ and -- aren't allowed in translation mode.");
else if (expr is StringConstant) this.TranslateStringConstant(output, (StringConstant)expr);
else if (expr is SystemFunctionCall) this.TranslateSystemFunctionCall(output, (SystemFunctionCall)expr);
else if (expr is NegativeSign) this.TranslateNegativeSign(output, (NegativeSign)expr);
else if (expr is BooleanCombination) this.TranslateBooleanCombination(output, (BooleanCombination)expr);
else if (expr is BooleanNot) this.TranslateBooleanNot(output, (BooleanNot)expr);
else if (expr is FloatConstant) this.TranslateFloatConstant(output, (FloatConstant)expr);
else if (expr is DotStepStruct) this.TranslateDotStepStruct(output, (DotStepStruct)expr);
else if (expr is ListDefinition) ((Crayon.Translator.Python.PythonTranslator)this).TranslateListDefinition(output, (ListDefinition)expr); // this is used by Python switch code
else throw new Exception("Expression type not handled: " + expr.GetType());
}