/// <summary> /// Initializes a new instance of the GlobalCode class. /// </summary> public GlobalCode(IList<Statement>/*!*/ statements, SourceUnit/*!*/ sourceUnit) { Debug.Assert(statements != null && sourceUnit != null); this.sourceUnit = sourceUnit; this.statements = statements.AsArray(); }
public EchoStmt(Text.Span span, IList<Expression>/*!*/ parameters) : base(span) { Debug.Assert(parameters != null); this.parameters = parameters.AsArray(); this.isHtmlCode = false; }
public SwitchStmt(Text.Span span, Expression/*!*/ switchValue, IList<SwitchItem>/*!*/ switchItems) : base(span) { Debug.Assert(switchValue != null && switchItems != null); this.switchValue = switchValue; this.switchItems = switchItems.AsArray(); }
public TryStmt(Text.Span p, IList<Statement>/*!*/ statements, List<CatchItem> catches, FinallyItem finallyItem) : base(p) { Debug.Assert(statements != null); this.statements = statements.AsArray(); this.catches = catches.AsArray(); this.finallyItem = finallyItem; }
public BlockStmt(Text.Span span, IList<Statement>/*!*/body) : base(span) { Debug.Assert(body != null); _statements = body.AsArray(); }
public FunctionDecl(SourceUnit/*!*/ sourceUnit, Text.Span span, Text.Span entireDeclarationPosition, int headingEndPosition, int declarationBodyPosition, bool isConditional, Scope scope, PhpMemberAttributes memberAttributes, string/*!*/ name, NamespaceDecl ns, bool aliasReturn, List<FormalParam>/*!*/ formalParams, List<FormalTypeParam>/*!*/ genericParams, IList<Statement>/*!*/ body, List<CustomAttribute> attributes) : base(span) { Debug.Assert(genericParams != null && name != null && formalParams != null && body != null); this.name = new Name(name); this.ns = ns; 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.AsArray(); this.entireDeclarationPosition = entireDeclarationPosition; this.headingEndPosition = headingEndPosition; this.declarationBodyPosition = declarationBodyPosition; this.IsConditional = isConditional; this.MemberAttributes = memberAttributes; this.Scope = scope; this.SourceUnit = sourceUnit; }
public Signature(bool aliasReturn, IList<FormalParam>/*!*/ formalParams) { this.aliasReturn = aliasReturn; this.formalParams = formalParams.AsArray(); }
public TypeSignature(IList<FormalTypeParam>/*!!*/ typeParams) { Debug.Assert(typeParams != null); this.typeParams = typeParams.AsArray(); }
public MethodDecl(Text.Span span, Text.Span entireDeclarationPosition, int headingEndPosition, int declarationBodyPosition, string name, bool aliasReturn, IList<FormalParam>/*!*/ formalParams, IList<FormalTypeParam>/*!*/ genericParams, IList<Statement> body, PhpMemberAttributes modifiers, IList<ActualParam> baseCtorParams, List<CustomAttribute> attributes) : base(span, attributes) { Debug.Assert(genericParams != null && formalParams != null); this.modifiers = modifiers; this.name = new Name(name); this.signature = new Signature(aliasReturn, formalParams); this.typeSignature = new TypeSignature(genericParams); this.body = (body != null) ? body.AsArray() : null; this.baseCtorParams = (baseCtorParams != null) ? baseCtorParams.AsArray() : null; this.entireDeclarationSpan = entireDeclarationPosition; this.headingEndPosition = headingEndPosition; this.declarationBodyPosition = declarationBodyPosition; }
public FinallyItem(Text.Span span, IList<Statement>/*!*/statements) : base(span) { this.statements = statements.AsArray(); }
public CatchItem(Text.Span p, DirectTypeRef tref, DirectVarUse/*!*/ variable, IList<Statement>/*!*/ statements) : base(p) { Debug.Assert(variable != null && statements != null); this.tref = tref; this.variable = variable; this.statements = statements.AsArray(); }
public LambdaFunctionExpr(SourceUnit/*!*/ sourceUnit, Text.Span span, Text.Span entireDeclarationPosition, int headingEndPosition, int declarationBodyPosition, Scope scope, NamespaceDecl ns, bool aliasReturn, List<FormalParam>/*!*/ formalParams, List<FormalParam> useParams, IList<Statement>/*!*/ body) : base(span) { Debug.Assert(formalParams != null && body != null); Debug.Assert(sourceUnit != null); this.sourceUnit = sourceUnit; this.ns = ns; this.signature = new Signature(aliasReturn, formalParams); this.useParams = useParams; //this.typeSignature = new TypeSignature(genericParams); //this.attributes = new CustomAttributes(attributes); this.body = body.AsArray(); this.entireDeclarationPosition = entireDeclarationPosition; this.headingEndPosition = headingEndPosition; this.declarationBodyPosition = declarationBodyPosition; }
/// <summary> /// Initialize new instance of <see cref="CallSignature"/>. /// </summary> /// <param name="parameters">List of parameters.</param> /// <param name="genericParams">List of type parameters for generics.</param> public CallSignature(IList<ActualParam> parameters, IList<TypeRef> genericParams) { this.parameters = parameters.AsArray(); this.GenericParams = genericParams.AsArray(); }
protected SwitchItem(Text.Span span, IList<Statement>/*!*/ statements) : base(span) { Debug.Assert(statements != null); this.statements = statements.AsArray(); }
public ArrayEx(Text.Span span, IList<Item>/*!*/items) : base(span) { Debug.Assert(items != null); this.items = items.AsArray(); }
/// <summary> /// Initialize the ConcatEx AST node and optimize the subtree if possible. Look for child expressions and chain possible concatenations. This prevents StackOverflowException in case of huge concatenation expressions. /// </summary> /// <param name="span"></param> /// <param name="expressions">List of expressions to concatenate.</param> /// <remarks>This method tries to propagate child concatenations and chain them.</remarks> public ConcatEx(Text.Span span, IList<Expression>/*!*/ expressions) : base(span) { Debug.Assert(expressions != null); this.expressions = expressions.AsArray(); }