Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ExpressionStatement.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;
4 using System.Collections;
5 using System.Collections.Generic;
6 
7 namespace SiliconStudio.Shaders.Ast
8 {
9  /// <summary>
10  /// An expression statement.
11  /// </summary>
13  {
14  #region Constructors and Destructors
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref = "ExpressionStatement" /> class.
18  /// </summary>
20  {
21  }
22 
23  /// <summary>
24  /// Initializes a new instance of the <see cref="ExpressionStatement"/> class.
25  /// </summary>
26  /// <param name="expression">
27  /// The expression.
28  /// </param>
29  public ExpressionStatement(Expression expression)
30  {
31  Expression = expression;
32  }
33 
34  #endregion
35 
36  #region Public Properties
37 
38  /// <summary>
39  /// Gets or sets the expression.
40  /// </summary>
41  /// <value>
42  /// The expression.
43  /// </value>
44  public Expression Expression { get; set; }
45 
46  #endregion
47 
48  #region Public Methods
49 
50  /// <inheritdoc />
51  public override IEnumerable<Node> Childrens()
52  {
53  ChildrenList.Clear();
54  ChildrenList.Add(Expression);
55  return ChildrenList;
56  }
57 
58  /// <inheritdoc />
59  public override string ToString()
60  {
61  return string.Format("{0};", Expression);
62  }
63 
64  #endregion
65  }
66 }
ExpressionStatement(Expression expression)
Initializes a new instance of the ExpressionStatement class.
Base root class for all statements.
Definition: Statement.cs:11
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
ExpressionStatement()
Initializes a new instance of the ExpressionStatement class.