using System;
namespace AnticipatingMinds.Genesis.CodeDOM{
///<summary>Represents a base class for all statements.</summary>
[Serializable]
public abstract class CodeStatement : CodeElement
{
}
/// <summary>
/// Embeded statement
/// </summary>
/// <remarks>
/// The embedded-statement nonterminal is used for statements that appear within other statements.
/// The use of embedded-statement rather than statement excludes the use of declaration statements and labeled statements in these contexts.
/// (ECMA 334. Page 179, Line 8, 20)
/// </remarks>
[Serializable]
public abstract class CodeEmbeddedStatement : CodeStatement
{
}
/// <summary>Represents an empty statement.</summary>
/// <remarks>An empty statement is used when there are no operations to perform
/// in a context where a statement is required.
/// (ECMA 334. Page 181, Line 36)
/// </remarks>
[Serializable]
public class CodeEmptyStatement : CodeEmbeddedStatement
{
}
/// <summary>
/// This class represents a statement as a text snippet.
/// </summary>
[Serializable]
public class CodeStatementSnippet : CodeStatement
{
/// <summary>
/// Initializes new instance of the <see cref="CodeStatementSnippet"/> class.
/// </summary>
public CodeStatementSnippet(){}
public CodeStatementSnippet(string text)
{
Text = text;
}
/// <summary>
/// Gets or sets string representation of an expression.
/// </summary>
public string Text
{
get
{
return text;
}
set
{
text = (value == null ? string.Empty:value);
}
}
private string text = string.Empty;
}
}
|