86 changed files with 6258 additions and 85 deletions
@ -0,0 +1,200 @@
@@ -0,0 +1,200 @@
|
||||
//
|
||||
// AbstractNode.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public abstract class AbstractNode : INode |
||||
{ |
||||
public static class Roles |
||||
{ |
||||
// some pre defined constants for common roles
|
||||
public const int Identifier = 1; |
||||
public const int Keyword = 2; |
||||
public const int Argument = 3; |
||||
public const int Attribute = 4; |
||||
public const int ReturnType = 5; |
||||
public const int Modifier = 6; |
||||
public const int Body = 7; |
||||
public const int Initializer = 8; |
||||
public const int Condition = 9; |
||||
public const int EmbeddedStatement = 10; |
||||
public const int Iterator = 11; |
||||
public const int Expression = 12; |
||||
public const int Statement = 13; |
||||
public const int TargetExpression = 14; |
||||
public const int Member = 15; |
||||
|
||||
// some pre defined constants for most used punctuation
|
||||
|
||||
public const int LPar = 50; // (
|
||||
public const int RPar = 51; // )
|
||||
|
||||
public const int LBrace = 52; // {
|
||||
public const int RBrace = 53; // }
|
||||
|
||||
public const int LBracket = 54; // [
|
||||
public const int RBracket = 55; // ]
|
||||
|
||||
public const int LChevron = 56; // <
|
||||
public const int RChevron = 57; // >
|
||||
|
||||
public const int Dot = 58; // ,
|
||||
public const int Comma = 59; // ,
|
||||
public const int Colon = 60; // :
|
||||
public const int Semicolon = 61; // ;
|
||||
public const int QuestionMark = 62; // ?
|
||||
|
||||
public const int Assign = 63; // =
|
||||
|
||||
public const int TypeArgument = 64; |
||||
public const int Constraint = 65; |
||||
} |
||||
|
||||
public virtual DomLocation StartLocation { |
||||
get { |
||||
INode child = (INode)FirstChild; |
||||
if (child == null) |
||||
return DomLocation.Empty; |
||||
return child.StartLocation; |
||||
} |
||||
} |
||||
|
||||
public virtual DomLocation EndLocation { |
||||
get { |
||||
INode child = (INode)LastChild; |
||||
if (child == null) |
||||
return DomLocation.Empty; |
||||
return child.EndLocation; |
||||
} |
||||
} |
||||
|
||||
public INode Parent { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public int Role { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode NextSibling { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode PrevSibling { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode FirstChild { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode LastChild { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public IEnumerable<INode> Children { |
||||
get { |
||||
INode cur = FirstChild; |
||||
while (cur != null) { |
||||
yield return cur; |
||||
cur = cur.NextSibling; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public INode GetChildByRole (int role) |
||||
{ |
||||
AbstractNode cur = (AbstractNode)FirstChild; |
||||
while (cur != null) { |
||||
if (cur.Role == role) |
||||
return cur; |
||||
cur = (AbstractNode)cur.NextSibling; |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
public IEnumerable<INode> GetChildrenByRole (int role) |
||||
{ |
||||
AbstractNode cur = (AbstractNode)FirstChild; |
||||
while (cur != null) { |
||||
if (cur.Role == role) |
||||
yield return cur; |
||||
cur = (AbstractNode)cur.NextSibling; |
||||
} |
||||
} |
||||
|
||||
public void AddChild (INode child) |
||||
{ |
||||
child.Parent = this; |
||||
if (FirstChild == null) { |
||||
LastChild = FirstChild = child; |
||||
} else { |
||||
LastChild.NextSibling = child; |
||||
child.PrevSibling = LastChild; |
||||
LastChild = child; |
||||
} |
||||
} |
||||
|
||||
public void AddChild (INode child, int role) |
||||
{ |
||||
child.Role = role; |
||||
AddChild (child); |
||||
} |
||||
|
||||
public void InsertChildBefore (INode nextSibling, INode child, int role) |
||||
{ |
||||
if (FirstChild == null || nextSibling == null) { |
||||
AddChild (child, role); |
||||
return; |
||||
} |
||||
child.Parent = this; |
||||
child.Role = role; |
||||
|
||||
child.NextSibling = nextSibling; |
||||
|
||||
if (nextSibling.PrevSibling != null) { |
||||
child.PrevSibling = nextSibling.PrevSibling; |
||||
nextSibling.PrevSibling.NextSibling = child; |
||||
} |
||||
nextSibling.PrevSibling = child; |
||||
} |
||||
|
||||
public virtual S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return default(S); |
||||
} |
||||
|
||||
} |
||||
} |
||||
@ -0,0 +1,481 @@
@@ -0,0 +1,481 @@
|
||||
//
|
||||
// IDomVisitor.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public abstract class AbtractDomVisitor<T, S> : IDomVisitor<T, S> |
||||
{ |
||||
protected S VisitChildren (INode node, T data) |
||||
{ |
||||
INode child = node.FirstChild as INode; |
||||
while (child != null) { |
||||
child.AcceptVisitor (this, data); |
||||
child = child.NextSibling as INode; |
||||
} |
||||
return default (S); |
||||
} |
||||
|
||||
public virtual S VisitCompilationUnit (CompilationUnit unit, T data) |
||||
{ |
||||
return VisitChildren (unit, data); |
||||
} |
||||
|
||||
public virtual S VisitFullTypeName (FullTypeName fullTypeName, T data) |
||||
{ |
||||
return default (S); |
||||
} |
||||
|
||||
public virtual S VisitIdentifier (Identifier identifier, T data) |
||||
{ |
||||
return default (S); |
||||
} |
||||
|
||||
public virtual S VisitAttribute (Attribute attribute, T data) |
||||
{ |
||||
return VisitChildren (attribute, data); |
||||
} |
||||
|
||||
public virtual S VisitAttributeSection (AttributeSection attributeSection, T data) |
||||
{ |
||||
return VisitChildren (attributeSection, data); |
||||
} |
||||
|
||||
public virtual S VisitDelegateDeclaration (DelegateDeclaration delegateDeclaration, T data) |
||||
{ |
||||
return VisitChildren (delegateDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitNamespaceDeclaration (NamespaceDeclaration namespaceDeclaration, T data) |
||||
{ |
||||
return VisitChildren (namespaceDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitTypeDeclaration (TypeDeclaration typeDeclaration, T data) |
||||
{ |
||||
foreach (INode node in typeDeclaration.GetChildrenByRole (TypeDeclaration.Roles.Member)) { |
||||
node.AcceptVisitor (this, data); |
||||
} |
||||
return default (S); |
||||
} |
||||
|
||||
public virtual S VisitEnumDeclaration (EnumDeclaration enumDeclaration, T data) |
||||
{ |
||||
return VisitChildren (enumDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitEnumMemberDeclaration (EnumMemberDeclaration enumMemberDeclaration, T data) |
||||
{ |
||||
return VisitChildren (enumMemberDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitUsingDeclaration (UsingDeclaration usingDeclaration, T data) |
||||
{ |
||||
return VisitChildren (usingDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitUsingAliasDeclaration (UsingAliasDeclaration usingDeclaration, T data) |
||||
{ |
||||
return VisitChildren (usingDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitConstructorDeclaration (ConstructorDeclaration constructorDeclaration, T data) |
||||
{ |
||||
return VisitChildren (constructorDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitConstructorInitializer (ConstructorInitializer constructorInitializer, T data) |
||||
{ |
||||
return VisitChildren (constructorInitializer, data); |
||||
} |
||||
|
||||
public virtual S VisitDestructorDeclaration (DestructorDeclaration destructorDeclaration, T data) |
||||
{ |
||||
return VisitChildren (destructorDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitEventDeclaration (EventDeclaration eventDeclaration, T data) |
||||
{ |
||||
return VisitChildren (eventDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitFieldDeclaration (FieldDeclaration fieldDeclaration, T data) |
||||
{ |
||||
return VisitChildren (fieldDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitIndexerDeclaration (IndexerDeclaration indexerDeclaration, T data) |
||||
{ |
||||
return VisitChildren (indexerDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitMethodDeclaration (MethodDeclaration methodDeclaration, T data) |
||||
{ |
||||
return VisitChildren (methodDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitOperatorDeclaration (OperatorDeclaration operatorDeclaration, T data) |
||||
{ |
||||
return VisitChildren (operatorDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitPropertyDeclaration (PropertyDeclaration propertyDeclaration, T data) |
||||
{ |
||||
return VisitChildren (propertyDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitAccessorDeclaration (Accessor accessorDeclaration, T data) |
||||
{ |
||||
return VisitChildren (accessorDeclaration, data); |
||||
} |
||||
|
||||
public virtual S VisitVariableInitializer (VariableInitializer variableInitializer, T data) |
||||
{ |
||||
return VisitChildren (variableInitializer, data); |
||||
} |
||||
|
||||
public virtual S VisitParameterDeclarationExpression (ParameterDeclarationExpression parameterDeclarationExpression, T data) |
||||
{ |
||||
return VisitChildren (parameterDeclarationExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitConstraint (Constraint constraint, T data) |
||||
{ |
||||
return VisitChildren (constraint, data); |
||||
} |
||||
|
||||
public virtual S VisitBlockStatement (BlockStatement blockStatement, T data) |
||||
{ |
||||
return VisitChildren (blockStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitExpressionStatement (ExpressionStatement expressionStatement, T data) |
||||
{ |
||||
return VisitChildren (expressionStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitBreakStatement (BreakStatement breakStatement, T data) |
||||
{ |
||||
return VisitChildren (breakStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitCheckedStatement (CheckedStatement checkedStatement, T data) |
||||
{ |
||||
return VisitChildren (checkedStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitContinueStatement (ContinueStatement continueStatement, T data) |
||||
{ |
||||
return VisitChildren (continueStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitEmptyStatement (EmptyStatement emptyStatement, T data) |
||||
{ |
||||
return VisitChildren (emptyStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitFixedStatement (FixedStatement fixedStatement, T data) |
||||
{ |
||||
return VisitChildren (fixedStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitForeachStatement (ForeachStatement foreachStatement, T data) |
||||
{ |
||||
return VisitChildren (foreachStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitForStatement (ForStatement forStatement, T data) |
||||
{ |
||||
return VisitChildren (forStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitGotoStatement (GotoStatement gotoStatement, T data) |
||||
{ |
||||
return VisitChildren (gotoStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitIfElseStatement (IfElseStatement ifElseStatement, T data) |
||||
{ |
||||
return VisitChildren (ifElseStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitLabelStatement (LabelStatement labelStatement, T data) |
||||
{ |
||||
return VisitChildren (labelStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitLockStatement (LockStatement lockStatement, T data) |
||||
{ |
||||
return VisitChildren (lockStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitReturnStatement (ReturnStatement returnStatement, T data) |
||||
{ |
||||
return VisitChildren (returnStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitSwitchStatement (SwitchStatement switchStatement, T data) |
||||
{ |
||||
return VisitChildren (switchStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitSwitchSection (SwitchSection switchSection, T data) |
||||
{ |
||||
return VisitChildren (switchSection, data); |
||||
} |
||||
|
||||
public virtual S VisitCaseLabel (CaseLabel caseLabel, T data) |
||||
{ |
||||
return VisitChildren (caseLabel, data); |
||||
} |
||||
|
||||
public virtual S VisitThrowStatement (ThrowStatement throwStatement, T data) |
||||
{ |
||||
return VisitChildren (throwStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitTryCatchStatement (TryCatchStatement tryCatchStatement, T data) |
||||
{ |
||||
return VisitChildren (tryCatchStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitCatchClause (CatchClause catchClause, T data) |
||||
{ |
||||
return VisitChildren (catchClause, data); |
||||
} |
||||
|
||||
public virtual S VisitUncheckedStatement (UncheckedStatement uncheckedStatement, T data) |
||||
{ |
||||
return VisitChildren (uncheckedStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitUnsafeStatement (UnsafeStatement unsafeStatement, T data) |
||||
{ |
||||
return VisitChildren (unsafeStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitUsingStatement (UsingStatement usingStatement, T data) |
||||
{ |
||||
return VisitChildren (usingStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitVariableDeclarationStatement (VariableDeclarationStatement variableDeclarationStatement, T data) |
||||
{ |
||||
return VisitChildren (variableDeclarationStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitWhileStatement (WhileStatement whileStatement, T data) |
||||
{ |
||||
return VisitChildren (whileStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitYieldStatement (YieldStatement yieldStatement, T data) |
||||
{ |
||||
return VisitChildren (yieldStatement, data); |
||||
} |
||||
|
||||
public virtual S VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression, T data) |
||||
{ |
||||
return VisitChildren (anonymousMethodExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitLambdaExpression (LambdaExpression lambdaExpression, T data) |
||||
{ |
||||
return VisitChildren (lambdaExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitAssignmentExpression (AssignmentExpression assignmentExpression, T data) |
||||
{ |
||||
return VisitChildren (assignmentExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitBaseReferenceExpression (BaseReferenceExpression baseReferenceExpression, T data) |
||||
{ |
||||
return VisitChildren (baseReferenceExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression, T data) |
||||
{ |
||||
return VisitChildren (binaryOperatorExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitCastExpression (CastExpression castExpression, T data) |
||||
{ |
||||
return VisitChildren (castExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitCheckedExpression (CheckedExpression checkedExpression, T data) |
||||
{ |
||||
return VisitChildren (checkedExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitConditionalExpression (ConditionalExpression conditionalExpression, T data) |
||||
{ |
||||
return VisitChildren (conditionalExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitIdentifierExpression (IdentifierExpression identifierExpression, T data) |
||||
{ |
||||
return VisitChildren (identifierExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitIndexerExpression (IndexerExpression indexerExpression, T data) |
||||
{ |
||||
return VisitChildren (indexerExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitInvocationExpression (InvocationExpression invocationExpression, T data) |
||||
{ |
||||
return VisitChildren (invocationExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitMemberReferenceExpression (MemberReferenceExpression memberReferenceExpression, T data) |
||||
{ |
||||
return VisitChildren (memberReferenceExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitNullReferenceExpression (NullReferenceExpression nullReferenceExpression, T data) |
||||
{ |
||||
return VisitChildren (nullReferenceExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression, T data) |
||||
{ |
||||
return VisitChildren (objectCreateExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitArrayObjectCreateExpression (ArrayObjectCreateExpression arrayObjectCreateExpression, T data) |
||||
{ |
||||
return VisitChildren (arrayObjectCreateExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitParenthesizedExpression (ParenthesizedExpression parenthesizedExpression, T data) |
||||
{ |
||||
return VisitChildren (parenthesizedExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitPointerReferenceExpression (PointerReferenceExpression pointerReferenceExpression, T data) |
||||
{ |
||||
return VisitChildren (pointerReferenceExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, T data) |
||||
{ |
||||
return VisitChildren (primitiveExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitSizeOfExpression (SizeOfExpression sizeOfExpression, T data) |
||||
{ |
||||
return VisitChildren (sizeOfExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitStackAllocExpression (StackAllocExpression stackAllocExpression, T data) |
||||
{ |
||||
return VisitChildren (stackAllocExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, T data) |
||||
{ |
||||
return VisitChildren (thisReferenceExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitTypeOfExpression (TypeOfExpression typeOfExpression, T data) |
||||
{ |
||||
return VisitChildren (typeOfExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression, T data) |
||||
{ |
||||
return VisitChildren (unaryOperatorExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitUncheckedExpression (UncheckedExpression uncheckedExpression, T data) |
||||
{ |
||||
return VisitChildren (uncheckedExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionFromClause (QueryExpressionFromClause queryExpressionFromClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionFromClause, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionWhereClause (QueryExpressionWhereClause queryExpressionWhereClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionWhereClause, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionJoinClause (QueryExpressionJoinClause queryExpressionJoinClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionJoinClause, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionGroupClause (QueryExpressionGroupClause queryExpressionGroupClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionGroupClause, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionLetClause (QueryExpressionLetClause queryExpressionLetClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionLetClause, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionOrderClause (QueryExpressionOrderClause queryExpressionOrderClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionOrderClause, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionOrdering (QueryExpressionOrdering queryExpressionOrdering, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionOrdering, data); |
||||
} |
||||
|
||||
public virtual S VisitQueryExpressionSelectClause (QueryExpressionSelectClause queryExpressionSelectClause, T data) |
||||
{ |
||||
return VisitChildren (queryExpressionSelectClause, data); |
||||
} |
||||
|
||||
public virtual S VisitAsExpression (AsExpression asExpression, T data) |
||||
{ |
||||
return VisitChildren (asExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitIsExpression (IsExpression isExpression, T data) |
||||
{ |
||||
return VisitChildren (isExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitDefaultValueExpression (DefaultValueExpression defaultValueExpression, T data) |
||||
{ |
||||
return VisitChildren (defaultValueExpression, data); |
||||
} |
||||
|
||||
public virtual S VisitArgListExpression (ArgListExpression argListExpression, T data) |
||||
{ |
||||
return VisitChildren (argListExpression, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// CSharpModifierToken.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
|
||||
public class CSharpModifierToken : CSharpTokenNode |
||||
{ |
||||
Modifiers modifier; |
||||
|
||||
public Modifiers Modifier { |
||||
get { return modifier; } |
||||
set { |
||||
modifier = value; |
||||
if (!lengthTable.TryGetValue (modifier, out tokenLength)) |
||||
throw new InvalidOperationException ("Modifier " + modifier + " is invalid."); |
||||
} |
||||
} |
||||
|
||||
static Dictionary<Modifiers, int> lengthTable = new Dictionary<Modifiers, int> (); |
||||
static CSharpModifierToken () |
||||
{ |
||||
lengthTable[Modifiers.New] = "new".Length; |
||||
lengthTable[Modifiers.Public] = "new".Length; |
||||
lengthTable[Modifiers.Protected] = "protected".Length; |
||||
lengthTable[Modifiers.Private] = "private".Length; |
||||
lengthTable[Modifiers.Internal] = "internal".Length; |
||||
lengthTable[Modifiers.Abstract] = "abstract".Length; |
||||
lengthTable[Modifiers.Virtual] = "virtual".Length; |
||||
lengthTable[Modifiers.Sealed] = "sealed".Length; |
||||
lengthTable[Modifiers.Static] = "static".Length; |
||||
lengthTable[Modifiers.Override] = "override".Length; |
||||
lengthTable[Modifiers.Readonly] = "readonly".Length; |
||||
lengthTable[Modifiers.Const] = "const".Length; |
||||
lengthTable[Modifiers.Partial] = "partial".Length; |
||||
lengthTable[Modifiers.Extern] = "extern".Length; |
||||
lengthTable[Modifiers.Volatile] = "volatile".Length; |
||||
lengthTable[Modifiers.Unsafe] = "unsafe".Length; |
||||
lengthTable[Modifiers.Overloads] = "override".Length; |
||||
} |
||||
|
||||
public CSharpModifierToken (DomLocation location, Modifiers modifier) : base (location, 0) |
||||
{ |
||||
this.Modifier = modifier; |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// TokenNode.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class CSharpTokenNode : AbstractNode |
||||
{ |
||||
DomLocation startLocation; |
||||
public override DomLocation StartLocation { |
||||
get { |
||||
return startLocation; |
||||
} |
||||
} |
||||
|
||||
protected int tokenLength; |
||||
public override DomLocation EndLocation { |
||||
get { |
||||
return new DomLocation (StartLocation.Line, StartLocation.Column + tokenLength); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode (DomLocation location, int tokenLength) |
||||
{ |
||||
this.startLocation = location; |
||||
this.tokenLength = tokenLength; |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return default (S); |
||||
} |
||||
|
||||
public override string ToString () |
||||
{ |
||||
return string.Format ("[CSharpTokenNode: StartLocation={0}, EndLocation={1}, Role={2}]", StartLocation, EndLocation, Role); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// CompilationUnit.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class CompilationUnit : AbstractNode |
||||
{ |
||||
public CompilationUnit () |
||||
{ |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitCompilationUnit (this, data); |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,139 @@
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// DomLocation.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
[Serializable] |
||||
public struct DomLocation : IComparable<DomLocation>, IEquatable<DomLocation> |
||||
{ |
||||
public bool IsEmpty { |
||||
get { |
||||
return Line < 0; |
||||
} |
||||
} |
||||
|
||||
public int Line { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public int Column { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public static DomLocation Empty { |
||||
get { |
||||
return new DomLocation (-1, -1); |
||||
} |
||||
} |
||||
|
||||
public DomLocation (int line, int column) : this () |
||||
{ |
||||
this.Line = line; |
||||
this.Column = column; |
||||
} |
||||
|
||||
public override bool Equals (object other) |
||||
{ |
||||
if (!(other is DomLocation)) |
||||
return false; |
||||
return (DomLocation)other == this; |
||||
} |
||||
|
||||
public override int GetHashCode () |
||||
{ |
||||
return Line + Column * 5000; |
||||
} |
||||
|
||||
public bool Equals (DomLocation other) |
||||
{ |
||||
return other == this; |
||||
} |
||||
|
||||
public int CompareTo (DomLocation other) |
||||
{ |
||||
if (this == other) |
||||
return 0; |
||||
if (this < other) |
||||
return -1; |
||||
return 1; |
||||
} |
||||
|
||||
public override string ToString () |
||||
{ |
||||
return String.Format ("[DomLocation: Line={0}, Column={1}]", Line, Column); |
||||
} |
||||
|
||||
public static DomLocation FromInvariantString (string invariantString) |
||||
{ |
||||
if (invariantString.ToUpper () == "EMPTY") |
||||
return DomLocation.Empty; |
||||
string[] splits = invariantString.Split (',', '/'); |
||||
if (splits.Length == 2) |
||||
return new DomLocation (Int32.Parse (splits[0]), Int32.Parse (splits[1])); |
||||
return DomLocation.Empty; |
||||
} |
||||
|
||||
public string ToInvariantString () |
||||
{ |
||||
if (IsEmpty) |
||||
return "Empty"; |
||||
return String.Format ("{0}/{1}", Line, Column); |
||||
} |
||||
|
||||
public static bool operator==(DomLocation left, DomLocation right) |
||||
{ |
||||
return left.Line == right.Line && left.Column == right.Column; |
||||
} |
||||
|
||||
public static bool operator!=(DomLocation left, DomLocation right) |
||||
{ |
||||
return left.Line != right.Line || left.Column != right.Column; |
||||
} |
||||
|
||||
public static bool operator<(DomLocation left, DomLocation right) |
||||
{ |
||||
return left.Line < right.Line || left.Line == right.Line && left.Column < right.Column; |
||||
} |
||||
public static bool operator>(DomLocation left, DomLocation right) |
||||
{ |
||||
return left.Line > right.Line || left.Line == right.Line && left.Column > right.Column; |
||||
} |
||||
public static bool operator<=(DomLocation left, DomLocation right) |
||||
{ |
||||
return !(left > right); |
||||
} |
||||
public static bool operator>=(DomLocation left, DomLocation right) |
||||
{ |
||||
return !(left < right); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// AnonymousMethodExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class AnonymousMethodExpression : AbstractNode |
||||
{ |
||||
public IEnumerable<ParameterDeclarationExpression> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <ParameterDeclarationExpression>(); |
||||
} |
||||
} |
||||
|
||||
public BlockStatement Body { |
||||
get { |
||||
return (BlockStatement)GetChildByRole (Roles.Body); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitAnonymousMethodExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ArgListExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
/// <summary>
|
||||
/// Represents the undocumented __arglist keyword.
|
||||
/// </summary>
|
||||
public class ArgListExpression : AbstractNode |
||||
{ |
||||
public bool IsAccess { // access is __arglist, otherwise it's __arlist (a1, a2, ..., an)
|
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public CSharpTokenNode Keyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public IEnumerable<INode> Arguments { |
||||
get { return GetChildrenByRole (Roles.Argument).Cast<INode> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitArgListExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// ObjectCreateExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ArrayObjectCreateExpression : ObjectCreateExpression |
||||
{ |
||||
public CSharpTokenNode Rank { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitArrayObjectCreateExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// AsExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class AsExpression : AbstractNode |
||||
{ |
||||
public FullTypeName TypeReference { |
||||
get { return (FullTypeName)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitAsExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,90 @@
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// AssignmentExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class AssignmentExpression : AbstractNode |
||||
{ |
||||
public const int LeftExpressionRole = 100; |
||||
public const int RightExpressionRole = 101; |
||||
public const int OperatorRole = 102; |
||||
|
||||
public AssignmentOperatorType AssignmentOperatorType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode Left { |
||||
get { return GetChildByRole (LeftExpressionRole); } |
||||
} |
||||
|
||||
public INode Right { |
||||
get { return GetChildByRole (RightExpressionRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode Operator { |
||||
get { return (CSharpTokenNode)GetChildByRole (OperatorRole); } |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitAssignmentExpression (this, data); |
||||
} |
||||
} |
||||
|
||||
public enum AssignmentOperatorType |
||||
{ |
||||
/// <summary>left = right</summary>
|
||||
Assign, |
||||
|
||||
/// <summary>left += right</summary>
|
||||
Add, |
||||
/// <summary>left -= right</summary>
|
||||
Subtract, |
||||
/// <summary>left *= right</summary>
|
||||
Multiply, |
||||
/// <summary>left /= right</summary>
|
||||
Divide, |
||||
/// <summary>left %= right</summary>
|
||||
Modulus, |
||||
|
||||
/// <summary>left <<= right</summary>
|
||||
ShiftLeft, |
||||
/// <summary>left >>= right</summary>
|
||||
ShiftRight, |
||||
|
||||
/// <summary>left &= right</summary>
|
||||
BitwiseAnd, |
||||
/// <summary>left |= right</summary>
|
||||
BitwiseOr, |
||||
/// <summary>left ^= right</summary>
|
||||
ExclusiveOr, |
||||
} |
||||
} |
||||
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// BaseReferenceExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class BaseReferenceExpression : AbstractNode |
||||
{ |
||||
public DomLocation Location { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public override DomLocation StartLocation { |
||||
get { |
||||
return Location; |
||||
} |
||||
} |
||||
public override DomLocation EndLocation { |
||||
get { |
||||
return new DomLocation (Location.Line, Location.Column + "base".Length); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitBaseReferenceExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,106 @@
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// BinaryOperatorExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class BinaryOperatorExpression : AbstractNode |
||||
{ |
||||
public const int LeftExpressionRole = 100; |
||||
public const int RightExpressionRole = 101; |
||||
public const int OperatorRole = 102; |
||||
|
||||
public BinaryOperatorType BinaryOperatorType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public CSharpTokenNode Operator { |
||||
get { return (CSharpTokenNode)GetChildByRole (OperatorRole); } |
||||
} |
||||
|
||||
public INode Left { |
||||
get { return GetChildByRole (LeftExpressionRole); } |
||||
} |
||||
|
||||
public INode Right { |
||||
get { return GetChildByRole (RightExpressionRole); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitBinaryOperatorExpression (this, data); |
||||
} |
||||
} |
||||
|
||||
public enum BinaryOperatorType |
||||
{ |
||||
/// <summary>left & right</summary>
|
||||
BitwiseAnd, |
||||
/// <summary>left | right</summary>
|
||||
BitwiseOr, |
||||
/// <summary>left && right</summary>
|
||||
LogicalAnd, |
||||
/// <summary>left || right</summary>
|
||||
LogicalOr, |
||||
/// <summary>left ^ right</summary>
|
||||
ExclusiveOr, |
||||
|
||||
/// <summary>left > right</summary>
|
||||
GreaterThan, |
||||
/// <summary>left >= right</summary>
|
||||
GreaterThanOrEqual, |
||||
/// <summary>left == right</summary>
|
||||
Equality, |
||||
/// <summary>left != right</summary>
|
||||
InEquality, |
||||
/// <summary>left < right</summary>
|
||||
LessThan, |
||||
/// <summary>left <= right</summary>
|
||||
LessThanOrEqual, |
||||
|
||||
/// <summary>left + right</summary>
|
||||
Add, |
||||
/// <summary>left - right</summary>
|
||||
Subtract, |
||||
/// <summary>left * right</summary>
|
||||
Multiply, |
||||
/// <summary>left / right</summary>
|
||||
Divide, |
||||
/// <summary>left % right</summary>
|
||||
Modulus, |
||||
|
||||
/// <summary>left << right</summary>
|
||||
ShiftLeft, |
||||
/// <summary>left >> right</summary>
|
||||
ShiftRight, |
||||
|
||||
/// <summary>left ?? right</summary>
|
||||
NullCoalescing |
||||
} |
||||
} |
||||
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// CastExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class CastExpression : AbstractNode |
||||
{ |
||||
public INode CastTo { |
||||
get { return (INode)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitCastExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// CheckedExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class CheckedExpression : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitCheckedExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ConditionalExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
/// <summary>
|
||||
/// cond ? true : false
|
||||
/// </summary>
|
||||
public class ConditionalExpression : AbstractNode |
||||
{ |
||||
public const int TrueExpressionRole = 100; |
||||
public const int FalseExpressionRole = 101; |
||||
|
||||
public INode TrueExpression { |
||||
get { return GetChildByRole (TrueExpressionRole); } |
||||
} |
||||
|
||||
public INode FalseExpression { |
||||
get { return GetChildByRole (FalseExpressionRole); } |
||||
} |
||||
|
||||
public INode Condition { |
||||
get { return GetChildByRole (Roles.Condition); } |
||||
} |
||||
|
||||
public CSharpTokenNode QuestionMark { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.QuestionMark); } |
||||
} |
||||
|
||||
public CSharpTokenNode Colon { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Colon); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitConditionalExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// DefaultValueExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class DefaultValueExpression : AbstractNode |
||||
{ |
||||
public FullTypeName TypeReference { |
||||
get { return (FullTypeName)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitDefaultValueExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// IdentifierExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class IdentifierExpression : AbstractNode |
||||
{ |
||||
public Identifier Identifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitIdentifierExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// IndexerExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class IndexerExpression : AbstractNode |
||||
{ |
||||
public INode Target { |
||||
get { return (INode)GetChildByRole (Roles.TargetExpression); } |
||||
} |
||||
|
||||
public CSharpTokenNode LBracket { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBracket); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBracket { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBracket); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<INode> Arguments { |
||||
get { return GetChildrenByRole (Roles.Argument); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitIndexerExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// InvocationExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class InvocationExpression : AbstractNode |
||||
{ |
||||
public INode Target { |
||||
get { return GetChildByRole (Roles.TargetExpression); } |
||||
} |
||||
|
||||
public IEnumerable<INode> Arguments { |
||||
get { return GetChildrenByRole (Roles.Argument).Cast<INode> (); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitInvocationExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// TypeOfIsExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class IsExpression : AbstractNode |
||||
{ |
||||
public FullTypeName TypeReference { |
||||
get { return (FullTypeName)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitIsExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// LambdaExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class LambdaExpression : AbstractNode |
||||
{ |
||||
public IEnumerable<ParameterDeclarationExpression> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <ParameterDeclarationExpression>(); |
||||
} |
||||
} |
||||
|
||||
public BlockStatement Body { |
||||
get { |
||||
return (BlockStatement)GetChildByRole (Roles.Body); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode Arrow { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Assign); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitLambdaExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// MemberReferenceExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class MemberReferenceExpression : AbstractNode |
||||
{ |
||||
public INode Target { |
||||
get { return GetChildByRole (Roles.TargetExpression); } |
||||
} |
||||
|
||||
public INode Identifier { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<INode> TypeArguments { |
||||
get { return GetChildrenByRole (Roles.TypeArgument).Cast<INode> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitMemberReferenceExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// NullReferenceExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class NullReferenceExpression : AbstractNode |
||||
{ |
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitNullReferenceExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ObjectCreateExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ObjectCreateExpression : AbstractNode |
||||
{ |
||||
public INode Type { |
||||
get { return (INode)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public IEnumerable<INode> Arguments { |
||||
get { return GetChildrenByRole (Roles.Argument); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitObjectCreateExpression (this, data); |
||||
} |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ParenthesizedExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ParenthesizedExpression : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitParenthesizedExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// PointerReferenceExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
/// <summary>
|
||||
/// Same as member reference, only with pointer as base (a->b)
|
||||
/// </summary>
|
||||
public class PointerReferenceExpression : MemberReferenceExpression |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.TargetExpression); } |
||||
} |
||||
|
||||
public string Dim { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitPointerReferenceExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// PrimitiveExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class PrimitiveExpression : AbstractNode |
||||
{ |
||||
DomLocation startLocation; |
||||
public override DomLocation StartLocation { |
||||
get { |
||||
return startLocation; |
||||
} |
||||
} |
||||
|
||||
int length; |
||||
public override DomLocation EndLocation { |
||||
get { |
||||
return new DomLocation (StartLocation.Line, StartLocation.Column + length); |
||||
} |
||||
} |
||||
|
||||
public object Value { |
||||
get; |
||||
private set; |
||||
} |
||||
|
||||
public PrimitiveExpression (object value, DomLocation startLocation, int length) |
||||
{ |
||||
this.Value = value; |
||||
this.startLocation = startLocation; |
||||
this.length = length; |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitPrimitiveExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,291 @@
@@ -0,0 +1,291 @@
|
||||
//
|
||||
// QueryExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Collections.Generic; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class QueryExpressionFromClause : AbstractNode |
||||
{ |
||||
public const int FromKeywordRole = 100; |
||||
public const int InKeywordRole = 101; |
||||
|
||||
public INode Type { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.ReturnType); |
||||
} |
||||
} |
||||
|
||||
public string Identifier { |
||||
get { |
||||
return QueryIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier QueryIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionFromClause (this, data); |
||||
} |
||||
} |
||||
|
||||
public class QueryExpressionJoinClause : QueryExpressionFromClause |
||||
{ |
||||
public const int OnExpressionRole = 100; |
||||
public const int EqualsExpressionRole = 101; |
||||
public const int IntoIdentifierRole = 102; |
||||
|
||||
public const int JoinKeywordRole = 110; |
||||
public new const int InKeywordRole = 111; |
||||
public const int OnKeywordRole = 112; |
||||
public const int EqualsKeywordRole = 113; |
||||
public const int IntoKeywordRole = 114; |
||||
|
||||
public CSharpTokenNode JoinKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (JoinKeywordRole); } |
||||
} |
||||
public CSharpTokenNode InKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (InKeywordRole); } |
||||
} |
||||
public CSharpTokenNode OnKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (OnKeywordRole); } |
||||
} |
||||
public CSharpTokenNode EqualsKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (EqualsKeywordRole); } |
||||
} |
||||
public CSharpTokenNode IntoKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (IntoKeywordRole); } |
||||
} |
||||
|
||||
|
||||
public INode OnExpression { |
||||
get { |
||||
return GetChildByRole (OnExpressionRole); |
||||
} |
||||
} |
||||
|
||||
public INode EqualsExpression { |
||||
get { |
||||
return GetChildByRole (EqualsExpressionRole); |
||||
} |
||||
} |
||||
|
||||
public string IntoIdentifier { |
||||
get { |
||||
return IntoIdentifierIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier IntoIdentifierIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (IntoIdentifierRole); |
||||
} |
||||
} |
||||
|
||||
public INode InExpression { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.Expression); |
||||
} |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionJoinClause (this, data); |
||||
} |
||||
} |
||||
|
||||
public class QueryExpressionGroupClause : AbstractNode |
||||
{ |
||||
public const int ProjectionExpressionRole = 100; |
||||
public const int GroupByExpressionRole = 101; |
||||
|
||||
public const int GroupKeywordRole = 102; |
||||
public const int ByKeywordRole = 103; |
||||
|
||||
public CSharpTokenNode GroupKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (GroupKeywordRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode ByKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (ByKeywordRole); } |
||||
} |
||||
|
||||
public INode Projection { |
||||
get { |
||||
return GetChildByRole (ProjectionExpressionRole); |
||||
} |
||||
} |
||||
|
||||
public INode GroupBy { |
||||
get { |
||||
return GetChildByRole (GroupByExpressionRole); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionGroupClause (this, data); |
||||
} |
||||
} |
||||
|
||||
public class QueryExpressionLetClause : AbstractNode |
||||
{ |
||||
public string Identifier { |
||||
get { |
||||
return QueryIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier QueryIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { |
||||
return GetChildByRole (Roles.Expression); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LetKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public INode Assign { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.Assign); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionLetClause (this, data); |
||||
} |
||||
} |
||||
|
||||
public class QueryExpressionOrderClause : AbstractNode |
||||
{ |
||||
public const int OrderingRole = 100; |
||||
|
||||
public bool OrderAscending { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { |
||||
return GetChildByRole (Roles.Expression); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode Keyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionOrderClause (this, data); |
||||
} |
||||
} |
||||
|
||||
public class QueryExpressionOrdering : AbstractNode |
||||
{ |
||||
public QueryExpressionOrderingDirection Direction { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode Criteria { |
||||
get { |
||||
return GetChildByRole (Roles.Expression); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionOrdering (this, data); |
||||
} |
||||
} |
||||
|
||||
public enum QueryExpressionOrderingDirection |
||||
{ |
||||
Unknown, |
||||
Ascending, |
||||
Descending |
||||
} |
||||
|
||||
public class QueryExpressionSelectClause : AbstractNode |
||||
{ |
||||
public CSharpTokenNode SelectKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public INode Projection { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.Expression); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionSelectClause (this, data); |
||||
} |
||||
} |
||||
|
||||
public class QueryExpressionWhereClause : AbstractNode |
||||
{ |
||||
public CSharpTokenNode WhereKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public INode Condition { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.Condition); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitQueryExpressionWhereClause (this, data); |
||||
} |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// SizeOfExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class SizeOfExpression : AbstractNode |
||||
{ |
||||
public FullTypeName Type { |
||||
get { |
||||
return (FullTypeName)GetChildByRole (Roles.ReturnType); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitSizeOfExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// StackAllocExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class StackAllocExpression : AbstractNode |
||||
{ |
||||
public const int StackAllocKeywordRole = 100; |
||||
|
||||
public FullTypeName Type { |
||||
get { |
||||
return (FullTypeName)GetChildByRole (Roles.ReturnType); |
||||
} |
||||
} |
||||
|
||||
public INode CountExpression { |
||||
get { return (INode)GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public CSharpTokenNode StackAllocKeyword { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (StackAllocKeywordRole); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LBracket { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBracket); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBracket { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBracket); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitStackAllocExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// ThisReferenceExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ThisReferenceExpression : AbstractNode |
||||
{ |
||||
public DomLocation Location { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public override DomLocation StartLocation { |
||||
get { |
||||
return Location; |
||||
} |
||||
} |
||||
public override DomLocation EndLocation { |
||||
get { |
||||
return new DomLocation (Location.Line, Location.Column + "this".Length); |
||||
} |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitThisReferenceExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// TypeOfExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class TypeOfExpression : AbstractNode |
||||
{ |
||||
public FullTypeName Type { |
||||
get { |
||||
return (FullTypeName)GetChildByRole (Roles.ReturnType); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitTypeOfExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// UnaryOperatorExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UnaryOperatorExpression : AbstractNode |
||||
{ |
||||
public const int Operator = 100; |
||||
|
||||
public UnaryOperatorType UnaryOperatorType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUnaryOperatorExpression (this, data); |
||||
} |
||||
} |
||||
|
||||
public enum UnaryOperatorType |
||||
{ |
||||
/// <summary>Logical not (!a)</summary>
|
||||
Not, |
||||
/// <summary>Bitwise not (~a)</summary>
|
||||
BitNot, |
||||
/// <summary>Unary minus (-a)</summary>
|
||||
Minus, |
||||
/// <summary>Unary plus (+a)</summary>
|
||||
Plus, |
||||
/// <summary>Pre increment (++a)</summary>
|
||||
Increment, |
||||
/// <summary>Pre decrement (--a)</summary>
|
||||
Decrement, |
||||
/// <summary>Post increment (a++)</summary>
|
||||
PostIncrement, |
||||
/// <summary>Post decrement (a--)</summary>
|
||||
PostDecrement, |
||||
/// <summary>Dereferencing (*a)</summary>
|
||||
Dereference, |
||||
/// <summary>Get address (&a)</summary>
|
||||
AddressOf |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// UncheckedExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UncheckedExpression : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUncheckedExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// FullTypeName.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class FullTypeName : AbstractNode |
||||
{ |
||||
public Identifier Identifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<INode> TypeArguments { |
||||
get { return GetChildrenByRole (Roles.TypeArgument).Cast<INode> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitFullTypeName (this, data); |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,60 @@
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// Attribute.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class Attribute : AbstractNode |
||||
{ |
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.QualifiedName; |
||||
} |
||||
} |
||||
|
||||
public QualifiedIdentifier NameIdentifier { |
||||
get { |
||||
return (QualifiedIdentifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
// Todo: Arguments should not be nodes, instead it should be expressions, change when it's implemented.
|
||||
public IEnumerable<INode> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <INode>(); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitAttribute (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// AttributeSection.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class AttributeSection : AbstractNode |
||||
{ |
||||
const int TargetRole = 101; |
||||
|
||||
public AttributeTarget AttributeTarget { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public Identifier TargetIdentifier { |
||||
get { return (Identifier)GetChildByRole (TargetRole); } |
||||
} |
||||
|
||||
public IEnumerable<Attribute> Attributes { |
||||
get { return base.GetChildrenByRole (Roles.Attribute).Cast<Attribute> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitAttributeSection (this, data); |
||||
} |
||||
} |
||||
|
||||
public enum AttributeTarget { |
||||
None, |
||||
Assembly, |
||||
Module, |
||||
|
||||
Type, |
||||
Param, |
||||
Field, |
||||
Return, |
||||
Method, |
||||
Unknown |
||||
} |
||||
} |
||||
@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// Constraint.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class Constraint : AbstractNode |
||||
{ |
||||
public CSharpTokenNode WhereKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public Identifier TypeParameter { |
||||
get { return (Identifier)GetChildByRole (Roles.Identifier); } |
||||
} |
||||
|
||||
public CSharpTokenNode Colon { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Colon); } |
||||
} |
||||
|
||||
public IEnumerable<INode> TypeArguments { |
||||
get { return GetChildrenByRole (Roles.TypeArgument).Cast<INode> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitConstraint (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// DelegateDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class DelegateDeclaration : AbstractNode |
||||
{ |
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier NameIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public INode ReturnType { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.ReturnType); |
||||
} |
||||
} |
||||
|
||||
// Todo: Arguments should not be nodes, instead it should be expressions, change when it's implemented.
|
||||
public IEnumerable<INode> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <INode>(); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<AttributeSection> Attributes { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Attribute).Cast <AttributeSection>(); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<INode> Modifiers { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Modifier); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitDelegateDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,87 @@
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// EnumDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class EnumDeclaration : TypeDeclaration |
||||
{ |
||||
const int EnumMemberDeclarationRole = 100; |
||||
|
||||
public IEnumerable<EnumMemberDeclaration> Members { |
||||
get { |
||||
return base.GetChildrenByRole (EnumMemberDeclarationRole).Cast <EnumMemberDeclaration>(); |
||||
} |
||||
} |
||||
|
||||
public override ClassType ClassType { |
||||
get { |
||||
return ClassType.Enum; |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitEnumDeclaration (this, data); |
||||
} |
||||
} |
||||
|
||||
public class EnumMemberDeclaration : AbstractNode |
||||
{ |
||||
public IEnumerable<AttributeSection> Attributes { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Attribute).Cast <AttributeSection>(); |
||||
} |
||||
} |
||||
|
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier NameIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public INode Initializer { |
||||
get { |
||||
return GetChildByRole (Roles.Initializer); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitEnumMemberDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// NamespaceDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class NamespaceDeclaration : AbstractNode |
||||
{ |
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.QualifiedName; |
||||
} |
||||
} |
||||
|
||||
public string QualifiedName { |
||||
get { |
||||
NamespaceDeclaration parentNamespace = Parent as NamespaceDeclaration; |
||||
if (parentNamespace != null) |
||||
return BuildQualifiedName (parentNamespace.QualifiedName, Name); |
||||
return Name; |
||||
} |
||||
} |
||||
|
||||
public QualifiedIdentifier NameIdentifier { |
||||
get { |
||||
return (QualifiedIdentifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public static string BuildQualifiedName (string name1, string name2) |
||||
{ |
||||
if (string.IsNullOrEmpty (name1)) |
||||
return name1; |
||||
if (string.IsNullOrEmpty (name2)) |
||||
return name2; |
||||
return name1 + "." + name2; |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitNamespaceDeclaration (this, data); |
||||
} |
||||
} |
||||
}; |
||||
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// TypeDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class TypeDeclaration : AbstractMemberBase |
||||
{ |
||||
public const int TypeKeyword = 100; |
||||
|
||||
public Identifier NameIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<INode> TypeArguments { |
||||
get { |
||||
return GetChildrenByRole (Roles.TypeArgument).Cast<INode> (); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<Constraint> Constraints { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Constraint).Cast <Constraint> (); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBrace); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBrace); |
||||
} |
||||
} |
||||
|
||||
public virtual ClassType ClassType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitTypeDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// UsingAliasDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UsingAliasDeclaration : UsingDeclaration |
||||
{ |
||||
public const int Assignment = 103; |
||||
public const int AliasRole = 104; |
||||
|
||||
public string Alias { |
||||
get { |
||||
return AliasIdentifier.QualifiedName; |
||||
} |
||||
} |
||||
|
||||
public QualifiedIdentifier AliasIdentifier { |
||||
get { |
||||
return (QualifiedIdentifier)GetChildByRole (AliasRole); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUsingAliasDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// UsingDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UsingDeclaration : AbstractNode |
||||
{ |
||||
public string Namespace { |
||||
get { |
||||
return NameIdentifier.QualifiedName; |
||||
} |
||||
} |
||||
|
||||
public QualifiedIdentifier NameIdentifier { |
||||
get { |
||||
return (QualifiedIdentifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUsingDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,139 @@
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// IDomVisitor.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public interface IDomVisitor<T, S> |
||||
{ |
||||
S VisitCompilationUnit (CompilationUnit unit, T data); |
||||
|
||||
#region General scope
|
||||
S VisitAttribute (Attribute attribute, T data); |
||||
S VisitAttributeSection (AttributeSection attributeSection, T data); |
||||
S VisitDelegateDeclaration (DelegateDeclaration delegateDeclaration, T data); |
||||
S VisitNamespaceDeclaration (NamespaceDeclaration namespaceDeclaration, T data); |
||||
S VisitTypeDeclaration (TypeDeclaration typeDeclaration, T data); |
||||
S VisitEnumDeclaration (EnumDeclaration enumDeclaration, T data); |
||||
S VisitEnumMemberDeclaration (EnumMemberDeclaration enumMemberDeclaration, T data); |
||||
S VisitUsingDeclaration (UsingDeclaration usingDeclaration, T data); |
||||
S VisitUsingAliasDeclaration (UsingAliasDeclaration usingDeclaration, T data); |
||||
S VisitFullTypeName (FullTypeName fullTypeName, T data); |
||||
S VisitIdentifier (Identifier identifier, T data); |
||||
S VisitParameterDeclarationExpression (ParameterDeclarationExpression parameterDeclarationExpression, T data); |
||||
S VisitConstraint (Constraint constraint, T data); |
||||
#endregion
|
||||
|
||||
#region Type members
|
||||
S VisitConstructorDeclaration (ConstructorDeclaration constructorDeclaration, T data); |
||||
S VisitConstructorInitializer (ConstructorInitializer constructorInitializer, T data); |
||||
S VisitDestructorDeclaration (DestructorDeclaration destructorDeclaration, T data); |
||||
S VisitEventDeclaration (EventDeclaration eventDeclaration, T data); |
||||
S VisitFieldDeclaration (FieldDeclaration fieldDeclaration, T data); |
||||
S VisitIndexerDeclaration (IndexerDeclaration indexerDeclaration, T data); |
||||
S VisitMethodDeclaration (MethodDeclaration methodDeclaration, T data); |
||||
S VisitOperatorDeclaration (OperatorDeclaration operatorDeclaration, T data); |
||||
S VisitPropertyDeclaration (PropertyDeclaration propertyDeclaration, T data); |
||||
S VisitAccessorDeclaration (Accessor accessorDeclaration, T data); |
||||
S VisitVariableInitializer (VariableInitializer variableInitializer, T data); |
||||
#endregion
|
||||
|
||||
#region Statements
|
||||
S VisitBlockStatement (BlockStatement blockStatement, T data); |
||||
S VisitExpressionStatement (ExpressionStatement expressionStatement, T data); |
||||
S VisitBreakStatement (BreakStatement breakStatement, T data); |
||||
S VisitCheckedStatement (CheckedStatement checkedStatement, T data); |
||||
S VisitContinueStatement (ContinueStatement continueStatement, T data); |
||||
S VisitEmptyStatement (EmptyStatement emptyStatement, T data); |
||||
S VisitFixedStatement (FixedStatement fixedStatement, T data); |
||||
S VisitForeachStatement (ForeachStatement foreachStatement, T data); |
||||
S VisitForStatement (ForStatement forStatement, T data); |
||||
S VisitGotoStatement (GotoStatement gotoStatement, T data); |
||||
S VisitIfElseStatement (IfElseStatement ifElseStatement, T data); |
||||
S VisitLabelStatement (LabelStatement labelStatement, T data); |
||||
S VisitLockStatement (LockStatement lockStatement, T data); |
||||
S VisitReturnStatement (ReturnStatement returnStatement, T data); |
||||
S VisitSwitchStatement (SwitchStatement switchStatement, T data); |
||||
S VisitSwitchSection (SwitchSection switchSection, T data); |
||||
S VisitCaseLabel (CaseLabel caseLabel, T data); |
||||
|
||||
S VisitThrowStatement (ThrowStatement throwStatement, T data); |
||||
S VisitTryCatchStatement (TryCatchStatement tryCatchStatement, T data); |
||||
S VisitCatchClause (CatchClause catchClause, T data); |
||||
|
||||
S VisitUncheckedStatement (UncheckedStatement uncheckedStatement, T data); |
||||
S VisitUnsafeStatement (UnsafeStatement unsafeStatement, T data); |
||||
S VisitUsingStatement (UsingStatement usingStatement, T data); |
||||
S VisitVariableDeclarationStatement (VariableDeclarationStatement variableDeclarationStatement, T data); |
||||
S VisitWhileStatement (WhileStatement whileStatement, T data); |
||||
S VisitYieldStatement (YieldStatement yieldStatement, T data); |
||||
#endregion
|
||||
|
||||
#region Expressions
|
||||
S VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression, T data); |
||||
S VisitLambdaExpression (LambdaExpression lambdaExpression, T data); |
||||
S VisitAssignmentExpression (AssignmentExpression assignmentExpression, T data); |
||||
S VisitBaseReferenceExpression (BaseReferenceExpression baseReferenceExpression, T data); |
||||
S VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression, T data); |
||||
S VisitCastExpression (CastExpression castExpression, T data); |
||||
S VisitCheckedExpression (CheckedExpression checkedExpression, T data); |
||||
S VisitConditionalExpression (ConditionalExpression conditionalExpression, T data); |
||||
S VisitIdentifierExpression (IdentifierExpression identifierExpression, T data); |
||||
S VisitIndexerExpression (IndexerExpression indexerExpression, T data); |
||||
S VisitInvocationExpression (InvocationExpression invocationExpression, T data); |
||||
S VisitMemberReferenceExpression (MemberReferenceExpression memberReferenceExpression, T data); |
||||
S VisitNullReferenceExpression (NullReferenceExpression nullReferenceExpression, T data); |
||||
S VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression, T data); |
||||
S VisitArrayObjectCreateExpression (ArrayObjectCreateExpression arrayObjectCreateExpression, T data); |
||||
|
||||
S VisitParenthesizedExpression (ParenthesizedExpression parenthesizedExpression, T data); |
||||
S VisitPointerReferenceExpression (PointerReferenceExpression pointerReferenceExpression, T data); |
||||
S VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, T data); |
||||
S VisitSizeOfExpression (SizeOfExpression sizeOfExpression, T data); |
||||
S VisitStackAllocExpression (StackAllocExpression stackAllocExpression, T data); |
||||
S VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, T data); |
||||
S VisitTypeOfExpression (TypeOfExpression typeOfExpression, T data); |
||||
S VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression, T data); |
||||
S VisitUncheckedExpression (UncheckedExpression uncheckedExpression, T data); |
||||
S VisitAsExpression (AsExpression asExpression, T data); |
||||
S VisitIsExpression (IsExpression isExpression, T data); |
||||
S VisitDefaultValueExpression (DefaultValueExpression defaultValueExpression, T data); |
||||
S VisitArgListExpression (ArgListExpression argListExpression, T data); |
||||
#endregion
|
||||
|
||||
#region Query Expressions
|
||||
S VisitQueryExpressionFromClause (QueryExpressionFromClause queryExpressionFromClause, T data); |
||||
S VisitQueryExpressionWhereClause (QueryExpressionWhereClause queryExpressionWhereClause, T data); |
||||
S VisitQueryExpressionJoinClause (QueryExpressionJoinClause queryExpressionJoinClause, T data); |
||||
S VisitQueryExpressionGroupClause (QueryExpressionGroupClause queryExpressionGroupClause, T data); |
||||
S VisitQueryExpressionLetClause (QueryExpressionLetClause queryExpressionLetClause, T data); |
||||
S VisitQueryExpressionOrderClause (QueryExpressionOrderClause queryExpressionOrderClause, T data); |
||||
S VisitQueryExpressionOrdering (QueryExpressionOrdering queryExpressionOrdering, T data); |
||||
S VisitQueryExpressionSelectClause (QueryExpressionSelectClause queryExpressionSelectClause, T data); |
||||
#endregion
|
||||
} |
||||
} |
||||
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// INode.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public interface INode |
||||
{ |
||||
INode Parent { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
int Role { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
|
||||
INode NextSibling { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
INode PrevSibling { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
INode FirstChild { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
INode LastChild { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
DomLocation StartLocation { |
||||
get; |
||||
} |
||||
|
||||
DomLocation EndLocation { |
||||
get; |
||||
} |
||||
|
||||
|
||||
S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data); |
||||
} |
||||
} |
||||
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// Identifier.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class Identifier : AbstractNode |
||||
{ |
||||
public string Name { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
DomLocation startLocation; |
||||
public override DomLocation StartLocation { |
||||
get { |
||||
return startLocation; |
||||
} |
||||
} |
||||
|
||||
public override DomLocation EndLocation { |
||||
get { |
||||
return new DomLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length); |
||||
} |
||||
} |
||||
|
||||
/* |
||||
public ISegment Segment { |
||||
get { |
||||
return new Segment (Offset, Name != null ? Name.Length : 0); |
||||
} |
||||
}*/ |
||||
|
||||
public Identifier () |
||||
{ |
||||
} |
||||
public Identifier (string name, DomLocation location) |
||||
{ |
||||
this.Name = name; |
||||
this.startLocation = location; |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitIdentifier (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// Modifiers.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
// For compatibility with nrefactory - same flags.
|
||||
[Flags] |
||||
public enum Modifiers : uint { |
||||
None = 0, |
||||
|
||||
Private = 0x0001, |
||||
Internal = 0x0002, |
||||
Protected = 0x0004, |
||||
Public = 0x0008, |
||||
|
||||
Abstract = 0x0010, |
||||
Virtual = 0x0020, |
||||
Sealed = 0x0040, |
||||
Static = 0x0080, |
||||
Override = 0x0100, |
||||
Readonly = 0x0200, |
||||
Const = 0X0400, |
||||
New = 0x0800, |
||||
Partial = 0x1000, |
||||
|
||||
Extern = 0x2000, |
||||
Volatile = 0x4000, |
||||
Unsafe = 0x8000, |
||||
|
||||
Overloads = 0x10000, |
||||
WithEvents = 0x20000, |
||||
Default = 0x40000, |
||||
Fixed = 0x80000, |
||||
|
||||
ProtectedOrInternal = Internal | Protected, |
||||
ProtectedAndInternal = 0x100000, |
||||
SpecialName = 0x200000, |
||||
Final = 0x400000, |
||||
Literal = 0x800000, |
||||
VisibilityMask = Private | Internal | Protected | Public, |
||||
}} |
||||
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// QualifiedIdentifier.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Text; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class QualifiedIdentifier : AbstractNode |
||||
{ |
||||
public string QualifiedName { |
||||
get { |
||||
StringBuilder builder = new StringBuilder (); |
||||
foreach (Identifier identifier in GetChildrenByRole (Roles.Identifier)) { |
||||
if (builder.Length > 0) |
||||
builder.Append ('.'); |
||||
builder.Append (identifier.Name); |
||||
} |
||||
return builder.ToString (); |
||||
} |
||||
} |
||||
|
||||
public QualifiedIdentifier () |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// BlockStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class BlockStatement : AbstractNode |
||||
{ |
||||
public CSharpTokenNode LBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBrace); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBrace); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<INode> Statements { |
||||
get { |
||||
return GetChildrenByRole (Roles.Statement); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitBlockStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// BreakStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class BreakStatement : AbstractNode |
||||
{ |
||||
public INode BreakKeyword { |
||||
get { |
||||
return GetChildByRole (Roles.Keyword); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitBreakStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// CheckedStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class CheckedStatement : AbstractNode |
||||
{ |
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitCheckedStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// ContinueStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ContinueStatement : AbstractNode |
||||
{ |
||||
public INode ContinueKeyword { |
||||
get { return GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitContinueStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// EmptyStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class EmptyStatement : AbstractNode |
||||
{ |
||||
public DomLocation Location { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public override DomLocation StartLocation { |
||||
get { |
||||
return Location; |
||||
} |
||||
} |
||||
public override DomLocation EndLocation { |
||||
get { |
||||
return new DomLocation (Location.Line, Location.Column + 1); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitEmptyStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// ExpressionStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ExpressionStatement : AbstractNode |
||||
{ |
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitExpressionStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// FixedStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class FixedStatement : AbstractNode |
||||
{ |
||||
public const int PointerDeclarationRole = 100; |
||||
public const int FixedKeywordRole = 101; |
||||
public const int DeclaratorRole = 102; |
||||
|
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public INode PointerDeclaration { |
||||
get { return GetChildByRole (PointerDeclarationRole); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitFixedStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// ForStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ForStatement : AbstractNode |
||||
{ |
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public INode Condition { |
||||
get { return GetChildByRole (Roles.Condition); } |
||||
} |
||||
|
||||
public IEnumerable<INode> Initializers { |
||||
get { return GetChildrenByRole (Roles.Initializer); } |
||||
} |
||||
|
||||
public IEnumerable<INode> Iterators { |
||||
get { return GetChildrenByRole (Roles.Iterator); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitForStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ForeachStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ForeachStatement : AbstractNode |
||||
{ |
||||
public const int ForEachKeywordRole = 100; |
||||
public const int InKeywordRole = 101; |
||||
|
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Initializer); } |
||||
} |
||||
|
||||
public INode VariableType { |
||||
get { return (INode)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public string VariableName { |
||||
get { |
||||
return VariableNameIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier VariableNameIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitForeachStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// GotoStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class GotoStatement : AbstractNode |
||||
{ |
||||
public const int DefaultKeywordRole = 100; |
||||
public const int CaseKeywordRole = 101; |
||||
|
||||
public GotoType GotoType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public string Label { |
||||
get { return ((Identifier)LabelExpression).Name; } |
||||
} |
||||
|
||||
public INode LabelExpression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitGotoStatement (this, data); |
||||
} |
||||
|
||||
public GotoStatement (GotoType gotoType) |
||||
{ |
||||
this.GotoType = gotoType; |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
public enum GotoType { |
||||
Label, |
||||
Case, |
||||
CaseDefault |
||||
} |
||||
} |
||||
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// IfElseStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class IfElseStatement : AbstractNode |
||||
{ |
||||
public const int TrueEmbeddedStatementRole = 100; |
||||
public const int FalseEmbeddedStatementRole = 101; |
||||
public const int IfKeywordRole = 102; |
||||
public const int ElseKeywordRole = 103; |
||||
|
||||
public INode TrueEmbeddedStatement { |
||||
get { return (INode)GetChildByRole (TrueEmbeddedStatementRole); } |
||||
} |
||||
|
||||
public INode FalseEmbeddedStatement { |
||||
get { return (INode)GetChildByRole (FalseEmbeddedStatementRole); } |
||||
} |
||||
|
||||
public INode Condition { |
||||
get { return (INode)GetChildByRole (Roles.Condition); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode IfKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (IfKeywordRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode ElseKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (ElseKeywordRole); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitIfElseStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// LabelStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class LabelStatement : AbstractNode |
||||
{ |
||||
public string Label { |
||||
get { return LabelIdentifier.Name; } |
||||
} |
||||
|
||||
public Identifier LabelIdentifier { |
||||
get { return (Identifier)GetChildByRole (Roles.Identifier); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitLabelStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// LockStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class LockStatement : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitLockStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// ReturnStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ReturnStatement : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitReturnStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,99 @@
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// SwitchStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class SwitchStatement : AbstractNode |
||||
{ |
||||
public const int SwitchSectionRole = 100; |
||||
|
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public IEnumerable<SwitchSection> SwitchSections { |
||||
get { return GetChildrenByRole (SwitchSectionRole).Cast<SwitchSection> (); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
public CSharpTokenNode LBrace { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LBrace); } |
||||
} |
||||
|
||||
public CSharpTokenNode RBrace { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RBrace); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitSwitchStatement (this, data); |
||||
} |
||||
} |
||||
|
||||
public class SwitchSection : AbstractNode |
||||
{ |
||||
public const int CaseLabelRole = 100; |
||||
|
||||
public IEnumerable<CaseLabel> CaseLabels { |
||||
get { return GetChildrenByRole (CaseLabelRole).Cast<CaseLabel> (); } |
||||
} |
||||
|
||||
public IEnumerable<INode> Statements { |
||||
get { |
||||
BlockStatement block = (BlockStatement)GetChildByRole (Roles.Body); |
||||
return block.Statements; |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitSwitchSection (this, data); |
||||
} |
||||
} |
||||
|
||||
public class CaseLabel : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitCaseLabel (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// ThrowStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ThrowStatement : AbstractNode |
||||
{ |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitThrowStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,103 @@
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// TryCatchStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class TryCatchStatement : AbstractNode |
||||
{ |
||||
public const int TryKeywordRole = 100; |
||||
public const int FinallyKeywordRole = 101; |
||||
public const int TryBlockRole = 102; |
||||
public const int FinallyBlockRole = 103; |
||||
public const int CatchClauseRole = 104; |
||||
|
||||
public CSharpTokenNode TryKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (TryKeywordRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode FinallyKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (FinallyKeywordRole); } |
||||
} |
||||
|
||||
public BlockStatement TryBlock { |
||||
get { return (BlockStatement)GetChildByRole (TryBlockRole); } |
||||
} |
||||
|
||||
public BlockStatement FinallyBlock { |
||||
get { return (BlockStatement)GetChildByRole (FinallyBlockRole); } |
||||
} |
||||
|
||||
public IEnumerable<CatchClause> CatchClauses { |
||||
get { return GetChildrenByRole (CatchClauseRole).Cast<CatchClause> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitTryCatchStatement (this, data); |
||||
} |
||||
} |
||||
|
||||
public class CatchClause : AbstractNode |
||||
{ |
||||
public INode ReturnType { |
||||
get { return (INode)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public string VariableName { |
||||
get { return VariableNameIdentifier.Name; } |
||||
} |
||||
|
||||
public Identifier VariableNameIdentifier { |
||||
get { return (Identifier)GetChildByRole (Roles.Identifier); } |
||||
} |
||||
|
||||
public BlockStatement Block { |
||||
get { return (BlockStatement)GetChildByRole (Roles.Body); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode CatchKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Keyword); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitCatchClause (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// UncheckedStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UncheckedStatement : AbstractNode |
||||
{ |
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUncheckedStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// UnsafeStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UnsafeStatement : AbstractNode |
||||
{ |
||||
public BlockStatement Block { |
||||
get { return (BlockStatement)GetChildByRole (Roles.Body); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUnsafeStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// UsingStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class UsingStatement : AbstractNode |
||||
{ |
||||
public INode Statement { |
||||
get { return GetChildByRole (Roles.Statement); } |
||||
} |
||||
|
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitUsingStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// VariableDeclarationStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class VariableDeclarationStatement : AbstractNode |
||||
{ |
||||
public IEnumerable<INode> Modifiers { |
||||
get { return base.GetChildrenByRole (Roles.Modifier); } |
||||
} |
||||
|
||||
public INode ReturnType { |
||||
get { return (INode)GetChildByRole (Roles.ReturnType); } |
||||
} |
||||
|
||||
public IEnumerable<VariableInitializer> Variables { |
||||
get { return base.GetChildrenByRole (Roles.Initializer).Cast<VariableInitializer> (); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitVariableDeclarationStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,81 @@
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// WhileStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class WhileStatement : AbstractNode |
||||
{ |
||||
public const int DoKeywordRole = 101; |
||||
public const int WhileKeywordRole = 102; |
||||
|
||||
public WhilePosition WhilePosition { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public INode EmbeddedStatement { |
||||
get { return (INode)GetChildByRole (Roles.EmbeddedStatement); } |
||||
} |
||||
|
||||
public INode Condition { |
||||
get { return GetChildByRole (Roles.Condition); } |
||||
} |
||||
|
||||
public CSharpTokenNode DoKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (DoKeywordRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode WhileKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (WhileKeywordRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitWhileStatement (this, data); |
||||
} |
||||
|
||||
public WhileStatement (WhilePosition whilePosition) |
||||
{ |
||||
this.WhilePosition = whilePosition; |
||||
} |
||||
} |
||||
|
||||
public enum WhilePosition { |
||||
Begin, |
||||
End |
||||
} |
||||
} |
||||
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// YieldStatement.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class YieldStatement : AbstractNode |
||||
{ |
||||
public const int YieldKeywordRole = 100; |
||||
public const int ReturnKeywordRole = 101; |
||||
public const int BreakKeywordRole = 102; |
||||
public INode Expression { |
||||
get { return GetChildByRole (Roles.Expression); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitYieldStatement (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// AbstractMember.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public abstract class AbstractMember : AbstractMemberBase |
||||
{ |
||||
const int PrivateImplementationTypeRole = 100; |
||||
|
||||
public INode ReturnType { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.ReturnType); |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Only supported on members that can be declared in an interface.
|
||||
/// </summary>
|
||||
public INode PrivateImplementationType { |
||||
get { |
||||
return (INode)GetChildByRole (PrivateImplementationTypeRole); |
||||
} |
||||
} |
||||
|
||||
public Identifier NameIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.Name; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// AbstractMemberBase.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public abstract class AbstractMemberBase : AbstractNode |
||||
{ |
||||
public IEnumerable<INode> Modifiers { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Modifier); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<AttributeSection> Attributes { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Attribute).Cast <AttributeSection>(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ConstructorDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class ConstructorDeclaration : AbstractMemberBase |
||||
{ |
||||
public BlockStatement Body { |
||||
get { |
||||
return (BlockStatement)GetChildByRole (Roles.Body); |
||||
} |
||||
} |
||||
|
||||
public ConstructorInitializer Initializer { |
||||
get { |
||||
return (ConstructorInitializer)base.GetChildByRole (Roles.Initializer); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitConstructorDeclaration (this, data); |
||||
} |
||||
} |
||||
|
||||
public enum ConstructorInitializerType { |
||||
Base, |
||||
This |
||||
} |
||||
|
||||
public class ConstructorInitializer : AbstractNode |
||||
{ |
||||
public ConstructorInitializerType ConstructorInitializerType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public IEnumerable<ParameterDeclarationExpression> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <ParameterDeclarationExpression>(); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitConstructorInitializer (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// DestructorDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class DestructorDeclaration : AbstractMemberBase |
||||
{ |
||||
public const int TildeRole = 100; |
||||
|
||||
public BlockStatement Body { |
||||
get { |
||||
return (BlockStatement)GetChildByRole (Roles.Body); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitDestructorDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// EventDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class EventDeclaration : AbstractMember |
||||
{ |
||||
public const int EventAddRole = 100; |
||||
public const int EventRemoveRole = 101; |
||||
|
||||
public CSharpTokenNode LBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBrace); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBrace); |
||||
} |
||||
} |
||||
|
||||
public Accessor AddAccessor { |
||||
get { |
||||
return (Accessor)GetChildByRole (EventAddRole); |
||||
} |
||||
} |
||||
|
||||
public Accessor RemoveAccessor { |
||||
get { |
||||
return (Accessor)GetChildByRole (EventRemoveRole); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitEventDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// FieldDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class FieldDeclaration : AbstractMember |
||||
{ |
||||
public CSharpTokenNode Semicolon { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.Semicolon); } |
||||
} |
||||
|
||||
public IEnumerable<VariableInitializer> Variables { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Initializer).Cast <VariableInitializer>(); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitFieldDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,60 @@
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// IndexerDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class IndexerDeclaration : PropertyDeclaration |
||||
{ |
||||
public IEnumerable<ParameterDeclarationExpression> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <ParameterDeclarationExpression>(); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LBracket { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBracket); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBracket { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBracket); |
||||
} |
||||
} |
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitIndexerDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// MethodDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class MethodDeclaration : AbstractMember |
||||
{ |
||||
public IEnumerable<INode> TypeArguments { |
||||
get { return GetChildrenByRole (Roles.TypeArgument).Cast<INode> (); } |
||||
} |
||||
|
||||
public IEnumerable<Constraint> Constraints { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Constraint).Cast <Constraint> (); |
||||
} |
||||
} |
||||
|
||||
public IEnumerable<ParameterDeclarationExpression> Arguments { |
||||
get { |
||||
return base.GetChildrenByRole (Roles.Argument).Cast <ParameterDeclarationExpression> (); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode LPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.LPar); } |
||||
} |
||||
|
||||
public CSharpTokenNode RPar { |
||||
get { return (CSharpTokenNode)GetChildByRole (Roles.RPar); } |
||||
} |
||||
|
||||
public BlockStatement Body { |
||||
get { |
||||
return (BlockStatement)GetChildByRole (Roles.Body); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitMethodDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,96 @@
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// OperatorDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public enum OperatorType { |
||||
// Unary operators
|
||||
LogicalNot, |
||||
OnesComplement, |
||||
Increment, |
||||
Decrement, |
||||
True, |
||||
False, |
||||
|
||||
// Unary and Binary operators
|
||||
Addition, |
||||
Subtraction, |
||||
|
||||
UnaryPlus, |
||||
UnaryNegation, |
||||
|
||||
// Binary operators
|
||||
Multiply, |
||||
Division, |
||||
Modulus, |
||||
BitwiseAnd, |
||||
BitwiseOr, |
||||
ExclusiveOr, |
||||
LeftShift, |
||||
RightShift, |
||||
Equality, |
||||
Inequality, |
||||
GreaterThan, |
||||
LessThan, |
||||
GreaterThanOrEqual, |
||||
LessThanOrEqual, |
||||
|
||||
// Implicit and Explicit
|
||||
Implicit, |
||||
Explicit |
||||
} |
||||
|
||||
public class OperatorDeclaration : MethodDeclaration |
||||
{ |
||||
public const int OperatorKeywordRole = 100; |
||||
public const int OperatorTypeRole = 101; |
||||
|
||||
public OperatorType OperatorType { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public string OverloadOperator { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public CSharpTokenNode OperatorKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (OperatorKeywordRole); } |
||||
} |
||||
|
||||
public CSharpTokenNode OperatorTypeKeyword { |
||||
get { return (CSharpTokenNode)GetChildByRole (OperatorTypeRole); } |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitOperatorDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// ParameterDeclarationExpression.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
|
||||
public enum ParameterModifier { |
||||
None, |
||||
Ref, |
||||
Out, |
||||
Params, |
||||
This |
||||
} |
||||
|
||||
public class ParameterDeclarationExpression : AbstractNode |
||||
{ |
||||
public ParameterModifier ParameterModifier { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public Identifier Identifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public INode DefaultExpression { |
||||
get { |
||||
return (INode)GetChildByRole (Roles.Expression); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitParameterDeclarationExpression (this, data); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,86 @@
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// PropertyDeclaration.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
|
||||
public class Accessor : AbstractMember |
||||
{ |
||||
public DomLocation Location { |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public BlockStatement Body { |
||||
get { |
||||
return (BlockStatement)GetChildByRole (Roles.Body); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitAccessorDeclaration (this, data); |
||||
} |
||||
} |
||||
|
||||
public class PropertyDeclaration : AbstractMember |
||||
{ |
||||
public const int PropertyGetRole = 100; |
||||
public const int PropertySetRole = 101; |
||||
|
||||
public CSharpTokenNode LBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.LBrace); |
||||
} |
||||
} |
||||
|
||||
public CSharpTokenNode RBrace { |
||||
get { |
||||
return (CSharpTokenNode)GetChildByRole (Roles.RBrace); |
||||
} |
||||
} |
||||
|
||||
public Accessor GetAccessor { |
||||
get { |
||||
return (Accessor)GetChildByRole (PropertyGetRole); |
||||
} |
||||
} |
||||
|
||||
public Accessor SetAccessor { |
||||
get { |
||||
return (Accessor)GetChildByRole (PropertySetRole); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitPropertyDeclaration (this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// VariableInitializer.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Krüger <mkrueger@novell.com>
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
|
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
public class VariableInitializer : AbstractNode |
||||
{ |
||||
public string Name { |
||||
get { |
||||
return NameIdentifier.Name; |
||||
} |
||||
} |
||||
|
||||
public Identifier NameIdentifier { |
||||
get { |
||||
return (Identifier)GetChildByRole (Roles.Identifier); |
||||
} |
||||
} |
||||
|
||||
public INode Initializer { |
||||
get { |
||||
return GetChildByRole (Roles.Initializer); |
||||
} |
||||
} |
||||
|
||||
public override S AcceptVisitor<T, S> (IDomVisitor<T, S> visitor, T data) |
||||
{ |
||||
return visitor.VisitVariableInitializer (this, data); |
||||
} |
||||
|
||||
} |
||||
} |
||||
@ -1,86 +1,168 @@
@@ -1,86 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> |
||||
<PropertyGroup> |
||||
<ProjectGuid>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</ProjectGuid> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<OutputType>Library</OutputType> |
||||
<RootNamespace>ICSharpCode.NRefactory</RootNamespace> |
||||
<AssemblyName>ICSharpCode.NRefactory</AssemblyName> |
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<OutputPath>bin\Debug\</OutputPath> |
||||
<DebugSymbols>True</DebugSymbols> |
||||
<DebugType>Full</DebugType> |
||||
<Optimize>False</Optimize> |
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> |
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<OutputPath>bin\Release\</OutputPath> |
||||
<DebugSymbols>False</DebugSymbols> |
||||
<DebugType>None</DebugType> |
||||
<Optimize>True</Optimize> |
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<ItemGroup> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Core"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
</Reference> |
||||
<Reference Include="System.Xml" /> |
||||
<Reference Include="System.Xml.Linq"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
</Reference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="Accessibility.cs" /> |
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
||||
<Compile Include="TypeSystem\ClassType.cs" /> |
||||
<Compile Include="TypeSystem\DomRegion.cs" /> |
||||
<Compile Include="TypeSystem\EntityType.cs" /> |
||||
<Compile Include="TypeSystem\IAttribute.cs" /> |
||||
<Compile Include="TypeSystem\IConstantValue.cs" /> |
||||
<Compile Include="TypeSystem\IEntity.cs" /> |
||||
<Compile Include="TypeSystem\IEvent.cs" /> |
||||
<Compile Include="TypeSystem\IExplicitInterfaceImplementation.cs" /> |
||||
<Compile Include="TypeSystem\IField.cs" /> |
||||
<Compile Include="TypeSystem\IFreezable.cs" /> |
||||
<Compile Include="TypeSystem\IInterningProvider.cs" /> |
||||
<Compile Include="TypeSystem\IMember.cs" /> |
||||
<Compile Include="TypeSystem\IMethod.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\AbstractFreezable.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\AbstractType.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\AbstractTypeReference.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\DefaultExplicitInterfaceImplementation.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\DefaultParameter.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\DefaultTypeDefinition.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\NullType.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\UnknownType.cs" /> |
||||
<Compile Include="TypeSystem\INamedElement.cs" /> |
||||
<Compile Include="TypeSystem\IParameter.cs" /> |
||||
<Compile Include="TypeSystem\IParameterizedMember.cs" /> |
||||
<Compile Include="TypeSystem\IProjectContent.cs" /> |
||||
<Compile Include="TypeSystem\IProperty.cs" /> |
||||
<Compile Include="TypeSystem\ISupportsInterning.cs" /> |
||||
<Compile Include="TypeSystem\IType.cs" /> |
||||
<Compile Include="TypeSystem\ITypeDefinition.cs" /> |
||||
<Compile Include="TypeSystem\ITypeParameter.cs" /> |
||||
<Compile Include="TypeSystem\ITypeReference.cs" /> |
||||
<Compile Include="TypeSystem\ITypeResolveContext.cs" /> |
||||
<Compile Include="TypeSystem\IVariable.cs" /> |
||||
<Compile Include="TypeSystem\LanguageProperties.cs" /> |
||||
<Compile Include="TypeSystem\SharedTypes.cs" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Folder Include="TypeSystem" /> |
||||
<Folder Include="TypeSystem\Implementation" /> |
||||
</ItemGroup> |
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> |
||||
<PropertyGroup> |
||||
<ProjectGuid>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</ProjectGuid> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<OutputType>Library</OutputType> |
||||
<RootNamespace>ICSharpCode.NRefactory</RootNamespace> |
||||
<AssemblyName>ICSharpCode.NRefactory</AssemblyName> |
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<OutputPath>bin\Debug\</OutputPath> |
||||
<DebugSymbols>True</DebugSymbols> |
||||
<DebugType>Full</DebugType> |
||||
<Optimize>False</Optimize> |
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> |
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<OutputPath>bin\Release\</OutputPath> |
||||
<DebugSymbols>False</DebugSymbols> |
||||
<DebugType>None</DebugType> |
||||
<Optimize>True</Optimize> |
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<ItemGroup> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Core"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
</Reference> |
||||
<Reference Include="System.Xml" /> |
||||
<Reference Include="System.Xml.Linq"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
</Reference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="Accessibility.cs" /> |
||||
<Compile Include="CSharp\Dom\AbstractNode.cs" /> |
||||
<Compile Include="CSharp\Dom\AbtractDomVisitor.cs" /> |
||||
<Compile Include="CSharp\Dom\CompilationUnit.cs" /> |
||||
<Compile Include="CSharp\Dom\CSharpModifierToken.cs" /> |
||||
<Compile Include="CSharp\Dom\CSharpTokenNode.cs" /> |
||||
<Compile Include="CSharp\Dom\DomLocation.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\AnonymousMethodExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\ArgListExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\ArrayObjectCreateExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\AsExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\AssignmentExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\BaseReferenceExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\BinaryOperatorExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\CastExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\CheckedExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\ConditionalExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\DefaultValueExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\IdentifierExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\IndexerExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\InvocationExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\IsExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\LambdaExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\MemberReferenceExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\NullReferenceExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\ObjectCreateExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\ParenthesizedExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\PointerReferenceExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\PrimitiveExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\QueryExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\SizeOfExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\StackAllocExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\ThisReferenceExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\TypeOfExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\UnaryOperatorExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\Expressions\UncheckedExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\FullTypeName.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\Attribute.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\AttributeSection.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\Constraint.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\DelegateDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\EnumDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\NamespaceDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\TypeDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\UsingAliasDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\GeneralScope\UsingDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\Identifier.cs" /> |
||||
<Compile Include="CSharp\Dom\IDomVisitor.cs" /> |
||||
<Compile Include="CSharp\Dom\INode.cs" /> |
||||
<Compile Include="CSharp\Dom\Modifiers.cs" /> |
||||
<Compile Include="CSharp\Dom\QualifiedIdentifier.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\BlockStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\BreakStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\CheckedStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\ContinueStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\EmptyStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\ExpressionStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\FixedStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\ForeachStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\ForStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\GotoStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\IfElseStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\LabelStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\LockStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\ReturnStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\SwitchStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\ThrowStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\TryCatchStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\UncheckedStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\UnsafeStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\UsingStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\VariableDeclarationStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\WhileStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\Statements\YieldStatement.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\AbstractMember.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\AbstractMemberBase.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\ConstructorDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\DestructorDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\EventDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\FieldDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\IndexerDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\MethodDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\OperatorDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\ParameterDeclarationExpression.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\PropertyDeclaration.cs" /> |
||||
<Compile Include="CSharp\Dom\TypeMembers\VariableInitializer.cs" /> |
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
||||
<Compile Include="TypeSystem\ClassType.cs" /> |
||||
<Compile Include="TypeSystem\DomRegion.cs" /> |
||||
<Compile Include="TypeSystem\EntityType.cs" /> |
||||
<Compile Include="TypeSystem\IAttribute.cs" /> |
||||
<Compile Include="TypeSystem\IConstantValue.cs" /> |
||||
<Compile Include="TypeSystem\IEntity.cs" /> |
||||
<Compile Include="TypeSystem\IEvent.cs" /> |
||||
<Compile Include="TypeSystem\IExplicitInterfaceImplementation.cs" /> |
||||
<Compile Include="TypeSystem\IField.cs" /> |
||||
<Compile Include="TypeSystem\IFreezable.cs" /> |
||||
<Compile Include="TypeSystem\IInterningProvider.cs" /> |
||||
<Compile Include="TypeSystem\IMember.cs" /> |
||||
<Compile Include="TypeSystem\IMethod.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\AbstractFreezable.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\AbstractType.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\AbstractTypeReference.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\DefaultExplicitInterfaceImplementation.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\DefaultParameter.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\DefaultTypeDefinition.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\NullType.cs" /> |
||||
<Compile Include="TypeSystem\Implementation\UnknownType.cs" /> |
||||
<Compile Include="TypeSystem\INamedElement.cs" /> |
||||
<Compile Include="TypeSystem\IParameter.cs" /> |
||||
<Compile Include="TypeSystem\IParameterizedMember.cs" /> |
||||
<Compile Include="TypeSystem\IProjectContent.cs" /> |
||||
<Compile Include="TypeSystem\IProperty.cs" /> |
||||
<Compile Include="TypeSystem\ISupportsInterning.cs" /> |
||||
<Compile Include="TypeSystem\IType.cs" /> |
||||
<Compile Include="TypeSystem\ITypeDefinition.cs" /> |
||||
<Compile Include="TypeSystem\ITypeParameter.cs" /> |
||||
<Compile Include="TypeSystem\ITypeReference.cs" /> |
||||
<Compile Include="TypeSystem\ITypeResolveContext.cs" /> |
||||
<Compile Include="TypeSystem\IVariable.cs" /> |
||||
<Compile Include="TypeSystem\LanguageProperties.cs" /> |
||||
<Compile Include="TypeSystem\SharedTypes.cs" /> |
||||
</ItemGroup> |
||||
<ItemGroup /> |
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> |
||||
</Project> |
||||
Loading…
Reference in new issue