Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
KeywordExpression.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  /// Keyword expression statement like continue; break; discard;
11  /// </summary>
13  {
14  #region Constructors and Destructors
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref="KeywordExpression"/> class.
18  /// </summary>
20  {
21  }
22 
23  /// <summary>
24  /// Initializes a new instance of the <see cref="KeywordExpression"/> class.
25  /// </summary>
26  /// <param name="name">
27  /// The name.
28  /// </param>
30  {
31  Name = name;
32  }
33 
34  #endregion
35 
36  #region Public Properties
37 
38  /// <summary>
39  /// Gets or sets the name.
40  /// </summary>
41  /// <value>
42  /// The name.
43  /// </value>
44  public Identifier Name { 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(Name);
55  return ChildrenList;
56  }
57 
58  /// <inheritdoc/>
59  public override string ToString()
60  {
61  return Name;
62  }
63 
64  #endregion
65  }
66 }
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
Keyword expression statement like continue; break; discard;
KeywordExpression()
Initializes a new instance of the KeywordExpression class.
KeywordExpression(Identifier name)
Initializes a new instance of the KeywordExpression class.