Esempio n. 1
0
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="context" /> or <paramref name="signature" /> or
        ///     <paramref name="argumentExpressionList" /> is <c>null</c>.
        /// </exception>
        internal LSLFunctionCallNode(
            LSLParser.Expr_FunctionCallContext context,
            ILSLFunctionSignature signature,
            LSLExpressionListNode argumentExpressionList)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            if (signature == null)
            {
                throw new ArgumentNullException("signature");
            }

            if (argumentExpressionList == null)
            {
                throw new ArgumentNullException("argumentExpressionList");
            }


            Signature = signature;

            Name = context.function_name.Text;

            _libraryFunction              = true;
            ArgumentExpressionList        = argumentExpressionList;
            argumentExpressionList.Parent = this;

            SourceRange             = new LSLSourceCodeRange(context);
            SourceRangeOpenParenth  = new LSLSourceCodeRange(context.open_parenth);
            SourceRangeCloseParenth = new LSLSourceCodeRange(context.close_parenth);
            SourceRangeName         = new LSLSourceCodeRange(context.function_name);

            SourceRangesAvailable = true;
        }
Esempio n. 2
0
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="context" /> or <paramref name="preDefinition" /> or
        ///     <paramref name="argumentExpressionList" /> is <c>null</c>.
        /// </exception>
        internal LSLFunctionCallNode(
            LSLParser.Expr_FunctionCallContext context,
            LSLPreDefinedFunctionSignature preDefinition,
            LSLExpressionListNode argumentExpressionList)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            if (preDefinition == null)
            {
                throw new ArgumentNullException("preDefinition");
            }

            if (argumentExpressionList == null)
            {
                throw new ArgumentNullException("argumentExpressionList");
            }

            Definition = preDefinition.DefinitionNode;
            Signature  = preDefinition;

            Name = context.function_name.Text;

            ArgumentExpressionList = argumentExpressionList;

            argumentExpressionList.Parent = this;

            SourceRange             = new LSLSourceCodeRange(context);
            SourceRangeOpenParenth  = new LSLSourceCodeRange(context.open_parenth);
            SourceRangeCloseParenth = new LSLSourceCodeRange(context.close_parenth);
            SourceRangeName         = new LSLSourceCodeRange(context.function_name);

            SourceRangesAvailable = true;
        }
Esempio n. 3
0
 /// <summary>
 /// Exit a parse tree produced by the <c>Expr_FunctionCall</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_FunctionCall([NotNull] LSLParser.Expr_FunctionCallContext context)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Visit a parse tree produced by the <c>Expr_FunctionCall</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_FunctionCall([NotNull] LSLParser.Expr_FunctionCallContext context)
 {
     return(VisitChildren(context));
 }