/// <exception cref="ArgumentNullException"> /// <paramref name="context" /> or <paramref name="castedExpression" /> is /// <c>null</c>. /// </exception> internal LSLTypecastExprNode(LSLParser.Expr_TypeCastContext context, LSLType result, ILSLExprNode castedExpression) { if (context == null) { throw new ArgumentNullException("context"); } if (castedExpression == null) { throw new ArgumentNullException("castedExpression"); } CastToTypeName = context.cast_type.Text; CastToType = LSLTypeTools.FromLSLTypeName(CastToTypeName); CastedExpression = castedExpression; CastedExpression.Parent = this; Type = result; SourceRange = new LSLSourceCodeRange(context); SourceRangeCloseParenth = new LSLSourceCodeRange(context.close_parenth); SourceRangeOpenParenth = new LSLSourceCodeRange(context.open_parenth); SourceRangeCastToType = new LSLSourceCodeRange(context.cast_type); SourceRangesAvailable = true; }
/// <summary> /// Exit a parse tree produced by the <c>Expr_TypeCast</c> /// labeled alternative in <see cref="LSLParser.expression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitExpr_TypeCast([NotNull] LSLParser.Expr_TypeCastContext context) { }
/// <summary> /// Visit a parse tree produced by the <c>Expr_TypeCast</c> /// labeled alternative in <see cref="LSLParser.expression"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitExpr_TypeCast([NotNull] LSLParser.Expr_TypeCastContext context) { return(VisitChildren(context)); }