Ejemplo n.º 1
0
 public LambdaFunctionExpr(
     Text.Span span, Text.Span headingSpan,
     bool aliasReturn, PhpMemberAttributes modifiers, IList <FormalParam> /*!*/ formalParams,
     Text.Span paramSpan, IList <FormalParam> useParams,
     BlockStmt /*!*/ body, TypeRef returnType)
     : this(span, headingSpan, new Signature(aliasReturn, formalParams, paramSpan), useParams, body, returnType)
 {
 }
Ejemplo n.º 2
0
        public TryStmt(Text.Span p, BlockStmt /*!*/ body, List <CatchItem> catches, FinallyItem finallyItem)
            : base(p)
        {
            Debug.Assert(body != null);

            this.body        = body;
            this.catches     = catches.AsArray();
            this.finallyItem = finallyItem;
        }
Ejemplo n.º 3
0
        public CatchItem(Text.Span p, TypeRef tref, DirectVarUse variable, BlockStmt body)
            : base(p)
        {
            Debug.Assert(body != null);

            this.TargetType = tref;
            this.Variable   = variable;
            this.Body       = body;
        }
Ejemplo n.º 4
0
        public CatchItem(Text.Span p, TypeRef tref, DirectVarUse /*!*/ variable,
                         BlockStmt body)
            : base(p)
        {
            Debug.Assert(variable != null && body != null);

            this.tref     = tref;
            this.variable = variable;
            this.body     = body;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Create new method declaration.
        /// </summary>
        /// <param name="span">Entire span.</param>
        /// <param name="name">Method name.</param>
        /// <param name="aliasReturn"><c>true</c> if method returns alias, <c>false</c> otherwise.</param>
        /// <param name="formalParams">Parameters.</param>
        /// <param name="paramsSpan">Span of the parameters including parentheses.</param>
        /// <param name="genericParams">Generic parameters.</param>
        /// <param name="body">Method content.</param>
        /// <param name="modifiers">Method modifiers, visibility etc.</param>
        /// <param name="baseCtorParams">Parameters for the base class constructor.</param>
        /// <param name="returnType">Return type hint, optional.</param>
        public MethodDecl(Text.Span span,
                          NameRef name, bool aliasReturn, IList <FormalParam> /*!*/ formalParams, Text.Span paramsSpan,
                          IList <FormalTypeParam> /*!*/ genericParams, BlockStmt body,
                          PhpMemberAttributes modifiers, IList <ActualParam> baseCtorParams, TypeRef returnType)
            : base(span, modifiers)
        {
            Debug.Assert(genericParams != null && formalParams != null);

            this.name           = name;
            this.signature      = new Signature(aliasReturn, formalParams, paramsSpan);
            this.typeSignature  = new TypeSignature(genericParams);
            this.body           = body;
            this.baseCtorParams = baseCtorParams.AsArray();
            this.returnType     = returnType;
        }
Ejemplo n.º 6
0
        public FunctionDecl(
            Text.Span span,
            bool isConditional, PhpMemberAttributes memberAttributes, NameRef /*!*/ name,
            bool aliasReturn, IList <FormalParam> /*!*/ formalParams, Text.Span paramsSpan, IList <FormalTypeParam> /*!*/ genericParams,
            BlockStmt /*!*/ body, TypeRef returnType)
            : base(span)
        {
            Debug.Assert(genericParams != null && formalParams != null && body != null);

            this.name             = name;
            this.signature        = new Signature(aliasReturn, formalParams, paramsSpan);
            this.typeSignature    = new TypeSignature(genericParams);
            this.body             = body;
            this.IsConditional    = isConditional;
            this.MemberAttributes = memberAttributes;
            this.returnType       = returnType;
        }
Ejemplo n.º 7
0
        public LambdaFunctionExpr(
            Text.Span span, Text.Span headingSpan,
            Scope scope, bool aliasReturn, List <FormalParam> /*!*/ formalParams,
            Text.Span paramSpan, List <FormalParam> useParams,
            BlockStmt /*!*/ body, TypeRef returnType)
            : base(span)
        {
            Debug.Assert(formalParams != null && body != null);

            this.signature = new Signature(aliasReturn, formalParams);
            this.useParams = useParams;
            //this.typeSignature = new TypeSignature(genericParams);
            //this.attributes = new CustomAttributes(attributes);
            this.body           = body;
            this.headingSpan    = headingSpan;
            this.parametersSpan = paramSpan;
            this.returnType     = returnType;
        }
Ejemplo n.º 8
0
 public FunctionDecl(
     Text.Span span, List <FunctionAttribute> attr,
     bool isConditional, PhpMemberAttributes memberAttributes, NameRef /*!*/ name,
     bool aliasReturn, List <FormalParam> /*!*/ formalParams, Text.Span paramsSpan, List <FormalTypeParam> /*!*/ genericParams,
     BlockStmt /*!*/ body, List <CustomAttribute> attributes, TypeRef returnType)
     : base(span)
 {
     Debug.Assert(genericParams != null && formalParams != null && body != null);
     this.attr          = attr;
     this.name          = name;
     this.signature     = new Signature(aliasReturn, formalParams);
     this.typeSignature = new TypeSignature(genericParams);
     if (attributes != null && attributes.Count != 0)
     {
         this.Attributes = new CustomAttributes(attributes);
     }
     this.body             = body;
     this.parametersSpan   = paramsSpan;
     this.IsConditional    = isConditional;
     this.MemberAttributes = memberAttributes;
     this.returnType       = returnType;
 }
Ejemplo n.º 9
0
 public FinallyItem(Text.Span span, BlockStmt body)
     : base(span)
 {
     this.body = body;
 }