Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
UsingParametersStatement.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System.Collections.Generic;
4 
5 using SiliconStudio.Shaders.Ast;
6 
7 namespace SiliconStudio.Paradox.Shaders.Parser.Ast
8 {
9  /// <summary>
10  /// A using params statement.
11  /// </summary>
13  {
14  /// <summary>
15  /// Gets or sets the name.
16  /// </summary>
17  /// <value>The name.</value>
18  public Expression Name { get; set; }
19 
20  /// <summary>
21  /// Gets or sets the body.
22  /// </summary>
23  /// <value>The body.</value>
24  public BlockStatement Body { get; set; }
25 
26  #region Public Methods
27 
28  /// <inheritdoc />
29  public override IEnumerable<Node> Childrens()
30  {
31  ChildrenList.Clear();
32  ChildrenList.Add(Name);
33  ChildrenList.Add(Body);
34  return ChildrenList;
35  }
36 
37  /// <inheritdoc />
38  public override string ToString()
39  {
40  return string.Format("using params {0}{1}", Name, Body != null ? " {...}" : string.Empty);
41  }
42 
43  #endregion
44  }
45 }
Base root class for all statements.
Definition: Statement.cs:11
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes