📄 generated.cs
字号:
}
public override string ToString() {
return string.Format("[GotoCaseStatement Expression={0}]", Expression);
}
}
public class GotoStatement : Statement {
string label;
public string Label {
get {
return label;
}
set {
label = value ?? "";
}
}
public GotoStatement(string label) {
Label = label;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitGotoStatement(this, data);
}
public override string ToString() {
return string.Format("[GotoStatement Label={0}]", Label);
}
}
public class IdentifierExpression : Expression {
string identifier;
public string Identifier {
get {
return identifier;
}
set {
identifier = value ?? "";
}
}
public IdentifierExpression(string identifier) {
Identifier = identifier;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitIdentifierExpression(this, data);
}
public override string ToString() {
return string.Format("[IdentifierExpression Identifier={0}]", Identifier);
}
}
public class IfElseStatement : Statement {
Expression condition;
List<Statement> trueStatement;
List<Statement> falseStatement;
List<ElseIfSection> elseIfSections;
public Expression Condition {
get {
return condition;
}
set {
condition = value ?? Expression.Null;
if (!condition.IsNull) condition.Parent = this;
}
}
public List<Statement> TrueStatement {
get {
return trueStatement;
}
set {
trueStatement = value ?? new List<Statement>();
}
}
public List<Statement> FalseStatement {
get {
return falseStatement;
}
set {
falseStatement = value ?? new List<Statement>();
}
}
public List<ElseIfSection> ElseIfSections {
get {
return elseIfSections;
}
set {
elseIfSections = value ?? new List<ElseIfSection>();
}
}
public IfElseStatement(Expression condition) {
Condition = condition;
trueStatement = new List<Statement>();
falseStatement = new List<Statement>();
elseIfSections = new List<ElseIfSection>();
}
public IfElseStatement(Expression condition, Statement trueStatement)
: this(condition) {
this.trueStatement.Add(Statement.CheckNull(trueStatement));
}
public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement)
: this(condition) {
this.trueStatement.Add(Statement.CheckNull(trueStatement));
this.falseStatement.Add(Statement.CheckNull(falseStatement));
}
public bool HasElseStatements {
get {
return falseStatement.Count > 0;
}
}
public bool HasElseIfSections {
get {
return elseIfSections.Count > 0;
}
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitIfElseStatement(this, data);
}
public override string ToString() {
return string.Format("[IfElseStatement Condition={0} TrueStatement={1} FalseStatement={2} ElseIfSection" +
"s={3}]", Condition, GetCollectionString(TrueStatement), GetCollectionString(FalseStatement), GetCollectionString(ElseIfSections));
}
}
public class IndexerDeclaration : AttributedNode {
List<ParameterDeclarationExpression> parameters;
List<InterfaceImplementation> interfaceImplementations;
TypeReference typeReference;
Location bodyStart;
Location bodyEnd;
PropertyGetRegion getRegion;
PropertySetRegion setRegion;
public List<ParameterDeclarationExpression> Parameters {
get {
return parameters;
}
set {
parameters = value ?? new List<ParameterDeclarationExpression>();
}
}
public List<InterfaceImplementation> InterfaceImplementations {
get {
return interfaceImplementations;
}
set {
interfaceImplementations = value ?? new List<InterfaceImplementation>();
}
}
public TypeReference TypeReference {
get {
return typeReference;
}
set {
typeReference = value ?? TypeReference.Null;
}
}
public Location BodyStart {
get {
return bodyStart;
}
set {
bodyStart = value;
}
}
public Location BodyEnd {
get {
return bodyEnd;
}
set {
bodyEnd = value;
}
}
public PropertyGetRegion GetRegion {
get {
return getRegion;
}
set {
getRegion = value ?? PropertyGetRegion.Null;
}
}
public PropertySetRegion SetRegion {
get {
return setRegion;
}
set {
setRegion = value ?? PropertySetRegion.Null;
}
}
public IndexerDeclaration(Modifiers modifier, List<ParameterDeclarationExpression> parameters, List<AttributeSection> attributes) :
base(attributes) {
Modifier = modifier;
Parameters = parameters;
interfaceImplementations = new List<InterfaceImplementation>();
typeReference = TypeReference.Null;
bodyStart = Location.Empty;
bodyEnd = Location.Empty;
getRegion = PropertyGetRegion.Null;
setRegion = PropertySetRegion.Null;
}
public IndexerDeclaration(TypeReference typeReference, List<ParameterDeclarationExpression> parameters, Modifiers modifier, List<AttributeSection> attributes) :
base(attributes) {
TypeReference = typeReference;
Parameters = parameters;
Modifier = modifier;
interfaceImplementations = new List<InterfaceImplementation>();
bodyStart = Location.Empty;
bodyEnd = Location.Empty;
getRegion = PropertyGetRegion.Null;
setRegion = PropertySetRegion.Null;
}
public bool HasSetRegion {
get {
return !setRegion.IsNull;
}
}
public bool IsReadOnly {
get {
return HasGetRegion && !HasSetRegion;
}
}
public bool IsWriteOnly {
get {
return !HasGetRegion && HasSetRegion;
}
}
public bool HasGetRegion {
get {
return !getRegion.IsNull;
}
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitIndexerDeclaration(this, data);
}
public override string ToString() {
return string.Format("[IndexerDeclaration Parameters={0} InterfaceImplementations={1} TypeReference={2}" +
" BodyStart={3} BodyEnd={4} GetRegion={5} SetRegion={6} Attributes={7} Modifier={" +
"8}]", GetCollectionString(Parameters), GetCollectionString(InterfaceImplementations), TypeReference, BodyStart, BodyEnd, GetRegion, SetRegion, GetCollectionString(Attributes), Modifier);
}
}
public class IndexerExpression : Expression {
Expression targetObject;
List<Expression> indexes;
public Expression TargetObject {
get {
return targetObject;
}
set {
targetObject = value ?? Expression.Null;
if (!targetObject.IsNull) targetObject.Parent = this;
}
}
public List<Expression> Indexes {
get {
return indexes;
}
set {
indexes = value ?? new List<Expression>();
}
}
public IndexerExpression(Expression targetObject, List<Expression> indexes) {
TargetObject = targetObject;
Indexes = indexes;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitIndexerExpression(this, data);
}
public override string ToString() {
return string.Format("[IndexerExpression TargetObject={0} Indexes={1}]", TargetObject, GetCollectionString(Indexes));
}
}
public class InterfaceImplementation : AbstractNode {
TypeReference interfaceType;
string memberName;
public TypeReference InterfaceType {
get {
return interfaceType;
}
set {
interfaceType = value ?? TypeReference.Null;
}
}
public string MemberName {
get {
return memberName;
}
set {
memberName = string.IsNullOrEmpty(value) ? "?" : value;
}
}
public InterfaceImplementation(TypeReference interfaceType, string memberName) {
InterfaceType = interfaceType;
MemberName = memberName;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitInterfaceImplementation(this, data);
}
public override string ToString() {
return string.Format("[InterfaceImplementation InterfaceType={0} MemberName={1}]", InterfaceType, MemberName);
}
}
public class InvocationExpression : Expression {
Expression targetObject;
List<Expression> arguments;
List<TypeReference> typeArguments;
public Expression TargetObject {
get {
return targetObject;
}
set {
targetObject = value ?? Expression.Null;
if (!targetObject.IsNull) targetObject.Parent = this;
}
}
public List<Expression> Arguments {
get {
return arguments;
}
set {
arguments = value ?? new List<Expression>();
}
}
public List<TypeReference> TypeArguments {
get {
return typeArguments;
}
set {
typeArguments = value ?? new List<TypeReference>();
}
}
public InvocationExpression(Expression targetObject) {
TargetObject = targetObject;
arguments = new List<Expression>();
typeArguments = new List<TypeReference>();
}
public InvocationExpression(Expression targetObject, List<Expression> arguments) {
TargetObject = targetObject;
Arguments = arguments;
typeArguments = new List<TypeReference>();
}
public InvocationExpression(Expression targetObject, List<Expression> arguments, List<TypeReference> typeArguments) {
TargetObject = targetObject;
Arguments = arguments;
TypeArguments = typeArguments;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitInvocationExpression(this, data);
}
public override string ToString() {
return string.Format("[InvocationExpression TargetObject={0} Arguments={1} TypeArguments={2}]", TargetObject, GetCollectionString(Arguments), GetCollectionString(TypeArguments));
}
}
public class LabelStatement : Statement {
string label;
public string Label {
get {
return label;
}
set {
label = value ?? "";
}
}
public LabelStatement(string label) {
Label = label;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitLabelStatement(this, data);
}
public override string ToString() {
return string.Format("[LabelStatement Label={0}]", Label);
}
}
public class LockStatement : StatementWithEmbeddedStatement {
Expression lockExpression;
public Expression LockExpression {
get {
return lockExpression;
}
set {
lockExpression = value ?? Expression.Null;
if (!lockExpression.IsNull) lockExpression.Parent = this;
}
}
public LockStatement(Expression lockExpression, Statement embeddedStatement) {
LockExpression = lockExpression;
EmbeddedStatement = embeddedStatement;
}
public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitLockStatement(this, data);
}
public override string ToString() {
return string.Format("[LockStatement LockExpression={0} EmbeddedStatement={1}]", LockExpression, EmbeddedStatement);
}
}
public class MethodDeclaration : ParametrizedNode {
TypeReference typeReference;
BlockStatement body;
List<string> handlesClause;
List<InterfaceImplementation> interfaceImplementations;
List<TemplateDefinition> templates;
public TypeReference TypeReference {
get {
return typeReference;
}
set {
typeReference = value ?? TypeReference.Null;
}
}
public BlockStatement Body {
get {
return body;
}
set {
body = value ?? BlockStatement.Null;
if (!body.IsNull) body.Parent = this;
}
}
public List<string> HandlesClause {
get {
return handlesClause;
}
set {
handlesClause = value ?? new List<String>();
}
}
public List<InterfaceImplementation> InterfaceImplementations {
get {
return interfaceImplementations;
}
set {
interfaceImplementations = value ?? new List<InterfaceImplementation>();
}
}
public List<TemplateDefinition> Templates {
get {
return templates;
}
set {
templates = value ?? new List<TemplateDefinition>();
}
}
public MethodDeclaration(string name, Modifiers mo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -