[Monodevelop-patches-list] r2528 - in trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding: . Gui Parser Parser/SharpDevelopTree SharpRefactoryVB SharpRefactoryVB/src SharpRefactoryVB/src/CSharpConverter SharpRefactoryVB/src/Lexer SharpRefactoryVB/src/Lexer/Reader SharpRefactoryVB/src/Lexer/Specials SharpRefactoryVB/src/Parser/AST SharpRefactoryVB/src/Parser/AST/Expressions SharpRefactoryVB/src/Parser/AST/GlobalScope SharpRefactoryVB/src/Parser/AST/Statements SharpRefactoryVB/src/Parser/AST/TypeLevel SharpRefactoryVB/src/Parser/generated SharpRefactoryVB/src/Parser/generated/keywordlist templates
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Fri May 13 19:13:06 EDT 2005
Author: jluke
Date: 2005-05-13 19:13:05 -0400 (Fri, 13 May 2005)
New Revision: 2528
Modified:
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/ChooseRuntimePanel.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/CodeGenerationPanel.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Makefile.am
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ProjectNodeBuilder.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile.am
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Makefile
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VB.glade
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.addin.xml
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/EmptyVBFile.xft.xml
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/EmptyVBProject.xpt.xml
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/VBConsoleApplicationProject.xpt.xml
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/VBGtkSharp2Project.xpt.xml
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/VBGtkSharpProject.xpt.xml
Log:
eol-style native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,32 +1,32 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("VB.NET Binding")]
-[assembly: AssemblyDescription("VB.NET language binding for monodevelop")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("www.monodevelop.com")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("(c) 2004 Markus Palme, MonoDevelop team, Levi Bard")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.1.1649")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("VB.NET Binding")]
+[assembly: AssemblyDescription("VB.NET language binding for monodevelop")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("www.monodevelop.com")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("(c) 2004 Markus Palme, MonoDevelop team, Levi Bard")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.1.1649")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/AssemblyInfo.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ChangeLog
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/ChooseRuntimePanel.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/CodeGenerationPanel.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,66 +1,66 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.Windows.Forms;
-
-namespace VBBinding
-{
- [Serializable()]
- class GuiMessageRecipient : IMessageRecipient
- {
- class StatusForm : Form
- {
- Label statusLabel;
-
- public StatusForm()
- {
- this.Text = "VB.DOC status";
- this.ControlBox = false;
- this.StartPosition = FormStartPosition.CenterScreen;
- this.ShowInTaskbar = false;
-
- this.Size = new System.Drawing.Size(400, 50);
-
- statusLabel = new Label();
- statusLabel.Dock = DockStyle.Fill;
- statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- Controls.Add(statusLabel);
- }
-
- public void Status(string statusMessage)
- {
- statusLabel.Text = statusMessage;
- Application.DoEvents();
- }
- }
-
- StatusForm messageForm;
-
- public GuiMessageRecipient()
- {
- messageForm = new StatusForm();
- messageForm.Show();
- }
-
- public void Finished()
- {
- messageForm.Close();
- }
-
- public void DisplayStatusMessage(string message)
- {
- messageForm.Status(message);
- }
-
- public void DisplayErrorMessage(string message)
- {
- // message doesn't work in this app domain
- System.Windows.Forms.MessageBox.Show(message);
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Windows.Forms;
+
+namespace VBBinding
+{
+ [Serializable()]
+ class GuiMessageRecipient : IMessageRecipient
+ {
+ class StatusForm : Form
+ {
+ Label statusLabel;
+
+ public StatusForm()
+ {
+ this.Text = "VB.DOC status";
+ this.ControlBox = false;
+ this.StartPosition = FormStartPosition.CenterScreen;
+ this.ShowInTaskbar = false;
+
+ this.Size = new System.Drawing.Size(400, 50);
+
+ statusLabel = new Label();
+ statusLabel.Dock = DockStyle.Fill;
+ statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ Controls.Add(statusLabel);
+ }
+
+ public void Status(string statusMessage)
+ {
+ statusLabel.Text = statusMessage;
+ Application.DoEvents();
+ }
+ }
+
+ StatusForm messageForm;
+
+ public GuiMessageRecipient()
+ {
+ messageForm = new StatusForm();
+ messageForm.Show();
+ }
+
+ public void Finished()
+ {
+ messageForm.Close();
+ }
+
+ public void DisplayStatusMessage(string message)
+ {
+ messageForm.Status(message);
+ }
+
+ public void DisplayErrorMessage(string message)
+ {
+ // message doesn't work in this app domain
+ System.Windows.Forms.MessageBox.Show(message);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/GuiMessageRecipient.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,39 +1,39 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Drawing;
-
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Internal.ExternalTool;
-using MonoDevelop.Gui.Dialogs;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.AddIns.Codons;
-
-namespace VBBinding
-{
- public class TextEditorOptionsPanel : AbstractOptionPanel
- {
- public override void LoadPanelContents()
- {
- SetupFromXml(Path.Combine(PropertyService.DataDirectory,
- @"resources\panels\VBSpecificTextEditorOptions.xfrm"));
- ((CheckBox)ControlDictionary["enableEndConstructsCheckBox"]).Checked = PropertyService.GetProperty("VBBinding.TextEditor.EnableEndConstructs", true);
- ((CheckBox)ControlDictionary["enableCasingCheckBox"]).Checked = PropertyService.GetProperty("VBBinding.TextEditor.EnableCasing", true);
- }
-
- public override bool StorePanelContents()
- {
- PropertyService.SetProperty("VBBinding.TextEditor.EnableEndConstructs", ((CheckBox)ControlDictionary["enableEndConstructsCheckBox"]).Checked);
- PropertyService.SetProperty("VBBinding.TextEditor.EnableCasing", ((CheckBox)ControlDictionary["enableCasingCheckBox"]).Checked);
-
- return true;
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+
+namespace VBBinding
+{
+ public class TextEditorOptionsPanel : AbstractOptionPanel
+ {
+ public override void LoadPanelContents()
+ {
+ SetupFromXml(Path.Combine(PropertyService.DataDirectory,
+ @"resources\panels\VBSpecificTextEditorOptions.xfrm"));
+ ((CheckBox)ControlDictionary["enableEndConstructsCheckBox"]).Checked = PropertyService.GetProperty("VBBinding.TextEditor.EnableEndConstructs", true);
+ ((CheckBox)ControlDictionary["enableCasingCheckBox"]).Checked = PropertyService.GetProperty("VBBinding.TextEditor.EnableCasing", true);
+ }
+
+ public override bool StorePanelContents()
+ {
+ PropertyService.SetProperty("VBBinding.TextEditor.EnableEndConstructs", ((CheckBox)ControlDictionary["enableEndConstructsCheckBox"]).Checked);
+ PropertyService.SetProperty("VBBinding.TextEditor.EnableCasing", ((CheckBox)ControlDictionary["enableCasingCheckBox"]).Checked);
+
+ return true;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/TextEditorOptionsPanel.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,50 +1,50 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Core.Properties;
-
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Gui.Dialogs;
-using MonoDevelop.Core.Services;
-
-namespace VBBinding
-{
- public class VBCompilerPanel : AbstractOptionPanel
- {
- VBCompilerParameters config = null;
-
- public override void LoadPanelContents()
- {
- SetupFromXml(Path.Combine(PropertyService.DataDirectory,
- @"resources\panels\VBCompilerPanel.xfrm"));
-
- DotNetProjectConfiguration cfg = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
- config = (VBCompilerParameters) cfg.CompilationParameters;
-
- FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- ((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add("Standard");
- foreach (string runtime in fileUtilityService.GetAvaiableRuntimeVersions()) {
- ((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add(runtime);
- }
-
- ((ComboBox)ControlDictionary["compilerVersionComboBox"]).Text = config.VBCompilerVersion.Length == 0 ? "Standard" : config.VBCompilerVersion;
- }
-
- public override bool StorePanelContents()
- {
- config.VBCompilerVersion = ControlDictionary["compilerVersionComboBox"].Text;
- return true;
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Core.Properties;
+
+using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+
+namespace VBBinding
+{
+ public class VBCompilerPanel : AbstractOptionPanel
+ {
+ VBCompilerParameters config = null;
+
+ public override void LoadPanelContents()
+ {
+ SetupFromXml(Path.Combine(PropertyService.DataDirectory,
+ @"resources\panels\VBCompilerPanel.xfrm"));
+
+ DotNetProjectConfiguration cfg = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
+ config = (VBCompilerParameters) cfg.CompilationParameters;
+
+ FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ ((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add("Standard");
+ foreach (string runtime in fileUtilityService.GetAvaiableRuntimeVersions()) {
+ ((ComboBox)ControlDictionary["compilerVersionComboBox"]).Items.Add(runtime);
+ }
+
+ ((ComboBox)ControlDictionary["compilerVersionComboBox"]).Text = config.VBCompilerVersion.Length == 0 ? "Standard" : config.VBCompilerVersion;
+ }
+
+ public override bool StorePanelContents()
+ {
+ config.VBCompilerVersion = ControlDictionary["compilerVersionComboBox"].Text;
+ return true;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBCompilerPanel.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,92 +1,92 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
-
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Internal.ExternalTool;
-using MonoDevelop.Gui.Dialogs;
-using MonoDevelop.Core.AddIns.Codons;
-
-using MonoDevelop.Core.Services;
-using MonoDevelop.Core.Properties;
-
-namespace VBBinding
-{
- public class VBDOCConfigurationPanel : AbstractOptionPanel
- {
- VBCompilerParameters compilerParameters = null;
- VBProject project = null;
- ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-
- ///<summary>
- /// Returns if the filename will be parsed when running VB.DOC.
- /// </summary>
- public static bool IsFileIncluded(string filename, VBProject project)
- {
- DotNetProjectConfiguration config = (DotNetProjectConfiguration) project.ActiveConfiguration;
- VBCompilerParameters compilerparameters = (VBCompilerParameters) config.CompilationParameters;
- return Array.IndexOf(compilerparameters.VBDOCFiles, filename) == -1;
- }
-
-
- public VBDOCConfigurationPanel() : base(propertyService.DataDirectory + @"\resources\panels\ProjectOptions\VBDOCConfigurationPanel.xfrm")
- {
- CustomizationObjectChanged += new EventHandler(SetValues);
- ControlDictionary["BrowseOutputFileButton"].Click += new EventHandler(BrowseOutputFileButton_Click);
- }
-
- private void BrowseOutputFileButton_Click(object sender, EventArgs e) {
- SaveFileDialog dialog = new SaveFileDialog();
- dialog.Filter = "XML files (*.xml)|*.xml";
- if(dialog.ShowDialog() == DialogResult.OK) {
- ((TextBox)ControlDictionary["OutputFileTextBox"]).Text = dialog.FileName;
- }
- }
-
- public override bool ReceiveDialogMessage(DialogMessage message)
- {
- if (message == DialogMessage.OK) {
- if (compilerParameters == null) {
- return true;
- }
-
- compilerParameters.VBDOCOutputFile = ((TextBox)ControlDictionary["OutputFileTextBox"]).Text;
- compilerParameters.VBDOCCommentPrefix = ((TextBox)ControlDictionary["CommentPrefixTextBox"]).Text;
-
- string[] files = new string[((CheckedListBox)ControlDictionary["FileListBox"]).Items.Count - ((CheckedListBox)ControlDictionary["FileListBox"]).CheckedIndices.Count];
- int count = 0;
- for(int index = 0; index < ((CheckedListBox)ControlDictionary["FileListBox"]).Items.Count; index++) {
- if(((CheckedListBox)ControlDictionary["FileListBox"]).GetItemChecked(index) == false) {
- files[count] = (string)((CheckedListBox)ControlDictionary["FileListBox"]).Items[index];
- count++;
- }
- }
- compilerParameters.VBDOCFiles = files;
- }
- return true;
- }
-
- void SetValues(object sender, EventArgs e)
- {
- DotNetProjectConfiguration config = (DotNetProjectConfiguration) ((IProperties)CustomizationObject).GetProperty("Config");
- compilerParameters = (VBCompilerParameters) config.CompilationParameters;
- project = (VBProject)((IProperties)CustomizationObject).GetProperty("Project");
-
- ((TextBox)ControlDictionary["OutputFileTextBox"]).Text = compilerParameters.VBDOCOutputFile;
- ((TextBox)ControlDictionary["CommentPrefixTextBox"]). Text = compilerParameters.VBDOCCommentPrefix;
-
- foreach(ProjectFile pfile in project.ProjectFiles) {
- bool included = IsFileIncluded(pfile.Name, project);
- ((CheckedListBox)ControlDictionary["FileListBox"]).Items.Add(pfile.Name, included);
- }
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.AddIns.Codons;
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+
+namespace VBBinding
+{
+ public class VBDOCConfigurationPanel : AbstractOptionPanel
+ {
+ VBCompilerParameters compilerParameters = null;
+ VBProject project = null;
+ ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+ static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+
+ ///<summary>
+ /// Returns if the filename will be parsed when running VB.DOC.
+ /// </summary>
+ public static bool IsFileIncluded(string filename, VBProject project)
+ {
+ DotNetProjectConfiguration config = (DotNetProjectConfiguration) project.ActiveConfiguration;
+ VBCompilerParameters compilerparameters = (VBCompilerParameters) config.CompilationParameters;
+ return Array.IndexOf(compilerparameters.VBDOCFiles, filename) == -1;
+ }
+
+
+ public VBDOCConfigurationPanel() : base(propertyService.DataDirectory + @"\resources\panels\ProjectOptions\VBDOCConfigurationPanel.xfrm")
+ {
+ CustomizationObjectChanged += new EventHandler(SetValues);
+ ControlDictionary["BrowseOutputFileButton"].Click += new EventHandler(BrowseOutputFileButton_Click);
+ }
+
+ private void BrowseOutputFileButton_Click(object sender, EventArgs e) {
+ SaveFileDialog dialog = new SaveFileDialog();
+ dialog.Filter = "XML files (*.xml)|*.xml";
+ if(dialog.ShowDialog() == DialogResult.OK) {
+ ((TextBox)ControlDictionary["OutputFileTextBox"]).Text = dialog.FileName;
+ }
+ }
+
+ public override bool ReceiveDialogMessage(DialogMessage message)
+ {
+ if (message == DialogMessage.OK) {
+ if (compilerParameters == null) {
+ return true;
+ }
+
+ compilerParameters.VBDOCOutputFile = ((TextBox)ControlDictionary["OutputFileTextBox"]).Text;
+ compilerParameters.VBDOCCommentPrefix = ((TextBox)ControlDictionary["CommentPrefixTextBox"]).Text;
+
+ string[] files = new string[((CheckedListBox)ControlDictionary["FileListBox"]).Items.Count - ((CheckedListBox)ControlDictionary["FileListBox"]).CheckedIndices.Count];
+ int count = 0;
+ for(int index = 0; index < ((CheckedListBox)ControlDictionary["FileListBox"]).Items.Count; index++) {
+ if(((CheckedListBox)ControlDictionary["FileListBox"]).GetItemChecked(index) == false) {
+ files[count] = (string)((CheckedListBox)ControlDictionary["FileListBox"]).Items[index];
+ count++;
+ }
+ }
+ compilerParameters.VBDOCFiles = files;
+ }
+ return true;
+ }
+
+ void SetValues(object sender, EventArgs e)
+ {
+ DotNetProjectConfiguration config = (DotNetProjectConfiguration) ((IProperties)CustomizationObject).GetProperty("Config");
+ compilerParameters = (VBCompilerParameters) config.CompilationParameters;
+ project = (VBProject)((IProperties)CustomizationObject).GetProperty("Project");
+
+ ((TextBox)ControlDictionary["OutputFileTextBox"]).Text = compilerParameters.VBDOCOutputFile;
+ ((TextBox)ControlDictionary["CommentPrefixTextBox"]). Text = compilerParameters.VBDOCCommentPrefix;
+
+ foreach(ProjectFile pfile in project.ProjectFiles) {
+ bool included = IsFileIncluded(pfile.Name, project);
+ ((CheckedListBox)ControlDictionary["FileListBox"]).Items.Add(pfile.Name, included);
+ }
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Gui/VBDocConfigurationPanel.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Makefile.am
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,371 +1,371 @@
-using System;
-using System.Text;
-using MonoDevelop.Internal.Parser;
-
-namespace VBBinding.Parser
-{
- /// <summary>
- /// Description of ExpressionFinder.
- /// </summary>
- public class ExpressionFinder : IExpressionFinder
- {
- public string FindExpression(string inText, int offset)
- {
- this.text = FilterComments(inText, ref offset);
- this.text = text;
- this.offset = this.lastAccept = offset;
- this.state = START;
- if (this.text == null) {
- return null;
- }
- while (state != ERROR) {
- ReadNextToken();
- //Console.WriteLine("cur state {0} got token {1}/{3} going to {2}", GetStateName(state), GetTokenName(curTokenType), GetStateName(stateTable[state, curTokenType]), curTokenType);
- state = stateTable[state, curTokenType];
-
- if (state == ACCEPT || state == ACCEPT2) {
- lastAccept = this.offset;
- }
- if (state == ACCEPTNOMORE) {
- return this.text.Substring(this.offset + 1, offset - this.offset);
- }
- }
- return this.text.Substring(this.lastAccept + 1, offset - this.lastAccept);
- }
-
- #region Comment Filter and 'inside string watcher'
- int initialOffset;
- public string FilterComments(string text, ref int offset)
- {
- this.initialOffset = offset;
- StringBuilder outText = new StringBuilder();
- int curOffset = 0;
- while (curOffset <= initialOffset) {
- char ch = text[curOffset];
-
- switch (ch) {
- case '@':
- if (curOffset + 1 < text.Length && text[curOffset + 1] == '"') {
- outText.Append(text[curOffset++]); // @
- outText.Append(text[curOffset++]); // "
- if (!ReadVerbatimString(outText, text, ref curOffset)) {
- return null;
- }
- }else{
- outText.Append(ch);
- ++curOffset;
- }
- break;
- case '"':
- outText.Append(ch);
- curOffset++;
- if (!ReadString(outText, text, ref curOffset)) {
- return null;
- }
- break;
- case '\'':
- offset -= 1;
- curOffset += 1;
- if (!ReadToEOL(text, ref curOffset, ref offset)) {
- return null;
- }
- break;
- default:
- outText.Append(ch);
- ++curOffset;
- break;
- }
- }
-
- return outText.ToString();
- }
-
- bool ReadToEOL(string text, ref int curOffset, ref int offset)
- {
- while (curOffset <= initialOffset) {
- char ch = text[curOffset++];
- --offset;
- if (ch == '\n') {
- return true;
- }
- }
- return false;
- }
-
- bool ReadString(StringBuilder outText, string text, ref int curOffset)
- {
- while (curOffset <= initialOffset) {
- char ch = text[curOffset++];
- outText.Append(ch);
- if (ch == '"') {
- return true;
- }
- }
- return false;
- }
-
- bool ReadVerbatimString(StringBuilder outText, string text, ref int curOffset)
- {
- while (curOffset <= initialOffset) {
- char ch = text[curOffset++];
- outText.Append(ch);
- if (ch == '"') {
- if (curOffset < text.Length && text[curOffset] == '"') {
- outText.Append(text[curOffset++]);
- } else {
- return true;
- }
- }
- }
- return false;
- }
-
- bool ReadMultiLineComment(string text, ref int curOffset, ref int offset)
- {
- while (curOffset <= initialOffset) {
- char ch = text[curOffset++];
- --offset;
- if (ch == '*') {
- if (curOffset < text.Length && text[curOffset] == '/') {
- ++curOffset;
- --offset;
- return true;
- }
- }
- }
- return false;
- }
- #endregion
-
- #region mini backward lexer
- string text;
- int offset;
-
- char GetNext()
- {
- if (offset >= 0) {
- return text[offset--];
- }
- return '\0';
- }
-
- char Peek()
- {
- if (offset >= 0) {
- return text[offset];
- }
- return '\0';
- }
-
- void UnGet()
- {
- ++offset;
- }
-
- // tokens for our lexer
- static int Err = 0;
- static int Dot = 1;
- static int StrLit = 2;
- static int Ident = 3;
- static int New = 4;
-// static int Bracket = 5;
- static int Parent = 6;
- static int Curly = 7;
- static int Using = 8;
- int curTokenType;
-
- readonly static string[] tokenStateName = new string[] {
- "Err", "Dot", "StrLit", "Ident", "New", "Bracket", "Paren", "Curly", "Using"
- };
- string GetTokenName(int state)
- {
- return tokenStateName[state];
- }
-
- void ReadNextToken()
- {
- char ch = GetNext();
-
- curTokenType = Err;
- if (ch == '\0' || ch == '\n' || ch == '\r') {
- return;
- }
- while (Char.IsWhiteSpace(ch)) {
- ch = GetNext();
- if (ch == '\n' || ch == '\r') {
- return;
- }
- }
-
- switch (ch) {
- case '}':
- if (ReadBracket('{', '}')) {
- curTokenType = Curly;
- }
- break;
- case ')':
- if (ReadBracket('(', ')')) {
- curTokenType = Parent;
- }
- break;
- case ']':
- if (ReadBracket('[', ']')) {
- curTokenType = Ident;
- }
- break;
- case '.':
- curTokenType = Dot;
- break;
- case '\'':
- case '"':
- if (ReadStringLiteral(ch)) {
- curTokenType = StrLit;
- }
- break;
- default:
- if (IsIdentifierPart(ch)) {
- string ident = ReadIdentifier(ch);
- if (ident != null) {
- switch (ident.ToLower()) {
- case "new":
- curTokenType = New;
- break;
- case "imports":
- curTokenType = Using;
- break;
- default:
- curTokenType = Ident;
- break;
- }
- }
- }
- break;
- }
- }
-
- bool ReadStringLiteral(char litStart)
- {
- while (true) {
- char ch = GetNext();
- if (ch == '\0') {
- return false;
- }
- if (ch == litStart) {
- if (Peek() == '@' && litStart == '"') {
- GetNext();
- }
- return true;
- }
- }
- }
-
- bool ReadBracket(char openBracket, char closingBracket)
- {
- int curlyBraceLevel = 0;
- int squareBracketLevel = 0;
- int parenthesisLevel = 0;
- switch (openBracket) {
- case '(':
- parenthesisLevel++;
- break;
- case '[':
- squareBracketLevel++;
- break;
- case '{':
- curlyBraceLevel++;
- break;
- }
-
- while (parenthesisLevel != 0 || squareBracketLevel != 0 || curlyBraceLevel != 0) {
- char ch = GetNext();
- if (ch == '\0') {
- return false;
- }
- switch (ch) {
- case '(':
- parenthesisLevel--;
- break;
- case '[':
- squareBracketLevel--;
- break;
- case '{':
- curlyBraceLevel--;
- break;
- case ')':
- parenthesisLevel++;
- break;
- case ']':
- squareBracketLevel++;
- break;
- case '}':
- curlyBraceLevel++;
- break;
- }
- }
- return true;
- }
-
- string ReadIdentifier(char ch)
- {
- string identifier = ch.ToString();
- while (IsIdentifierPart(Peek())) {
- identifier = GetNext() + identifier;
- }
- return identifier;
- }
-
- bool IsIdentifierPart(char ch)
- {
- return Char.IsLetterOrDigit(ch) || ch == '_';
- }
- #endregion
-
- #region finite state machine
- readonly static int ERROR = 0;
- readonly static int START = 1;
- readonly static int DOT = 2;
- readonly static int MORE = 3;
- readonly static int CURLY = 4;
- readonly static int CURLY2 = 5;
- readonly static int CURLY3 = 6;
-
- readonly static int ACCEPT = 7;
- readonly static int ACCEPTNOMORE = 8;
- readonly static int ACCEPT2 = 9;
-
- readonly static string[] stateName = new string[] {
- "ERROR",
- "START",
- "DOT",
- "MORE",
- "CURLY",
- "CURLY2",
- "CURLY3",
- "ACCEPT",
- "ACCEPTNOMORE",
- "ACCEPT2"
- };
-
- string GetStateName(int state)
- {
- return stateName[state];
- }
-
- int state = 0;
- int lastAccept = 0;
- static int[,] stateTable = new int[,] {
- // Err, Dot, Str, ID, New, Brk, Par, Cur, Using
- /*ERROR*/ { ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR},
- /*START*/ { ERROR, DOT, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT2, CURLY, ACCEPTNOMORE},
- /*DOT*/ { ERROR, ERROR, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT, CURLY, ERROR},
- /*MORE*/ { ERROR, ERROR, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT2, CURLY, ERROR},
- /*CURLY*/ { ERROR, ERROR, ERROR, ERROR, ERROR, CURLY2, ERROR, ERROR, ERROR},
- /*CURLY2*/ { ERROR, ERROR, ERROR, CURLY3, ERROR, ERROR, ERROR, ERROR, ERROR},
- /*CURLY3*/ { ERROR, ERROR, ERROR, ERROR, ACCEPTNOMORE, ERROR, ERROR, ERROR, ERROR},
- /*ACCEPT*/ { ERROR, MORE, ERROR, ERROR, ACCEPT, ERROR, ERROR, ERROR, ACCEPTNOMORE},
- /*ACCEPTNOMORE*/ { ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR},
- /*ACCEPT2*/ { ERROR, MORE, ERROR, ACCEPT, ACCEPT, ERROR, ERROR, ERROR, ERROR},
- };
- #endregion
- }
-}
+using System;
+using System.Text;
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser
+{
+ /// <summary>
+ /// Description of ExpressionFinder.
+ /// </summary>
+ public class ExpressionFinder : IExpressionFinder
+ {
+ public string FindExpression(string inText, int offset)
+ {
+ this.text = FilterComments(inText, ref offset);
+ this.text = text;
+ this.offset = this.lastAccept = offset;
+ this.state = START;
+ if (this.text == null) {
+ return null;
+ }
+ while (state != ERROR) {
+ ReadNextToken();
+ //Console.WriteLine("cur state {0} got token {1}/{3} going to {2}", GetStateName(state), GetTokenName(curTokenType), GetStateName(stateTable[state, curTokenType]), curTokenType);
+ state = stateTable[state, curTokenType];
+
+ if (state == ACCEPT || state == ACCEPT2) {
+ lastAccept = this.offset;
+ }
+ if (state == ACCEPTNOMORE) {
+ return this.text.Substring(this.offset + 1, offset - this.offset);
+ }
+ }
+ return this.text.Substring(this.lastAccept + 1, offset - this.lastAccept);
+ }
+
+ #region Comment Filter and 'inside string watcher'
+ int initialOffset;
+ public string FilterComments(string text, ref int offset)
+ {
+ this.initialOffset = offset;
+ StringBuilder outText = new StringBuilder();
+ int curOffset = 0;
+ while (curOffset <= initialOffset) {
+ char ch = text[curOffset];
+
+ switch (ch) {
+ case '@':
+ if (curOffset + 1 < text.Length && text[curOffset + 1] == '"') {
+ outText.Append(text[curOffset++]); // @
+ outText.Append(text[curOffset++]); // "
+ if (!ReadVerbatimString(outText, text, ref curOffset)) {
+ return null;
+ }
+ }else{
+ outText.Append(ch);
+ ++curOffset;
+ }
+ break;
+ case '"':
+ outText.Append(ch);
+ curOffset++;
+ if (!ReadString(outText, text, ref curOffset)) {
+ return null;
+ }
+ break;
+ case '\'':
+ offset -= 1;
+ curOffset += 1;
+ if (!ReadToEOL(text, ref curOffset, ref offset)) {
+ return null;
+ }
+ break;
+ default:
+ outText.Append(ch);
+ ++curOffset;
+ break;
+ }
+ }
+
+ return outText.ToString();
+ }
+
+ bool ReadToEOL(string text, ref int curOffset, ref int offset)
+ {
+ while (curOffset <= initialOffset) {
+ char ch = text[curOffset++];
+ --offset;
+ if (ch == '\n') {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool ReadString(StringBuilder outText, string text, ref int curOffset)
+ {
+ while (curOffset <= initialOffset) {
+ char ch = text[curOffset++];
+ outText.Append(ch);
+ if (ch == '"') {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool ReadVerbatimString(StringBuilder outText, string text, ref int curOffset)
+ {
+ while (curOffset <= initialOffset) {
+ char ch = text[curOffset++];
+ outText.Append(ch);
+ if (ch == '"') {
+ if (curOffset < text.Length && text[curOffset] == '"') {
+ outText.Append(text[curOffset++]);
+ } else {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ bool ReadMultiLineComment(string text, ref int curOffset, ref int offset)
+ {
+ while (curOffset <= initialOffset) {
+ char ch = text[curOffset++];
+ --offset;
+ if (ch == '*') {
+ if (curOffset < text.Length && text[curOffset] == '/') {
+ ++curOffset;
+ --offset;
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ #endregion
+
+ #region mini backward lexer
+ string text;
+ int offset;
+
+ char GetNext()
+ {
+ if (offset >= 0) {
+ return text[offset--];
+ }
+ return '\0';
+ }
+
+ char Peek()
+ {
+ if (offset >= 0) {
+ return text[offset];
+ }
+ return '\0';
+ }
+
+ void UnGet()
+ {
+ ++offset;
+ }
+
+ // tokens for our lexer
+ static int Err = 0;
+ static int Dot = 1;
+ static int StrLit = 2;
+ static int Ident = 3;
+ static int New = 4;
+// static int Bracket = 5;
+ static int Parent = 6;
+ static int Curly = 7;
+ static int Using = 8;
+ int curTokenType;
+
+ readonly static string[] tokenStateName = new string[] {
+ "Err", "Dot", "StrLit", "Ident", "New", "Bracket", "Paren", "Curly", "Using"
+ };
+ string GetTokenName(int state)
+ {
+ return tokenStateName[state];
+ }
+
+ void ReadNextToken()
+ {
+ char ch = GetNext();
+
+ curTokenType = Err;
+ if (ch == '\0' || ch == '\n' || ch == '\r') {
+ return;
+ }
+ while (Char.IsWhiteSpace(ch)) {
+ ch = GetNext();
+ if (ch == '\n' || ch == '\r') {
+ return;
+ }
+ }
+
+ switch (ch) {
+ case '}':
+ if (ReadBracket('{', '}')) {
+ curTokenType = Curly;
+ }
+ break;
+ case ')':
+ if (ReadBracket('(', ')')) {
+ curTokenType = Parent;
+ }
+ break;
+ case ']':
+ if (ReadBracket('[', ']')) {
+ curTokenType = Ident;
+ }
+ break;
+ case '.':
+ curTokenType = Dot;
+ break;
+ case '\'':
+ case '"':
+ if (ReadStringLiteral(ch)) {
+ curTokenType = StrLit;
+ }
+ break;
+ default:
+ if (IsIdentifierPart(ch)) {
+ string ident = ReadIdentifier(ch);
+ if (ident != null) {
+ switch (ident.ToLower()) {
+ case "new":
+ curTokenType = New;
+ break;
+ case "imports":
+ curTokenType = Using;
+ break;
+ default:
+ curTokenType = Ident;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ bool ReadStringLiteral(char litStart)
+ {
+ while (true) {
+ char ch = GetNext();
+ if (ch == '\0') {
+ return false;
+ }
+ if (ch == litStart) {
+ if (Peek() == '@' && litStart == '"') {
+ GetNext();
+ }
+ return true;
+ }
+ }
+ }
+
+ bool ReadBracket(char openBracket, char closingBracket)
+ {
+ int curlyBraceLevel = 0;
+ int squareBracketLevel = 0;
+ int parenthesisLevel = 0;
+ switch (openBracket) {
+ case '(':
+ parenthesisLevel++;
+ break;
+ case '[':
+ squareBracketLevel++;
+ break;
+ case '{':
+ curlyBraceLevel++;
+ break;
+ }
+
+ while (parenthesisLevel != 0 || squareBracketLevel != 0 || curlyBraceLevel != 0) {
+ char ch = GetNext();
+ if (ch == '\0') {
+ return false;
+ }
+ switch (ch) {
+ case '(':
+ parenthesisLevel--;
+ break;
+ case '[':
+ squareBracketLevel--;
+ break;
+ case '{':
+ curlyBraceLevel--;
+ break;
+ case ')':
+ parenthesisLevel++;
+ break;
+ case ']':
+ squareBracketLevel++;
+ break;
+ case '}':
+ curlyBraceLevel++;
+ break;
+ }
+ }
+ return true;
+ }
+
+ string ReadIdentifier(char ch)
+ {
+ string identifier = ch.ToString();
+ while (IsIdentifierPart(Peek())) {
+ identifier = GetNext() + identifier;
+ }
+ return identifier;
+ }
+
+ bool IsIdentifierPart(char ch)
+ {
+ return Char.IsLetterOrDigit(ch) || ch == '_';
+ }
+ #endregion
+
+ #region finite state machine
+ readonly static int ERROR = 0;
+ readonly static int START = 1;
+ readonly static int DOT = 2;
+ readonly static int MORE = 3;
+ readonly static int CURLY = 4;
+ readonly static int CURLY2 = 5;
+ readonly static int CURLY3 = 6;
+
+ readonly static int ACCEPT = 7;
+ readonly static int ACCEPTNOMORE = 8;
+ readonly static int ACCEPT2 = 9;
+
+ readonly static string[] stateName = new string[] {
+ "ERROR",
+ "START",
+ "DOT",
+ "MORE",
+ "CURLY",
+ "CURLY2",
+ "CURLY3",
+ "ACCEPT",
+ "ACCEPTNOMORE",
+ "ACCEPT2"
+ };
+
+ string GetStateName(int state)
+ {
+ return stateName[state];
+ }
+
+ int state = 0;
+ int lastAccept = 0;
+ static int[,] stateTable = new int[,] {
+ // Err, Dot, Str, ID, New, Brk, Par, Cur, Using
+ /*ERROR*/ { ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR},
+ /*START*/ { ERROR, DOT, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT2, CURLY, ACCEPTNOMORE},
+ /*DOT*/ { ERROR, ERROR, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT, CURLY, ERROR},
+ /*MORE*/ { ERROR, ERROR, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT2, CURLY, ERROR},
+ /*CURLY*/ { ERROR, ERROR, ERROR, ERROR, ERROR, CURLY2, ERROR, ERROR, ERROR},
+ /*CURLY2*/ { ERROR, ERROR, ERROR, CURLY3, ERROR, ERROR, ERROR, ERROR, ERROR},
+ /*CURLY3*/ { ERROR, ERROR, ERROR, ERROR, ACCEPTNOMORE, ERROR, ERROR, ERROR, ERROR},
+ /*ACCEPT*/ { ERROR, MORE, ERROR, ERROR, ACCEPT, ERROR, ERROR, ERROR, ACCEPTNOMORE},
+ /*ACCEPTNOMORE*/ { ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR},
+ /*ACCEPT2*/ { ERROR, MORE, ERROR, ACCEPT, ACCEPT, ERROR, ERROR, ERROR, ERROR},
+ };
+ #endregion
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/ExpressionFinder.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,65 +1,65 @@
-// created on 06.08.2003 at 12:37
-
-using System.Diagnostics;
-
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Class : AbstractClass
- {
- ICompilationUnit cu;
-
- public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
- {
- this.cu = cu;
- classType = t;
- this.region = region;
- modifiers = (ModifierEnum)m;
- }
-
- public void UpdateModifier()
- {
- if (classType == ClassType.Enum) {
- foreach (Field f in Fields) {
- f.AddModifier(ModifierEnum.Public);
- }
- return;
- }
- if (classType != ClassType.Interface) {
- return;
- }
- foreach (Class c in InnerClasses) {
- c.modifiers = c.modifiers | ModifierEnum.Public;
- }
- foreach (IMethod m in Methods) {
- if (m is Constructor) {
- ((Constructor)m).AddModifier(ModifierEnum.Public);
- } else if (m is Method) {
- ((Method)m).AddModifier(ModifierEnum.Public);
- } else {
- Debug.Assert(false, "Unexpected type in method of interface. Can not set modifier to public!");
- }
- }
- foreach (Event e in Events) {
- e.AddModifier(ModifierEnum.Public);
- }
- foreach (Field f in Fields) {
- f.AddModifier(ModifierEnum.Public);
- }
- foreach (Indexer i in Indexer) {
- i.AddModifier(ModifierEnum.Public);
- }
- foreach (Property p in Properties) {
- p.AddModifier(ModifierEnum.Public);
- }
-
- }
- public override ICompilationUnit CompilationUnit {
- get {
- return cu;
- }
- }
- }
-}
+// created on 06.08.2003 at 12:37
+
+using System.Diagnostics;
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Class : AbstractClass
+ {
+ ICompilationUnit cu;
+
+ public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
+ {
+ this.cu = cu;
+ classType = t;
+ this.region = region;
+ modifiers = (ModifierEnum)m;
+ }
+
+ public void UpdateModifier()
+ {
+ if (classType == ClassType.Enum) {
+ foreach (Field f in Fields) {
+ f.AddModifier(ModifierEnum.Public);
+ }
+ return;
+ }
+ if (classType != ClassType.Interface) {
+ return;
+ }
+ foreach (Class c in InnerClasses) {
+ c.modifiers = c.modifiers | ModifierEnum.Public;
+ }
+ foreach (IMethod m in Methods) {
+ if (m is Constructor) {
+ ((Constructor)m).AddModifier(ModifierEnum.Public);
+ } else if (m is Method) {
+ ((Method)m).AddModifier(ModifierEnum.Public);
+ } else {
+ Debug.Assert(false, "Unexpected type in method of interface. Can not set modifier to public!");
+ }
+ }
+ foreach (Event e in Events) {
+ e.AddModifier(ModifierEnum.Public);
+ }
+ foreach (Field f in Fields) {
+ f.AddModifier(ModifierEnum.Public);
+ }
+ foreach (Indexer i in Indexer) {
+ i.AddModifier(ModifierEnum.Public);
+ }
+ foreach (Property p in Properties) {
+ p.AddModifier(ModifierEnum.Public);
+ }
+
+ }
+ public override ICompilationUnit CompilationUnit {
+ get {
+ return cu;
+ }
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Class.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,23 +1,23 @@
-// created on 06.08.2003 at 12:35
-
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Constructor : AbstractMethod
- {
- public void AddModifier(ModifierEnum m)
- {
- modifiers = modifiers | m;
- }
-
- public Constructor(Modifier m, IRegion region, IRegion bodyRegion)
- {
- FullyQualifiedName = "#ctor";
- this.region = region;
- this.bodyRegion = bodyRegion;
- modifiers = (ModifierEnum)m;
- }
- }
-}
+// created on 06.08.2003 at 12:35
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Constructor : AbstractMethod
+ {
+ public void AddModifier(ModifierEnum m)
+ {
+ modifiers = modifiers | m;
+ }
+
+ public Constructor(Modifier m, IRegion region, IRegion bodyRegion)
+ {
+ FullyQualifiedName = "#ctor";
+ this.region = region;
+ this.bodyRegion = bodyRegion;
+ modifiers = (ModifierEnum)m;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Constructor.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,24 +1,24 @@
-// created on 06.08.2003 at 12:30
-
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Event : AbstractEvent
- {
- public void AddModifier(ModifierEnum m)
- {
- modifiers = modifiers | m;
- }
-
- public Event(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
- {
- FullyQualifiedName = name;
- returnType = type;
- this.region = region;
- this.bodyRegion = bodyRegion;
- modifiers = (ModifierEnum)m;
- }
- }
-}
+// created on 06.08.2003 at 12:30
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Event : AbstractEvent
+ {
+ public void AddModifier(ModifierEnum m)
+ {
+ modifiers = modifiers | m;
+ }
+
+ public Event(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
+ {
+ FullyQualifiedName = name;
+ returnType = type;
+ this.region = region;
+ this.bodyRegion = bodyRegion;
+ modifiers = (ModifierEnum)m;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Event.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,29 +1,29 @@
-// created on 04.08.2003 at 18:06
-using System;
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Field : AbstractField
- {
- public void AddModifier(ModifierEnum m)
- {
- modifiers = modifiers | m;
- }
-
- public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region)
- {
- this.returnType = type;
- this.FullyQualifiedName = fullyQualifiedName;
- this.region = region;
- modifiers = (ModifierEnum)m;
-// Console.WriteLine("modifiers for field {0} are {1} were {2}", fullyQualifiedName, modifiers, m);
- }
-
- public void SetModifiers(ModifierEnum m)
- {
- modifiers = m;
- }
- }
-}
+// created on 04.08.2003 at 18:06
+using System;
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Field : AbstractField
+ {
+ public void AddModifier(ModifierEnum m)
+ {
+ modifiers = modifiers | m;
+ }
+
+ public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region)
+ {
+ this.returnType = type;
+ this.FullyQualifiedName = fullyQualifiedName;
+ this.region = region;
+ modifiers = (ModifierEnum)m;
+// Console.WriteLine("modifiers for field {0} are {1} were {2}", fullyQualifiedName, modifiers, m);
+ }
+
+ public void SetModifiers(ModifierEnum m)
+ {
+ modifiers = m;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Field.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,24 +1,24 @@
-// created on 06.08.2003 at 12:34
-
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Indexer : AbstractIndexer
- {
- public void AddModifier(ModifierEnum m)
- {
- modifiers = modifiers | m;
- }
-
- public Indexer(ReturnType type, ParameterCollection parameters, Modifier m, IRegion region, IRegion bodyRegion)
- {
- returnType = type;
- this.parameters = parameters;
- this.region = region;
- this.bodyRegion = bodyRegion;
- modifiers = (ModifierEnum)m;
- }
- }
-}
+// created on 06.08.2003 at 12:34
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Indexer : AbstractIndexer
+ {
+ public void AddModifier(ModifierEnum m)
+ {
+ modifiers = modifiers | m;
+ }
+
+ public Indexer(ReturnType type, ParameterCollection parameters, Modifier m, IRegion region, IRegion bodyRegion)
+ {
+ returnType = type;
+ this.parameters = parameters;
+ this.region = region;
+ this.bodyRegion = bodyRegion;
+ modifiers = (ModifierEnum)m;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Indexer.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,24 +1,24 @@
-// created on 06.08.2003 at 12:35
-using System;
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Method : AbstractMethod
- {
- public void AddModifier(ModifierEnum m)
- {
- modifiers = modifiers | m;
- }
-
- public Method(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
- {
- FullyQualifiedName = name;
- returnType = type;
- this.region = region;
- this.bodyRegion = bodyRegion;
- modifiers = (ModifierEnum)m;
- }
- }
-}
+// created on 06.08.2003 at 12:35
+using System;
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Method : AbstractMethod
+ {
+ public void AddModifier(ModifierEnum m)
+ {
+ modifiers = modifiers | m;
+ }
+
+ public Method(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
+ {
+ FullyQualifiedName = name;
+ returnType = type;
+ this.region = region;
+ this.bodyRegion = bodyRegion;
+ modifiers = (ModifierEnum)m;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Method.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,15 +1,15 @@
-// created on 07.08.2003 at 20:12
-
-using MonoDevelop.Internal.Parser;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Parameter : AbstractParameter
- {
- public Parameter(string name, ReturnType type)
- {
- Name = name;
- returnType = type;
- }
- }
-}
+// created on 07.08.2003 at 20:12
+
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Parameter : AbstractParameter
+ {
+ public Parameter(string name, ReturnType type)
+ {
+ Name = name;
+ returnType = type;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Parameter.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,24 +1,24 @@
-// created on 06.08.2003 at 12:36
-
-using MonoDevelop.Internal.Parser;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class Property : AbstractProperty
- {
- public void AddModifier(ModifierEnum m)
- {
- modifiers = modifiers | m;
- }
-
- public Property(string fullyQualifiedName, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
- {
- this.FullyQualifiedName = fullyQualifiedName;
- returnType = type;
- this.region = region;
- this.bodyRegion = bodyRegion;
- modifiers = (ModifierEnum)m;
- }
- }
-}
+// created on 06.08.2003 at 12:36
+
+using MonoDevelop.Internal.Parser;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class Property : AbstractProperty
+ {
+ public void AddModifier(ModifierEnum m)
+ {
+ modifiers = modifiers | m;
+ }
+
+ public Property(string fullyQualifiedName, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion)
+ {
+ this.FullyQualifiedName = fullyQualifiedName;
+ returnType = type;
+ this.region = region;
+ this.bodyRegion = bodyRegion;
+ modifiers = (ModifierEnum)m;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/Property.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,52 +1,52 @@
-// created on 04.08.2003 at 18:08
-using System;
-using MonoDevelop.Internal.Parser;
-
-namespace VBBinding.Parser.SharpDevelopTree
-{
- public class ReturnType : AbstractReturnType
- {
- public new int PointerNestingLevel {
- get {
- return base.pointerNestingLevel;
- }
- set {
- base.pointerNestingLevel = value;
- }
- }
-
- public new int[] ArrayDimensions {
- get {
- return base.arrayDimensions;
- }
- set {
- base.arrayDimensions = value;
- }
- }
-
- public ReturnType(string fullyQualifiedName)
- {
- base.FullyQualifiedName = fullyQualifiedName;
-// Console.WriteLine("NEW RETURN TYPE WITH : " + fullyQualifiedName);
- }
-
- public ReturnType(string fullyQualifiedName, int[] arrayDimensions, int pointerNestingLevel)
- {
- this.FullyQualifiedName = fullyQualifiedName;
- this.arrayDimensions = arrayDimensions;
- this.pointerNestingLevel = pointerNestingLevel;
- }
-
- public ReturnType(ICSharpCode.SharpRefactory.Parser.AST.VB.TypeReference type)
- {
- base.FullyQualifiedName = type.SystemType == null ? type.Type : type.SystemType;
- base.arrayDimensions = type.RankSpecifier == null ? new int[] { } : (int[])type.RankSpecifier.ToArray(typeof(int));
- base.pointerNestingLevel = 0;
- }
-
- public ReturnType Clone()
- {
- return new ReturnType(FullyQualifiedName, arrayDimensions, pointerNestingLevel);
- }
- }
-}
+// created on 04.08.2003 at 18:08
+using System;
+using MonoDevelop.Internal.Parser;
+
+namespace VBBinding.Parser.SharpDevelopTree
+{
+ public class ReturnType : AbstractReturnType
+ {
+ public new int PointerNestingLevel {
+ get {
+ return base.pointerNestingLevel;
+ }
+ set {
+ base.pointerNestingLevel = value;
+ }
+ }
+
+ public new int[] ArrayDimensions {
+ get {
+ return base.arrayDimensions;
+ }
+ set {
+ base.arrayDimensions = value;
+ }
+ }
+
+ public ReturnType(string fullyQualifiedName)
+ {
+ base.FullyQualifiedName = fullyQualifiedName;
+// Console.WriteLine("NEW RETURN TYPE WITH : " + fullyQualifiedName);
+ }
+
+ public ReturnType(string fullyQualifiedName, int[] arrayDimensions, int pointerNestingLevel)
+ {
+ this.FullyQualifiedName = fullyQualifiedName;
+ this.arrayDimensions = arrayDimensions;
+ this.pointerNestingLevel = pointerNestingLevel;
+ }
+
+ public ReturnType(ICSharpCode.SharpRefactory.Parser.AST.VB.TypeReference type)
+ {
+ base.FullyQualifiedName = type.SystemType == null ? type.Type : type.SystemType;
+ base.arrayDimensions = type.RankSpecifier == null ? new int[] { } : (int[])type.RankSpecifier.ToArray(typeof(int));
+ base.pointerNestingLevel = 0;
+ }
+
+ public ReturnType Clone()
+ {
+ return new ReturnType(FullyQualifiedName, arrayDimensions, pointerNestingLevel);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/Parser/SharpDevelopTree/ReturnType.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/ProjectNodeBuilder.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/Makefile.am
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,33 +1,33 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: System.CLSCompliantAttribute(true)]
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-[assembly: AssemblyTitle("SharpRefactoryVB")]
-[assembly: AssemblyDescription("Parser for VB.NET")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("Markus Palme, Andrea Paatz, Mike Krueger, Levi Bard")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.1.1649")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: System.CLSCompliantAttribute(true)]
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+[assembly: AssemblyTitle("SharpRefactoryVB")]
+[assembly: AssemblyDescription("Parser for VB.NET")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Markus Palme, Andrea Paatz, Mike Krueger, Levi Bard")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.1.1649")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/AssemblyInfo.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,1861 +1,1861 @@
-// CSharpVisitor.cs
-// Copyright (C) 2004 Markus Palme (markuspalme at gmx.de)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Reflection;
-using System.CodeDom;
-using System.Text;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-
-namespace ICSharpCode.SharpRefactory.PrettyPrinter.VB
-{
- public class CSharpVisitor : IASTVisitor
- {
- readonly string newLineSep = Environment.NewLine;
- StringBuilder sourceText = new StringBuilder();
- int indentLevel = 0;
- Errors errors = new Errors();
- TypeDeclaration currentType = null;
- Stack withExpressionStack = new Stack();
-
- public StringBuilder SourceText {
- get {
- return sourceText;
- }
- }
-
- public void AppendIndentation()
- {
- for (int i = 0; i < indentLevel; ++i) {
- sourceText.Append("\t");
- }
- }
-
- public void AppendNewLine()
- {
- sourceText.Append(newLineSep);
- }
-
- public void AppendStatementEnd()
- {
- sourceText.Append(";");
- AppendNewLine();
- }
-
- void DebugOutput(object o)
- {
-// Console.WriteLine(o.ToString());
- }
-
- #region ICSharpCode.SharpRefactory.Parser.VB.IASTVisitor interface implementation
- public object Visit(INode node, object data)
- {
- AppendIndentation();
- sourceText.Append("// warning visited unknown node :");
- sourceText.Append(node);
- AppendNewLine();
- return String.Empty;
- }
-
- public object Visit(CompilationUnit compilationUnit, object data)
- {
- DebugOutput(compilationUnit);
- compilationUnit.AcceptChildren(this, data);
- return null;
- }
-
-#region GlobalScope
- public object Visit(NamespaceDeclaration namespaceDeclaration, object data)
- {
- DebugOutput(namespaceDeclaration);
- AppendIndentation();
- sourceText.Append("namespace ");
- sourceText.Append(namespaceDeclaration.NameSpace);
- AppendNewLine();
- sourceText.Append("{");
- AppendNewLine();
- ++indentLevel;
- namespaceDeclaration.AcceptChildren(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- return null;
- }
-
- public object Visit(ImportsStatement importsStatement, object data)
- {
- foreach (INode node in importsStatement.ImportClauses) {
- node.AcceptVisitor(this, data);
- }
- return null;
- }
-
-
- public object Visit(ImportsDeclaration importsDeclaration, object data)
- {
- DebugOutput(importsDeclaration);
- AppendIndentation();
- sourceText.Append("using ");
- sourceText.Append(importsDeclaration.Namespace);
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
- public object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
- {
- DebugOutput(importsAliasDeclaration);
- AppendIndentation();
- sourceText.Append("using ");
- sourceText.Append(importsAliasDeclaration.Alias);
- sourceText.Append(" = ");
- sourceText.Append(importsAliasDeclaration.Namespace);
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
-
- public object Visit(TypeDeclaration typeDeclaration, object data)
- {
- DebugOutput(typeDeclaration);
- AppendAttributes(typeDeclaration.Attributes);
- string modifier = GetModifier(typeDeclaration.Modifier);
- string type = String.Empty;
-
- switch (typeDeclaration.Type) {
- case Types.Class:
- type = "class ";
- break;
- case Types.Enum:
- type = "enum ";
- break;
- case Types.Interface:
- type = "interface ";
- break;
- case Types.Module:
- case Types.Structure:
- type = "struct ";
- break;
- }
- AppendIndentation();
- sourceText.Append(modifier);
- sourceText.Append(type);
- sourceText.Append(typeDeclaration.Name);
-
- bool hasBaseType = typeDeclaration.BaseType != null;
- if (hasBaseType) {
- sourceText.Append(" : ");
- sourceText.Append(ConvertTypeString(typeDeclaration.BaseType));
- }
-
- if (typeDeclaration.BaseInterfaces != null && typeDeclaration.BaseInterfaces.Count > 0) {
- if (!hasBaseType) {
- sourceText.Append(" : ");
- } else {
- sourceText.Append(", ");
- }
- for (int i = 0; i < typeDeclaration.BaseInterfaces.Count; ++i) {
- if (typeDeclaration.BaseInterfaces[i] is TypeReference) {
- sourceText.Append((typeDeclaration.BaseInterfaces[i] as TypeReference).Type);
- } else {
- sourceText.Append(typeDeclaration.BaseInterfaces[i].ToString());
- }
- if (i + 1 < typeDeclaration.BaseInterfaces.Count) {
- sourceText.Append(", ");
- }
- }
- }
- AppendNewLine();
- AppendIndentation();
- sourceText.Append("{");
- AppendNewLine();
- ++indentLevel;
- TypeDeclaration oldType = currentType;
- currentType = typeDeclaration;
- typeDeclaration.AcceptChildren(this, data);
- currentType = oldType;
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- return null;
- }
-
- public object Visit(DelegateDeclaration delegateDeclaration, object data)
- {
- DebugOutput(delegateDeclaration);
- AppendAttributes(delegateDeclaration.Attributes);
- AppendIndentation();
- sourceText.Append(GetModifier(delegateDeclaration.Modifier));
- sourceText.Append("delegate ");
- sourceText.Append(GetTypeString(delegateDeclaration.ReturnType));
- sourceText.Append(" ");
- sourceText.Append(delegateDeclaration.Name);
- sourceText.Append("(");
- AppendParameters(delegateDeclaration.Parameters);
- sourceText.Append(");");
- AppendNewLine();
- return null;
- }
-
- public object Visit(EventDeclaration eventDeclaration, object data)
- {
- DebugOutput(eventDeclaration);
- AppendAttributes(eventDeclaration.Attributes);
- AppendIndentation();
- sourceText.Append(GetModifier(eventDeclaration.Modifier));
- sourceText.Append("event ");
-
- if (eventDeclaration.TypeReference == null) {
- sourceText.Append(eventDeclaration.Name);
- sourceText.Append("EventHandler");
- } else {
- sourceText.Append(GetTypeString(eventDeclaration.TypeReference));
- }
- sourceText.Append(" ");
- sourceText.Append(eventDeclaration.Name);
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-#endregion
-
-#region TypeLevel
- public object Visit(VariableDeclaration variableDeclaration, object data)
- {
- // called inside ENUMS
-// AppendAttributes(field.Attributes);
- AppendIndentation();
- sourceText.Append(variableDeclaration.Name);
- if (variableDeclaration.Initializer != null) {
- sourceText.Append(" = ");
- sourceText.Append(variableDeclaration.Initializer.AcceptVisitor(this, data));
- }
- AppendNewLine();
- return null;
- }
-
- public object Visit(FieldDeclaration fieldDeclaration, object data)
- {
- DebugOutput(fieldDeclaration);
-
- foreach (VariableDeclaration field in fieldDeclaration.Fields) {
- AppendAttributes(fieldDeclaration.Attributes);
- AppendIndentation();
- if (currentType.Type == Types.Enum) {
- if (fieldDeclaration.Fields.IndexOf(field) > 0) {
- sourceText.Append(", ");
- }
- sourceText.Append(field.Name);
- if (field.Initializer != null) {
- sourceText.Append(" = ");
- sourceText.Append(field.Initializer.AcceptVisitor(this, data).ToString());
- }
- } else {
- if (fieldDeclaration.Modifier == Modifier.None) {
- sourceText.Append(" private ");
- } else {
- sourceText.Append(GetModifier(fieldDeclaration.Modifier));
- }
- if (field.Type == null)
- sourceText.Append("object");
- else
- sourceText.Append(GetTypeString(field.Type));
- sourceText.Append(" ");
- sourceText.Append(field.Name);
- if (field.Initializer != null) {
- sourceText.Append(" = ");
- sourceText.Append(field.Initializer.AcceptVisitor(this, data).ToString());
- } else {
- if (field.Type != null && field.Type.Dimension != null) {
- sourceText.Append(" = new ");
- sourceText.Append(ConvertTypeString(field.Type.Type));
- sourceText.Append("[");
- sourceText.Append(GetExpressionList(field.Type.Dimension));
- sourceText.Append("]");
- }
- }
- sourceText.Append(";");
- AppendNewLine();
- }
- }
-
- // if that's not the last enum member, add a comma
- if (currentType.Type == Types.Enum) {
- int pos = currentType.Children.IndexOf(fieldDeclaration);
- if (pos >= 0) {
- for (int i = pos+1; i < currentType.Children.Count; i++) {
- if (currentType.Children[i] is FieldDeclaration) {
- sourceText.Append(",");
- break;
- }
- }
- }
- AppendNewLine();
- }
- return null;
- }
-
- public object Visit(MethodDeclaration methodDeclaration, object data)
- {
- DebugOutput(methodDeclaration);
- exitConstructStack.Push(new DictionaryEntry(typeof(MethodDeclaration), null));
-
- AppendNewLine();
- AppendAttributes(methodDeclaration.Attributes);
- AppendIndentation();
- sourceText.Append(GetModifier(methodDeclaration.Modifier));
- sourceText.Append(GetTypeString(methodDeclaration.TypeReference));
- sourceText.Append(" ");
- sourceText.Append(methodDeclaration.Name);
- sourceText.Append("(");
- AppendParameters(methodDeclaration.Parameters);
- sourceText.Append(")");
-
- if (currentType.Type != Types.Interface &&
- (methodDeclaration.Modifier & Modifier.MustOverride) != Modifier.MustOverride)
- {
- AppendNewLine();
- AppendIndentation();
- sourceText.Append("{");
- AppendNewLine();
- if (methodDeclaration.Body != null) {
- ++indentLevel;
- methodDeclaration.Body.AcceptVisitor(this, data);
- GenerateExitConstructLabel();
- --indentLevel;
- }
- AppendIndentation();
- sourceText.Append("}");
- } else {
- sourceText.Append(";");
- }
- AppendNewLine();
- return null;
- }
-
- public object Visit(ConstructorDeclaration constructorDeclaration, object data)
- {
- DebugOutput(constructorDeclaration);
- exitConstructStack.Push(new DictionaryEntry(typeof(MethodDeclaration), null));
- AppendNewLine();
- AppendAttributes(constructorDeclaration.Attributes);
- AppendIndentation();
- sourceText.Append(GetModifier(constructorDeclaration.Modifier));
- sourceText.Append(this.currentType.Name);
- sourceText.Append("(");
- AppendParameters(constructorDeclaration.Parameters);
- sourceText.Append(")");
-
- AppendNewLine();
- AppendIndentation();
- sourceText.Append("{");
- AppendNewLine();
- if (constructorDeclaration.Body != null) {
- ++indentLevel;
- constructorDeclaration.Body.AcceptVisitor(this, data);
- GenerateExitConstructLabel();
- --indentLevel;
- }
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- return null;
- }
-
- public object Visit(DeclareDeclaration declareDeclaration, object data)
- {
- DebugOutput(declareDeclaration);
- AppendAttributes(declareDeclaration.Attributes);
- AppendIndentation();
- sourceText.Append(String.Format("[System.Runtime.InteropServices.DllImport({0}", declareDeclaration.Library));
- if (declareDeclaration.Alias != null) {
- sourceText.Append(String.Format(", EntryPoint={0}", declareDeclaration.Alias));
- }
-
- switch (declareDeclaration.Charset) {
- case CharsetModifier.ANSI:
- sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Ansi");
- break;
- case CharsetModifier.Unicode:
- sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Unicode");
- break;
- case CharsetModifier.Auto:
- sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Auto");
- break;
- }
-
- sourceText.Append(")]");
- AppendNewLine();
- AppendIndentation();
- sourceText.Append(GetModifier(declareDeclaration.Modifier));
- sourceText.Append("static extern ");
- sourceText.Append(GetTypeString(declareDeclaration.ReturnType));
- sourceText.Append(" ");
- sourceText.Append(declareDeclaration.Name);
- sourceText.Append("(");
- AppendParameters(declareDeclaration.Parameters);
- sourceText.Append(");");
- AppendNewLine();
- return null;
- }
-
- public object Visit(PropertyDeclaration propertyDeclaration, object data)
- {
- DebugOutput(propertyDeclaration);
- AppendNewLine();
- AppendAttributes(propertyDeclaration.Attributes);
- AppendIndentation();
- sourceText.Append(GetModifier(propertyDeclaration.Modifier & ~Modifier.ReadOnly));
-
- sourceText.Append(GetTypeString(propertyDeclaration.TypeReference));
- sourceText.Append(" ");
- sourceText.Append(propertyDeclaration.Name);
- sourceText.Append(" {");
- AppendNewLine();
-
- if (currentType.Type != Types.Interface) {
- if (propertyDeclaration.GetRegion != null) {
- ++indentLevel;
- propertyDeclaration.GetRegion.AcceptVisitor(this, data);
- --indentLevel;
- }
-
- if (propertyDeclaration.SetRegion != null) {
- ++indentLevel;
- propertyDeclaration.SetRegion.AcceptVisitor(this, data);
- --indentLevel;
- }
-
- }
- // if abstract, add default get/set
- if ((propertyDeclaration.Modifier & Modifier.MustOverride) == Modifier.MustOverride &&
- propertyDeclaration.GetRegion == null &&
- propertyDeclaration.SetRegion == null) {
- AppendIndentation();
- sourceText.Append("get;");
- AppendNewLine();
- AppendIndentation();
- sourceText.Append("set;");
- AppendNewLine();
- }
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- return null;
- }
-
- public object Visit(PropertyGetRegion propertyGetRegion, object data)
- {
- DebugOutput(propertyGetRegion);
- exitConstructStack.Push(new DictionaryEntry(typeof(PropertyDeclaration), null));
- AppendAttributes(propertyGetRegion.Attributes);
- AppendIndentation();
- sourceText.Append("get {");
- AppendNewLine();
- if (propertyGetRegion.Block != null) {
- ++indentLevel;
- propertyGetRegion.Block.AcceptVisitor(this, data);
- --indentLevel;
- }
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(PropertySetRegion propertySetRegion, object data)
- {
- DebugOutput(propertySetRegion);
- exitConstructStack.Push(new DictionaryEntry(typeof(PropertyDeclaration), null));
- AppendAttributes(propertySetRegion.Attributes);
- AppendIndentation();
- sourceText.Append("set {");
- AppendNewLine();
- if (propertySetRegion.Block != null) {
- ++indentLevel;
- propertySetRegion.Block.AcceptVisitor(this, data);
- --indentLevel;
- }
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(TypeReference typeReference, object data)
- {
- return ConvertTypeString(typeReference.Type);
- }
-#endregion
-
-#region Statements
- public object Visit(Statement statement, object data)
- {
- AppendIndentation();
- sourceText.Append("// warning visited unknown statment :");
- sourceText.Append(statement);
- AppendNewLine();
- return String.Empty;
- }
-
- public object Visit(BlockStatement blockStatement, object data)
- {
- DebugOutput(blockStatement);
- blockStatement.AcceptChildren(this, data);
- return null;
- }
-
- public object Visit(StatementExpression statementExpression, object data)
- {
- DebugOutput(statementExpression);
- AppendIndentation();
- if (statementExpression.Expression == null) {
- sourceText.Append("// warning got empty statement expression :");
- sourceText.Append(statementExpression);
- } else {
- sourceText.Append(statementExpression.Expression.AcceptVisitor(this, data).ToString());
- sourceText.Append(";");
- }
- AppendNewLine();
- return null;
- }
-
- public object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
- {
- DebugOutput(localVariableDeclaration);
- for (int i = 0; i < localVariableDeclaration.Variables.Count; ++i) {
- VariableDeclaration localVar = (VariableDeclaration)localVariableDeclaration.Variables[i];
- AppendIndentation();
- sourceText.Append(GetModifier(localVariableDeclaration.Modifier));
- ArrayCreateExpression ace = localVar.Initializer as ArrayCreateExpression;
- if (ace != null && (ace.ArrayInitializer == null || ace.ArrayInitializer.CreateExpressions == null)) {
- sourceText.Append(ConvertTypeString(ace.CreateType.Type));
- sourceText.Append(" ");
- sourceText.Append(localVar.Name);
- sourceText.Append("[");
- sourceText.Append(GetExpressionList(ace.Parameters));
- sourceText.Append("]");
-
- } else {
- if (localVar.Type == null) {
- bool foundType = false;
- for (int j = i + 1; j < localVariableDeclaration.Variables.Count; ++j) {
- VariableDeclaration nextLocalVar = (VariableDeclaration)localVariableDeclaration.Variables[j];
- if (nextLocalVar.Type != null) {
- sourceText.Append(GetTypeString(nextLocalVar.Type));
- foundType = true;
- break;
- }
- }
- if (!foundType) {
- sourceText.Append("object");
- }
- } else {
- sourceText.Append(GetTypeString(localVar.Type));
- }
- sourceText.Append(" ");
- sourceText.Append(localVar.Name);
- if (localVar.Initializer != null) {
- sourceText.Append(" = ");
- sourceText.Append(localVar.Initializer.AcceptVisitor(this, data).ToString());
- } else {
- if (localVar.Type != null && localVar.Type.Dimension != null) {
- sourceText.Append(" = new ");
- sourceText.Append(ConvertTypeString(localVar.Type.Type));
- sourceText.Append("[");
- sourceText.Append(GetExpressionList(localVar.Type.Dimension));
- sourceText.Append("]");
- }
- }
- }
- sourceText.Append(";");
- AppendNewLine();
- }
- return null;
- }
-
- public object Visit(SimpleIfStatement ifStatement, object data)
- {
- AppendIndentation();
- sourceText.Append("if (");
- sourceText.Append(ifStatement.Condition.AcceptVisitor(this, data).ToString());
- sourceText.Append(") {");
- AppendNewLine();
- ++indentLevel;
- foreach(Statement statement in ifStatement.Statements) {
- statement.AcceptVisitor(this, data);
- }
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
-
- if(ifStatement.ElseStatements != null && ifStatement.ElseStatements.Count > 0) {
- sourceText.Append(" else {");
- AppendNewLine();
- ++indentLevel;
- foreach(Statement statement in ifStatement.ElseStatements) {
- statement.AcceptVisitor(this, data);
- }
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- }
-
- AppendNewLine();
- return null;
- }
-
- public object Visit(IfStatement ifStatement, object data)
- {
- DebugOutput(ifStatement);
- AppendIndentation();
- sourceText.Append("if (");
- sourceText.Append(ifStatement.Condition.AcceptVisitor(this, data).ToString());
- sourceText.Append(") {");
- AppendNewLine();
- ++indentLevel;
- ifStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("}");
-
- if (ifStatement.ElseIfStatements != null) {
- foreach (ElseIfSection elseIfSection in ifStatement.ElseIfStatements) {
- sourceText.Append(" else if (");
- sourceText.Append(elseIfSection.Condition.AcceptVisitor(this, data).ToString());
- sourceText.Append(") {");
- AppendNewLine();
- ++indentLevel;
- elseIfSection.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- }
- }
-
- if (ifStatement.EmbeddedElseStatement != null) {
- sourceText.Append(" else {");
- AppendNewLine();
- ++indentLevel;
- ifStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- }
-
- AppendNewLine();
- return null;
- }
-
- public object Visit(LabelStatement labelStatement, object data)
- {
- DebugOutput(labelStatement);
- AppendIndentation();
- sourceText.Append(labelStatement.Label);
- sourceText.Append(":");
- AppendNewLine();
- if (labelStatement.EmbeddedStatement != null) {
- labelStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
- return null;
- }
-
- public object Visit(GoToStatement goToStatement, object data)
- {
- DebugOutput(goToStatement);
- AppendIndentation();
- sourceText.Append("goto");
- sourceText.Append(goToStatement.LabelName);
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
- public object Visit(SelectStatement selectStatement, object data)
- {
- DebugOutput(selectStatement);
- exitConstructStack.Push(new DictionaryEntry(typeof(SelectStatement), null));
- string selectExpression = selectStatement.SelectExpression.AcceptVisitor(this, data).ToString();
- AppendIndentation();
- for (int j = 0; j < selectStatement.SelectSections.Count; ++j) {
- SelectSection selectSection = (SelectSection)selectStatement.SelectSections[j];
- if (selectSection.CaseClauses.Count == 1 && ((CaseClause)selectSection.CaseClauses[0]).IsDefaultCase) {
- sourceText.Append("{");
- } else {
- sourceText.Append("if (");
- for (int i = 0; i < selectSection.CaseClauses.Count; ++i) {
- CaseClause caseClause = (CaseClause)selectSection.CaseClauses[i];
- if (caseClause.BoundaryExpression != null) {
- sourceText.Append(caseClause.ComparisonExpression.AcceptVisitor(this, data));
- sourceText.Append(" <= ");
- sourceText.Append(selectExpression);
- sourceText.Append(" && ");
- sourceText.Append(selectExpression);
- sourceText.Append(" <= ");
- sourceText.Append(caseClause.BoundaryExpression.AcceptVisitor(this, data));
- } else {
- if (caseClause.ComparisonExpression != null) {
- sourceText.Append(selectExpression);
- sourceText.Append(" == ");
- sourceText.Append(caseClause.ComparisonExpression.AcceptVisitor(this, data));
- } else {
- // dummy default should never evaluate (only for default case)
- sourceText.Append(" true ");
- }
- }
- if (i + 1 < selectSection.CaseClauses.Count) {
- sourceText.Append(" || ");
- }
- }
- sourceText.Append(") {");
- }
- AppendNewLine();
- ++indentLevel;
- selectSection.EmbeddedStatement.AcceptChildren(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- if (j + 1 < selectStatement.SelectSections.Count) {
- sourceText.Append(" else ");
- }
- }
- AppendNewLine();
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(StopStatement stopStatement, object data)
- {
- DebugOutput(stopStatement);
- AppendIndentation();
- sourceText.Append("Debugger.Break();");
- AppendNewLine();
- return null;
- }
-
- public object Visit(ResumeStatement resumeStatement, object data)
- {
- DebugOutput(resumeStatement);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(resumeStatement);
- AppendNewLine();
- return null;
- }
-
- public object Visit(EraseStatement eraseStatement, object data)
- {
- DebugOutput(eraseStatement);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(eraseStatement);
- AppendNewLine();
- return null;
- }
-
- public object Visit(ErrorStatement errorStatement, object data)
- {
- DebugOutput(errorStatement);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(errorStatement);
- AppendNewLine();
- return null;
- }
-
- public object Visit(OnErrorStatement onErrorStatement, object data)
- {
- DebugOutput(onErrorStatement);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(onErrorStatement);
- AppendNewLine();
- return null;
- }
-
- public object Visit(ReDimStatement reDimStatement, object data)
- {
- DebugOutput(reDimStatement);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(reDimStatement);
- AppendNewLine();
- return null;
- }
-
- public object Visit(AddHandlerStatement addHandlerStatement, object data)
- {
- DebugOutput(addHandlerStatement);
- AppendIndentation();
- sourceText.Append(addHandlerStatement.EventExpression.AcceptVisitor(this, data));
- sourceText.Append(" += ");
- sourceText.Append(addHandlerStatement.HandlerExpression.AcceptVisitor(this, data));
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
- public object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
- {
- DebugOutput(removeHandlerStatement);
- AppendIndentation();
- sourceText.Append(removeHandlerStatement.EventExpression.AcceptVisitor(this, data));
- sourceText.Append(" -= ");
- sourceText.Append(removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data));
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
- public object Visit(DoLoopStatement doLoopStatement, object data)
- {
- DebugOutput(doLoopStatement);
- exitConstructStack.Push(new DictionaryEntry(typeof(DoLoopStatement), null));
- if (doLoopStatement.ConditionPosition == ConditionPosition.Start) {
- AppendIndentation();
- sourceText.Append("while (");
- if (doLoopStatement.ConditionType == ConditionType.Until) {
- sourceText.Append("!(");
- }
- sourceText.Append(doLoopStatement.Condition.AcceptVisitor(this, data).ToString());
- if (doLoopStatement.ConditionType == ConditionType.Until) {
- sourceText.Append(")");
- }
- sourceText.Append(") {");
-
- AppendNewLine();
-
- ++indentLevel;
- doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- } else {
- AppendIndentation();
- sourceText.Append("do {");
- AppendNewLine();
-
- ++indentLevel;
- doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("} while (");
- if (doLoopStatement.Condition == null) {
- sourceText.Append("true");
- } else {
- if (doLoopStatement.ConditionType == ConditionType.Until) {
- sourceText.Append("!(");
- }
- sourceText.Append(doLoopStatement.Condition.AcceptVisitor(this, data).ToString());
- if (doLoopStatement.ConditionType == ConditionType.Until) {
- sourceText.Append(")");
- }
- }
- sourceText.Append(");");
- AppendNewLine();
- }
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(EndStatement endStatement, object data)
- {
- DebugOutput(endStatement);
- AppendIndentation();
- sourceText.Append("System.Environment.Exit(0);");
- AppendNewLine();
- return null;
- }
-
- Stack exitConstructStack = new Stack();
- int exitLabelCount = 0;
- public string AddExitOnConstructStack(Type exitType)
- {
- string labelName = String.Concat("exit" + exitType.Name, exitLabelCount++);
- if (exitConstructStack.Count > 0) {
- object[] exitArray = exitConstructStack.ToArray();
- for (int i = exitArray.Length - 1; i >= 0; --i) {
- if ((Type)((DictionaryEntry)exitArray[i]).Key == exitType) {
- exitArray[i] = new DictionaryEntry(((DictionaryEntry)exitArray[i]).Key, labelName);
- }
- }
- Array.Reverse(exitArray);
- exitConstructStack = new Stack(exitArray);
- }
- return String.Concat(labelName);
- }
-
- public void GenerateExitConstructLabel()
- {
- if (exitConstructStack.Count > 0) {
- DictionaryEntry entry = (DictionaryEntry)exitConstructStack.Pop();
- if (entry.Value != null) {
- AppendIndentation();
- sourceText.Append(entry.Value.ToString());
- sourceText.Append(": ;");
- AppendNewLine();
- }
- }
- }
-
- public object Visit(ExitStatement exitStatement, object data)
- {
- DebugOutput(exitStatement);
- Type exitType = null;
- switch (exitStatement.ExitType) {
- case ExitType.Sub:
- sourceText.Append("return;");
- AppendNewLine();
- return null;
- case ExitType.Function:
- sourceText.Append("return null;");
- AppendNewLine();
- return null;
- case ExitType.Property:
- exitType = typeof(PropertyDeclaration);
- break;
- case ExitType.Do:
- exitType = typeof(DoLoopStatement);
- break;
- case ExitType.For:
- exitType = typeof(ForStatement);
- break;
- case ExitType.While:
- exitType = typeof(WhileStatement);
- break;
- case ExitType.Select:
- exitType = typeof(SelectStatement);
- break;
- case ExitType.Try:
- exitType = typeof(TryCatchStatement);
- break;
- }
- if (exitType != null) {
- AppendIndentation();
- sourceText.Append("goto ");
- sourceText.Append(AddExitOnConstructStack(exitType));
- sourceText.Append(";");
- AppendNewLine();
- } else {
- AppendIndentation();
- sourceText.Append("ERROR IN GENERATION: EXIT TO ");
- sourceText.Append(exitStatement.ExitType);
- sourceText.Append(" FAILED!!!");
- AppendNewLine();
- }
- return null;
- }
-
- public object Visit(ForeachStatement foreachStatement, object data)
- {
- DebugOutput(foreachStatement);
- exitConstructStack.Push(new DictionaryEntry(typeof(ForStatement), null));
-
- AppendIndentation();
- sourceText.Append("foreach (");
- if (foreachStatement.LoopControlVariable.Type != null) {
- sourceText.Append(this.GetTypeString(foreachStatement.LoopControlVariable.Type));
- sourceText.Append(" ");
- }
- sourceText.Append(foreachStatement.LoopControlVariable.Name);
- sourceText.Append(" in ");
- sourceText.Append(foreachStatement.Expression.AcceptVisitor(this, data));
- sourceText.Append(") {");
- AppendNewLine();
-
- ++indentLevel;
- foreachStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(ForStatement forStatement, object data)
- {
- DebugOutput(forStatement);
- exitConstructStack.Push(new DictionaryEntry(typeof(ForStatement), null));
- bool stepIsNegative = false;
- string step = null;
- if (forStatement.Step != null) {
- step = forStatement.Step.AcceptVisitor(this, data).ToString();
- stepIsNegative = step.StartsWith("-");
- }
-
- AppendIndentation();
- sourceText.Append("for (");
-
-
- if (forStatement.LoopControlVariable.Type != null) {
- sourceText.Append(this.GetTypeString(forStatement.LoopControlVariable.Type));
- sourceText.Append(" ");
- }
- sourceText.Append(forStatement.LoopControlVariable.Name);
- sourceText.Append(" = ");
-
- sourceText.Append(forStatement.Start.AcceptVisitor(this, data));
- sourceText.Append("; ");
- sourceText.Append(forStatement.LoopControlVariable.Name);
- sourceText.Append(stepIsNegative ? " >= " : " <= ");
- sourceText.Append(forStatement.End.AcceptVisitor(this, data));
- sourceText.Append("; ");
- if (forStatement.Step == null) {
- sourceText.Append(forStatement.LoopControlVariable.Name);
- sourceText.Append("++");
- } else {
- sourceText.Append(forStatement.LoopControlVariable.Name);
- if (stepIsNegative) {
- if (step == "-1") {
- sourceText.Append("--");
- } else {
- sourceText.Append(" -= ");
- sourceText.Append(step.Substring(1));
- }
- } else {
- sourceText.Append(" += ");
- sourceText.Append(step);
- }
- }
- sourceText.Append(") {");
- AppendNewLine();
-
- ++indentLevel;
- forStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- GenerateExitConstructLabel();
-
- return null;
- }
-
- public object Visit(LockStatement lockStatement, object data)
- {
- DebugOutput(lockStatement);
- AppendIndentation();
- sourceText.Append("lock (");
- sourceText.Append(lockStatement.LockExpression.AcceptVisitor(this, data));
- sourceText.Append(") {");
- AppendNewLine();
-
- ++indentLevel;
- lockStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- return null;
- }
-
- public object Visit(RaiseEventStatement raiseEventStatement, object data)
- {
- DebugOutput(raiseEventStatement);
- AppendIndentation();
- sourceText.Append("if (");
- sourceText.Append(raiseEventStatement.EventName);
- sourceText.Append(" != null) {");
- AppendNewLine();
-
- ++indentLevel;
- AppendIndentation();
- sourceText.Append(raiseEventStatement.EventName);
- sourceText.Append(GetParameters(raiseEventStatement.Parameters));
- sourceText.Append(";");
- AppendNewLine();
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- return null;
- }
-
-
- public object Visit(ReturnStatement returnStatement, object data)
- {
- DebugOutput(returnStatement);
- AppendIndentation();
- sourceText.Append("return");
- if (returnStatement.ReturnExpression != null) {
- sourceText.Append(" ");
- sourceText.Append(returnStatement.ReturnExpression.AcceptVisitor(this,data));
- }
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
- public object Visit(ThrowStatement throwStatement, object data)
- {
- DebugOutput(throwStatement);
- AppendIndentation();
- sourceText.Append("throw");
- if (throwStatement.ThrowExpression != null) {
- sourceText.Append(" ");
- sourceText.Append(throwStatement.ThrowExpression.AcceptVisitor(this, data).ToString());
- }
- sourceText.Append(";");
- AppendNewLine();
- return null;
- }
-
- public object Visit(TryCatchStatement tryCatchStatement, object data)
- {
- DebugOutput(tryCatchStatement);
- exitConstructStack.Push(new DictionaryEntry(typeof(TryCatchStatement), null));
- AppendIndentation();
- sourceText.Append("try {");
- AppendNewLine();
-
- ++indentLevel;
- tryCatchStatement.StatementBlock.AcceptVisitor(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- if (tryCatchStatement.CatchClauses != null) {
- foreach (CatchClause catchClause in tryCatchStatement.CatchClauses) {
- sourceText.Append(" catch ");
- if (catchClause.Type != null) {
- sourceText.Append("(");
- sourceText.Append(GetTypeString(catchClause.Type));
- if (catchClause.VariableName != null) {
- sourceText.Append(" ");
- sourceText.Append(catchClause.VariableName);
- }
- sourceText.Append(") ");
- }
- sourceText.Append("{");
- AppendNewLine();
- ++indentLevel;
- if (catchClause.Condition != null) {
- AppendIndentation();
- sourceText.Append("//TODO: review the original conditional catch clause");
- AppendNewLine();
- AppendIndentation();
- sourceText.Append("if (");
- sourceText.Append(catchClause.Condition.AcceptVisitor(this, data));
- sourceText.Append(") {");
- AppendNewLine();
- ++indentLevel;
- catchClause.StatementBlock.AcceptVisitor(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- } else {
- catchClause.StatementBlock.AcceptVisitor(this, data);
- }
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- }
- }
-
- if (tryCatchStatement.FinallyBlock != null) {
- sourceText.Append(" finally {");
- AppendNewLine();
-
- ++indentLevel;
- tryCatchStatement.FinallyBlock.AcceptVisitor(this, data);
- --indentLevel;
- AppendIndentation();
- sourceText.Append("}");
- }
- AppendNewLine();
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(WhileStatement whileStatement, object data)
- {
- DebugOutput(whileStatement);
- exitConstructStack.Push(new DictionaryEntry(typeof(WhileStatement), null));
- AppendIndentation();
- sourceText.Append("while (");
- sourceText.Append(whileStatement.Condition.AcceptVisitor(this, data).ToString());
- sourceText.Append(") {");
- AppendNewLine();
-
- ++indentLevel;
- whileStatement.EmbeddedStatement.AcceptVisitor(this, data);
- --indentLevel;
-
- AppendIndentation();
- sourceText.Append("}");
- AppendNewLine();
- GenerateExitConstructLabel();
- return null;
- }
-
- public object Visit(WithStatement withStatement, object data)
- {
- DebugOutput(withStatement);
- withExpressionStack.Push(withStatement.WithExpression);
- withStatement.Body.AcceptVisitor(this, data);
- withExpressionStack.Pop();
- return null;
- }
-
- public object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data)
- {
- DebugOutput(attribute);
- AppendIndentation();
- sourceText.Append("// Should never happen (this is handled in AttributeSection) attribute was:");
- sourceText.Append(attribute);
- AppendNewLine();
- return null;
- }
-
- public object Visit(AttributeSection attributeSection, object data)
- {
- DebugOutput(attributeSection);
- AppendIndentation();
- sourceText.Append("[");
- if (attributeSection.AttributeTarget != null && attributeSection.AttributeTarget.Length > 0) {
- sourceText.Append(attributeSection.AttributeTarget);
- sourceText.Append(": ");
- }
- for (int j = 0; j < attributeSection.Attributes.Count; ++j) {
- ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attr = (ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute)attributeSection.Attributes[j];
-
- sourceText.Append(attr.Name);
- sourceText.Append("(");
- for (int i = 0; i < attr.PositionalArguments.Count; ++i) {
- Expression expr = (Expression)attr.PositionalArguments[i];
- sourceText.Append(expr.AcceptVisitor(this, data).ToString());
- if (i + 1 < attr.PositionalArguments.Count | attr.NamedArguments.Count > 0) {
- sourceText.Append(", ");
- }
- }
-
- for (int i = 0; i < attr.NamedArguments.Count; ++i) {
- NamedArgumentExpression named = (NamedArgumentExpression)attr.NamedArguments[i];
- sourceText.Append(named.AcceptVisitor(this, data).ToString());
- if (i + 1 < attr.NamedArguments.Count) {
- sourceText.Append(", ");
- }
- }
- sourceText.Append(")");
- if (j + 1 < attributeSection.Attributes.Count) {
- sourceText.Append(", ");
- }
- }
- sourceText.Append("]");
- AppendNewLine();
- return null;
- }
-
- public object Visit(OptionCompareDeclaration optionCompareDeclaration, object data)
- {
- DebugOutput(optionCompareDeclaration);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(optionCompareDeclaration);
- AppendNewLine();
- return null;
- }
-
- public object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data)
- {
- DebugOutput(optionExplicitDeclaration);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(optionExplicitDeclaration);
- AppendNewLine();
- return null;
- }
-
- public object Visit(OptionStrictDeclaration optionStrictDeclaration, object data)
- {
- DebugOutput(optionStrictDeclaration);
- AppendIndentation();
- sourceText.Append("// TODO: NotImplemented statement: ");
- sourceText.Append(optionStrictDeclaration);
- AppendNewLine();
- return null;
- }
-#endregion
-
-#region Expressions
- public object Visit(PrimitiveExpression primitiveExpression, object data)
- {
- DebugOutput(primitiveExpression);
- if (primitiveExpression.Value == null) {
- return "null";
- }
- if (primitiveExpression.Value is bool) {
- if ((bool)primitiveExpression.Value) {
- return "true";
- }
- return "false";
- }
-
- if (primitiveExpression.Value is string) {
- string s = primitiveExpression.Value.ToString();
- s = s.Replace("\\","\\\\");
- s = s.Replace("\"","\\\"");
- return String.Concat('"', s, '"');
- }
-
- if (primitiveExpression.Value is char) {
- string s = primitiveExpression.Value.ToString();
- s = s.Replace("\\","\\\\");
- s = s.Replace("\'","\\\'");
- return String.Concat("'", s, "'");
- }
-
- if (primitiveExpression.Value is System.DateTime) {
- string s = primitiveExpression.StringValue;
- s = s.Replace("\\","\\\\");
- s = s.Replace("\"","\\\"");
- return String.Concat("System.DateTime.Parse(\"", s, "\")");
- }
-
- return primitiveExpression.Value;
- }
-
- public object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
- {
- DebugOutput(binaryOperatorExpression);
- string op = null;
- string left = binaryOperatorExpression.Left.AcceptVisitor(this, data).ToString();
- string right = binaryOperatorExpression.Right.AcceptVisitor(this, data).ToString();
-
- switch (binaryOperatorExpression.Op) {
- case BinaryOperatorType.Concat:
- op = " + ";
- break;
-
- case BinaryOperatorType.Add:
- op = " + ";
- break;
-
- case BinaryOperatorType.Subtract:
- op = " - ";
- break;
-
- case BinaryOperatorType.Multiply:
- op = " * ";
- break;
-
- case BinaryOperatorType.DivideInteger:
- case BinaryOperatorType.Divide:
- op = " / ";
- break;
-
- case BinaryOperatorType.Modulus:
- op = " % ";
- break;
-
- case BinaryOperatorType.ShiftLeft:
- op = " << ";
- break;
-
- case BinaryOperatorType.ShiftRight:
- op = " >> ";
- break;
-
- case BinaryOperatorType.BitwiseAnd:
- op = " & ";
- break;
- case BinaryOperatorType.BitwiseOr:
- op = " | ";
- break;
- case BinaryOperatorType.ExclusiveOr:
- op = " ^ ";
- break;
-
- case BinaryOperatorType.BooleanAnd:
- op = " && ";
- break;
- case BinaryOperatorType.BooleanOr:
- op = " || ";
- break;
-
- case BinaryOperatorType.Equality:
- op = " == ";
- break;
- case BinaryOperatorType.GreaterThan:
- op = " > ";
- break;
- case BinaryOperatorType.GreaterThanOrEqual:
- op = " >= ";
- break;
- case BinaryOperatorType.InEquality:
- op = " != ";
- break;
- case BinaryOperatorType.LessThan:
- op = " < ";
- break;
- case BinaryOperatorType.IS:
- op = " == ";
- break;
- case BinaryOperatorType.LessThanOrEqual:
- op = " <= ";
- break;
- case BinaryOperatorType.Power:
- return "Math.Pow(" + left + ", " + right + ")";
- default:
- throw new Exception("Unknown binary operator:" + binaryOperatorExpression.Op);
- }
-
- return String.Concat(left,
- op,
- right);
- }
-
- public object Visit(ParenthesizedExpression parenthesizedExpression, object data)
- {
- DebugOutput(parenthesizedExpression);
- string innerExpr = parenthesizedExpression.Expression.AcceptVisitor(this, data).ToString();
- return String.Concat("(", innerExpr, ")");
- }
-
- public object Visit(InvocationExpression invocationExpression, object data)
- {
- DebugOutput(invocationExpression);
- return String.Concat(invocationExpression.TargetObject.AcceptVisitor(this, data),
- GetParameters(invocationExpression.Parameters)
- );
- }
-
- public object Visit(IdentifierExpression identifierExpression, object data)
- {
- DebugOutput(identifierExpression);
- return identifierExpression.Identifier;
- }
-
- public object Visit(TypeReferenceExpression typeReferenceExpression, object data)
- {
- DebugOutput(typeReferenceExpression);
- return GetTypeString(typeReferenceExpression.TypeReference);
- }
-
- public object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
- {
- DebugOutput(unaryOperatorExpression);
- switch (unaryOperatorExpression.Op) {
- case UnaryOperatorType.BitNot:
- return String.Concat("~", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
- case UnaryOperatorType.Decrement:
- return String.Concat("--", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
- case UnaryOperatorType.Increment:
- return String.Concat("++", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
- case UnaryOperatorType.Minus:
- return String.Concat("-", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
- case UnaryOperatorType.Not:
- return String.Concat("!(", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
- case UnaryOperatorType.Plus:
- return String.Concat("+", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
- case UnaryOperatorType.PostDecrement:
- return String.Concat(unaryOperatorExpression.Expression.AcceptVisitor(this, data), "--");
- case UnaryOperatorType.PostIncrement:
- return String.Concat(unaryOperatorExpression.Expression.AcceptVisitor(this, data), "++");
- }
- throw new System.NotSupportedException();
- }
-
- public object Visit(AssignmentExpression assignmentExpression, object data)
- {
- DebugOutput(assignmentExpression);
- string op = null;
- string left = assignmentExpression.Left.AcceptVisitor(this, data).ToString();
- string right = assignmentExpression.Right.AcceptVisitor(this, data).ToString();
-
- switch (assignmentExpression.Op) {
- case AssignmentOperatorType.Assign:
- op = " = ";
- break;
- case AssignmentOperatorType.ConcatString:
- case AssignmentOperatorType.Add:
- op = " += ";
- break;
- case AssignmentOperatorType.Subtract:
- op = " -= ";
- break;
- case AssignmentOperatorType.Multiply:
- op = " *= ";
- break;
- case AssignmentOperatorType.Divide:
- op = " /= ";
- break;
- case AssignmentOperatorType.ShiftLeft:
- op = " <<= ";
- break;
- case AssignmentOperatorType.ShiftRight:
- op = " >>= ";
- break;
-
- case AssignmentOperatorType.ExclusiveOr:
- op = " ^= ";
- break;
- case AssignmentOperatorType.Modulus:
- op = " %= ";
- break;
- case AssignmentOperatorType.BitwiseAnd:
- op = " &= ";
- break;
- case AssignmentOperatorType.BitwiseOr:
- op = " |= ";
- break;
- }
- return String.Concat(left,
- op,
- right);
- }
-
- public object Visit(CastExpression castExpression, object data)
- {
- DebugOutput(castExpression);
- string type = ConvertTypeString(castExpression.CastTo.Type);
- string castExpr = castExpression.Expression.AcceptVisitor(this, data).ToString();
-
- if (castExpression.IsSpecializedCast) {
- switch (type) {
- case "System.Object":
- break;
- default:
- string convToType = type.Substring("System.".Length);
- return String.Format("System.Convert.To{0}({1})", convToType, castExpr);
- }
- }
- return String.Format("(({0})({1}))", type, castExpr);
- }
-
- public object Visit(ThisReferenceExpression thisReferenceExpression, object data)
- {
- DebugOutput(thisReferenceExpression);
- return "this";
- }
-
- public object Visit(BaseReferenceExpression baseReferenceExpression, object data)
- {
- DebugOutput(baseReferenceExpression);
- return "base";
- }
-
- public object Visit(ObjectCreateExpression objectCreateExpression, object data)
- {
- return String.Format("new {0}{1}",
- GetTypeString(objectCreateExpression.CreateType),
- GetParameters(objectCreateExpression.Parameters)
- );
- }
-
- public object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
- {
- DebugOutput(parameterDeclarationExpression);
- // Is handled in the AppendParameters method
- return "// should never happen" + parameterDeclarationExpression;
- }
-
- public object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data)
- {
- DebugOutput(fieldReferenceOrInvocationExpression);
- INode target = fieldReferenceOrInvocationExpression.TargetObject;
- if (target == null && withExpressionStack.Count > 0) {
- target = withExpressionStack.Peek() as INode;
- }
- return String.Concat(target.AcceptVisitor(this, data),
- '.',
- fieldReferenceOrInvocationExpression.FieldName);
- }
-
- public object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
- {
- DebugOutput(arrayInitializerExpression);
- if (arrayInitializerExpression.CreateExpressions.Count > 0) {
- return String.Concat("{",
- GetExpressionList(arrayInitializerExpression.CreateExpressions),
- "}");
- }
- return String.Empty;
- }
-
- public object Visit(GetTypeExpression getTypeExpression, object data)
- {
- DebugOutput(getTypeExpression);
- return String.Concat("typeof(",
- this.GetTypeString(getTypeExpression.Type),
- ")");
- }
-
- public object Visit(ClassReferenceExpression classReferenceExpression, object data)
- {
- // ALMOST THE SAME AS '.this' but ignores all overridings from virtual
- // members. How can this done in C# ?
- DebugOutput(classReferenceExpression);
- return "TODO : " + classReferenceExpression;
- }
-
- public object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
- {
- // I think the LoopControlVariableExpression is only used in the for statement
- // and there it is handled
- DebugOutput(loopControlVariableExpression);
- return "Should Never happen : " + loopControlVariableExpression;
- }
-
- public object Visit(NamedArgumentExpression namedArgumentExpression, object data)
- {
- return String.Concat(namedArgumentExpression.Parametername,
- "=",
- namedArgumentExpression.Expression.AcceptVisitor(this, data));
- }
-
- public object Visit(AddressOfExpression addressOfExpression, object data)
- {
- DebugOutput(addressOfExpression);
- string procedureName = addressOfExpression.Procedure.AcceptVisitor(this, data).ToString();
- string eventHandlerType = "EventHandler";
- bool foundEventHandler = false;
- // try to resolve the type of the eventhandler using a little trick :)
- foreach (INode node in currentType.Children) {
- MethodDeclaration md = node as MethodDeclaration;
- if (md != null && md.Parameters != null && md.Parameters.Count > 0) {
- if (procedureName == md.Name || procedureName.EndsWith("." + md.Name)) {
- ParameterDeclarationExpression pde = (ParameterDeclarationExpression)md.Parameters[md.Parameters.Count - 1];
- string typeName = GetTypeString(pde.TypeReference);
- if (typeName.EndsWith("Args")) {
- eventHandlerType = typeName.Substring(0, typeName.Length - "Args".Length) + "Handler";
- foundEventHandler = true;
- }
- }
- }
- }
- return String.Concat(foundEventHandler ? "new " : "/* might be wrong, please check */ new ",
- eventHandlerType,
- "(",
- procedureName,
- ")");
- }
-
- public object Visit(TypeOfExpression typeOfExpression, object data)
- {
- DebugOutput(typeOfExpression);
- return String.Concat(typeOfExpression.Expression.AcceptVisitor(this, data),
- " is ",
- GetTypeString(typeOfExpression.Type));
- }
-
- public object Visit(ArrayCreateExpression ace, object data)
- {
- DebugOutput(ace);
-
- return String.Concat("new ",
- GetTypeString(ace.CreateType),
- "[",
- GetExpressionList(ace.Parameters),
- "]",
- ace.ArrayInitializer.AcceptVisitor(this, data));
- }
-#endregion
-#endregion
-
- public void AppendAttributes(ArrayList attr)
- {
- if (attr != null) {
- foreach (AttributeSection section in attr) {
- section.AcceptVisitor(this, null);
- }
- }
- }
-
- public void AppendParameters(ArrayList parameters)
- {
- if (parameters == null) {
- return;
- }
- for (int i = 0; i < parameters.Count; ++i) {
- ParameterDeclarationExpression pde = (ParameterDeclarationExpression)parameters[i];
- AppendAttributes(pde.Attributes);
-
- if ((pde.ParamModifiers.Modifier & ParamModifier.ByRef) == ParamModifier.ByRef) {
- sourceText.Append("ref ");
- } else if ((pde.ParamModifiers.Modifier & ParamModifier.ParamArray) == ParamModifier.ParamArray) {
- sourceText.Append("params ");
- }
-
- sourceText.Append(GetTypeString(pde.TypeReference));
- sourceText.Append(" ");
- sourceText.Append(pde.ParameterName);
- if (i + 1 < parameters.Count) {
- sourceText.Append(", ");
- }
- }
- }
-
- string ConvertTypeString(string typeString)
- {
- switch (typeString.ToLower()) {
- case "boolean":
- return "bool";
- case "string":
- return "string";
- case "char":
- return "char";
- case "double":
- return "double";
- case "single":
- return "float";
- case "decimal":
- return "decimal";
- case "date":
- return "System.DateTime";
- case "long":
- return "long";
- case "integer":
- return "int";
- case "short":
- return "short";
- case "byte":
- return "byte";
- case "void":
- return "void";
- case "system.object":
- case "object":
- return "object";
- case "system.uint64":
- return "ulong";
- case "system.uint32":
- return "uint";
- case "system.uint16":
- return "ushort";
- }
- return typeString;
- }
-
- string GetTypeString(TypeReference typeRef)
- {
- if (typeRef == null) {
- return "void";
- }
-
- string typeStr = ConvertTypeString(typeRef.Type);
-
- StringBuilder arrays = new StringBuilder();
-
- if (typeRef.RankSpecifier != null) {
- for (int i = 0; i < typeRef.RankSpecifier.Count; ++i) {
- arrays.Append("[");
- arrays.Append(new String(',', (int)typeRef.RankSpecifier[i]));
- arrays.Append("]");
- }
- } else {
- if (typeRef.Dimension != null) {
- arrays.Append("[");
- if (typeRef.Dimension.Count > 0) {
- arrays.Append(new String(',', typeRef.Dimension.Count - 1));
- }
- arrays.Append("]");
- }
- }
-
- return typeStr + arrays.ToString();
- }
-
- string GetModifier(Modifier modifier)
- {
- StringBuilder builder = new StringBuilder();
-
- if ((modifier & Modifier.Public) == Modifier.Public) {
- builder.Append("public ");
- } else if ((modifier & Modifier.Private) == Modifier.Private) {
- builder.Append("private ");
- } else if ((modifier & (Modifier.Protected | Modifier.Friend)) == (Modifier.Protected | Modifier.Friend)) {
- builder.Append("protected internal ");
- } else if ((modifier & Modifier.Friend) == Modifier.Friend) {
- builder.Append("internal ");
- } else if ((modifier & Modifier.Protected) == Modifier.Protected) {
- builder.Append("protected ");
- }
-
- if ((modifier & Modifier.MustInherit) == Modifier.MustInherit) {
- builder.Append("abstract ");
- }
- if ((modifier & Modifier.Shared) == Modifier.Shared) {
- builder.Append("static ");
- }
- if ((modifier & Modifier.Overridable) == Modifier.Overridable) {
- builder.Append("virtual ");
- }
- if ((modifier & Modifier.MustOverride) == Modifier.MustOverride) {
- builder.Append("abstract ");
- }
- if ((modifier & Modifier.Overrides) == Modifier.Overrides) {
- builder.Append("override ");
- }
- if ((modifier & Modifier.Shadows) == Modifier.Shadows) {
- builder.Append("new ");
- }
-
- if ((modifier & Modifier.NotInheritable) == Modifier.NotInheritable) {
- builder.Append("sealed ");
- }
-
- if ((modifier & Modifier.Constant) == Modifier.Constant) {
- builder.Append("const ");
- }
- if ((modifier & Modifier.ReadOnly) == Modifier.ReadOnly) {
- builder.Append("readonly ");
- }
- return builder.ToString();
- }
-
- string GetParameters(ArrayList list)
- {
- return String.Concat("(",
- GetExpressionList(list),
- ")");
- }
-
- string GetExpressionList(ArrayList list)
- {
- StringBuilder sb = new StringBuilder();
- if (list != null) {
- for (int i = 0; i < list.Count; ++i) {
- Expression exp = (Expression)list[i];
- if (exp != null) {
- sb.Append(exp.AcceptVisitor(this, null));
- if (i + 1 < list.Count) {
- sb.Append(", ");
- }
- }
- }
- }
- return sb.ToString();
- }
-
- }
-}
+// CSharpVisitor.cs
+// Copyright (C) 2004 Markus Palme (markuspalme at gmx.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Reflection;
+using System.CodeDom;
+using System.Text;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.PrettyPrinter.VB
+{
+ public class CSharpVisitor : IASTVisitor
+ {
+ readonly string newLineSep = Environment.NewLine;
+ StringBuilder sourceText = new StringBuilder();
+ int indentLevel = 0;
+ Errors errors = new Errors();
+ TypeDeclaration currentType = null;
+ Stack withExpressionStack = new Stack();
+
+ public StringBuilder SourceText {
+ get {
+ return sourceText;
+ }
+ }
+
+ public void AppendIndentation()
+ {
+ for (int i = 0; i < indentLevel; ++i) {
+ sourceText.Append("\t");
+ }
+ }
+
+ public void AppendNewLine()
+ {
+ sourceText.Append(newLineSep);
+ }
+
+ public void AppendStatementEnd()
+ {
+ sourceText.Append(";");
+ AppendNewLine();
+ }
+
+ void DebugOutput(object o)
+ {
+// Console.WriteLine(o.ToString());
+ }
+
+ #region ICSharpCode.SharpRefactory.Parser.VB.IASTVisitor interface implementation
+ public object Visit(INode node, object data)
+ {
+ AppendIndentation();
+ sourceText.Append("// warning visited unknown node :");
+ sourceText.Append(node);
+ AppendNewLine();
+ return String.Empty;
+ }
+
+ public object Visit(CompilationUnit compilationUnit, object data)
+ {
+ DebugOutput(compilationUnit);
+ compilationUnit.AcceptChildren(this, data);
+ return null;
+ }
+
+#region GlobalScope
+ public object Visit(NamespaceDeclaration namespaceDeclaration, object data)
+ {
+ DebugOutput(namespaceDeclaration);
+ AppendIndentation();
+ sourceText.Append("namespace ");
+ sourceText.Append(namespaceDeclaration.NameSpace);
+ AppendNewLine();
+ sourceText.Append("{");
+ AppendNewLine();
+ ++indentLevel;
+ namespaceDeclaration.AcceptChildren(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ImportsStatement importsStatement, object data)
+ {
+ foreach (INode node in importsStatement.ImportClauses) {
+ node.AcceptVisitor(this, data);
+ }
+ return null;
+ }
+
+
+ public object Visit(ImportsDeclaration importsDeclaration, object data)
+ {
+ DebugOutput(importsDeclaration);
+ AppendIndentation();
+ sourceText.Append("using ");
+ sourceText.Append(importsDeclaration.Namespace);
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
+ {
+ DebugOutput(importsAliasDeclaration);
+ AppendIndentation();
+ sourceText.Append("using ");
+ sourceText.Append(importsAliasDeclaration.Alias);
+ sourceText.Append(" = ");
+ sourceText.Append(importsAliasDeclaration.Namespace);
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+
+ public object Visit(TypeDeclaration typeDeclaration, object data)
+ {
+ DebugOutput(typeDeclaration);
+ AppendAttributes(typeDeclaration.Attributes);
+ string modifier = GetModifier(typeDeclaration.Modifier);
+ string type = String.Empty;
+
+ switch (typeDeclaration.Type) {
+ case Types.Class:
+ type = "class ";
+ break;
+ case Types.Enum:
+ type = "enum ";
+ break;
+ case Types.Interface:
+ type = "interface ";
+ break;
+ case Types.Module:
+ case Types.Structure:
+ type = "struct ";
+ break;
+ }
+ AppendIndentation();
+ sourceText.Append(modifier);
+ sourceText.Append(type);
+ sourceText.Append(typeDeclaration.Name);
+
+ bool hasBaseType = typeDeclaration.BaseType != null;
+ if (hasBaseType) {
+ sourceText.Append(" : ");
+ sourceText.Append(ConvertTypeString(typeDeclaration.BaseType));
+ }
+
+ if (typeDeclaration.BaseInterfaces != null && typeDeclaration.BaseInterfaces.Count > 0) {
+ if (!hasBaseType) {
+ sourceText.Append(" : ");
+ } else {
+ sourceText.Append(", ");
+ }
+ for (int i = 0; i < typeDeclaration.BaseInterfaces.Count; ++i) {
+ if (typeDeclaration.BaseInterfaces[i] is TypeReference) {
+ sourceText.Append((typeDeclaration.BaseInterfaces[i] as TypeReference).Type);
+ } else {
+ sourceText.Append(typeDeclaration.BaseInterfaces[i].ToString());
+ }
+ if (i + 1 < typeDeclaration.BaseInterfaces.Count) {
+ sourceText.Append(", ");
+ }
+ }
+ }
+ AppendNewLine();
+ AppendIndentation();
+ sourceText.Append("{");
+ AppendNewLine();
+ ++indentLevel;
+ TypeDeclaration oldType = currentType;
+ currentType = typeDeclaration;
+ typeDeclaration.AcceptChildren(this, data);
+ currentType = oldType;
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(DelegateDeclaration delegateDeclaration, object data)
+ {
+ DebugOutput(delegateDeclaration);
+ AppendAttributes(delegateDeclaration.Attributes);
+ AppendIndentation();
+ sourceText.Append(GetModifier(delegateDeclaration.Modifier));
+ sourceText.Append("delegate ");
+ sourceText.Append(GetTypeString(delegateDeclaration.ReturnType));
+ sourceText.Append(" ");
+ sourceText.Append(delegateDeclaration.Name);
+ sourceText.Append("(");
+ AppendParameters(delegateDeclaration.Parameters);
+ sourceText.Append(");");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(EventDeclaration eventDeclaration, object data)
+ {
+ DebugOutput(eventDeclaration);
+ AppendAttributes(eventDeclaration.Attributes);
+ AppendIndentation();
+ sourceText.Append(GetModifier(eventDeclaration.Modifier));
+ sourceText.Append("event ");
+
+ if (eventDeclaration.TypeReference == null) {
+ sourceText.Append(eventDeclaration.Name);
+ sourceText.Append("EventHandler");
+ } else {
+ sourceText.Append(GetTypeString(eventDeclaration.TypeReference));
+ }
+ sourceText.Append(" ");
+ sourceText.Append(eventDeclaration.Name);
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+#endregion
+
+#region TypeLevel
+ public object Visit(VariableDeclaration variableDeclaration, object data)
+ {
+ // called inside ENUMS
+// AppendAttributes(field.Attributes);
+ AppendIndentation();
+ sourceText.Append(variableDeclaration.Name);
+ if (variableDeclaration.Initializer != null) {
+ sourceText.Append(" = ");
+ sourceText.Append(variableDeclaration.Initializer.AcceptVisitor(this, data));
+ }
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(FieldDeclaration fieldDeclaration, object data)
+ {
+ DebugOutput(fieldDeclaration);
+
+ foreach (VariableDeclaration field in fieldDeclaration.Fields) {
+ AppendAttributes(fieldDeclaration.Attributes);
+ AppendIndentation();
+ if (currentType.Type == Types.Enum) {
+ if (fieldDeclaration.Fields.IndexOf(field) > 0) {
+ sourceText.Append(", ");
+ }
+ sourceText.Append(field.Name);
+ if (field.Initializer != null) {
+ sourceText.Append(" = ");
+ sourceText.Append(field.Initializer.AcceptVisitor(this, data).ToString());
+ }
+ } else {
+ if (fieldDeclaration.Modifier == Modifier.None) {
+ sourceText.Append(" private ");
+ } else {
+ sourceText.Append(GetModifier(fieldDeclaration.Modifier));
+ }
+ if (field.Type == null)
+ sourceText.Append("object");
+ else
+ sourceText.Append(GetTypeString(field.Type));
+ sourceText.Append(" ");
+ sourceText.Append(field.Name);
+ if (field.Initializer != null) {
+ sourceText.Append(" = ");
+ sourceText.Append(field.Initializer.AcceptVisitor(this, data).ToString());
+ } else {
+ if (field.Type != null && field.Type.Dimension != null) {
+ sourceText.Append(" = new ");
+ sourceText.Append(ConvertTypeString(field.Type.Type));
+ sourceText.Append("[");
+ sourceText.Append(GetExpressionList(field.Type.Dimension));
+ sourceText.Append("]");
+ }
+ }
+ sourceText.Append(";");
+ AppendNewLine();
+ }
+ }
+
+ // if that's not the last enum member, add a comma
+ if (currentType.Type == Types.Enum) {
+ int pos = currentType.Children.IndexOf(fieldDeclaration);
+ if (pos >= 0) {
+ for (int i = pos+1; i < currentType.Children.Count; i++) {
+ if (currentType.Children[i] is FieldDeclaration) {
+ sourceText.Append(",");
+ break;
+ }
+ }
+ }
+ AppendNewLine();
+ }
+ return null;
+ }
+
+ public object Visit(MethodDeclaration methodDeclaration, object data)
+ {
+ DebugOutput(methodDeclaration);
+ exitConstructStack.Push(new DictionaryEntry(typeof(MethodDeclaration), null));
+
+ AppendNewLine();
+ AppendAttributes(methodDeclaration.Attributes);
+ AppendIndentation();
+ sourceText.Append(GetModifier(methodDeclaration.Modifier));
+ sourceText.Append(GetTypeString(methodDeclaration.TypeReference));
+ sourceText.Append(" ");
+ sourceText.Append(methodDeclaration.Name);
+ sourceText.Append("(");
+ AppendParameters(methodDeclaration.Parameters);
+ sourceText.Append(")");
+
+ if (currentType.Type != Types.Interface &&
+ (methodDeclaration.Modifier & Modifier.MustOverride) != Modifier.MustOverride)
+ {
+ AppendNewLine();
+ AppendIndentation();
+ sourceText.Append("{");
+ AppendNewLine();
+ if (methodDeclaration.Body != null) {
+ ++indentLevel;
+ methodDeclaration.Body.AcceptVisitor(this, data);
+ GenerateExitConstructLabel();
+ --indentLevel;
+ }
+ AppendIndentation();
+ sourceText.Append("}");
+ } else {
+ sourceText.Append(";");
+ }
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ConstructorDeclaration constructorDeclaration, object data)
+ {
+ DebugOutput(constructorDeclaration);
+ exitConstructStack.Push(new DictionaryEntry(typeof(MethodDeclaration), null));
+ AppendNewLine();
+ AppendAttributes(constructorDeclaration.Attributes);
+ AppendIndentation();
+ sourceText.Append(GetModifier(constructorDeclaration.Modifier));
+ sourceText.Append(this.currentType.Name);
+ sourceText.Append("(");
+ AppendParameters(constructorDeclaration.Parameters);
+ sourceText.Append(")");
+
+ AppendNewLine();
+ AppendIndentation();
+ sourceText.Append("{");
+ AppendNewLine();
+ if (constructorDeclaration.Body != null) {
+ ++indentLevel;
+ constructorDeclaration.Body.AcceptVisitor(this, data);
+ GenerateExitConstructLabel();
+ --indentLevel;
+ }
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(DeclareDeclaration declareDeclaration, object data)
+ {
+ DebugOutput(declareDeclaration);
+ AppendAttributes(declareDeclaration.Attributes);
+ AppendIndentation();
+ sourceText.Append(String.Format("[System.Runtime.InteropServices.DllImport({0}", declareDeclaration.Library));
+ if (declareDeclaration.Alias != null) {
+ sourceText.Append(String.Format(", EntryPoint={0}", declareDeclaration.Alias));
+ }
+
+ switch (declareDeclaration.Charset) {
+ case CharsetModifier.ANSI:
+ sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Ansi");
+ break;
+ case CharsetModifier.Unicode:
+ sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Unicode");
+ break;
+ case CharsetModifier.Auto:
+ sourceText.Append(", CharSet=System.Runtime.InteropServices.CharSet.Auto");
+ break;
+ }
+
+ sourceText.Append(")]");
+ AppendNewLine();
+ AppendIndentation();
+ sourceText.Append(GetModifier(declareDeclaration.Modifier));
+ sourceText.Append("static extern ");
+ sourceText.Append(GetTypeString(declareDeclaration.ReturnType));
+ sourceText.Append(" ");
+ sourceText.Append(declareDeclaration.Name);
+ sourceText.Append("(");
+ AppendParameters(declareDeclaration.Parameters);
+ sourceText.Append(");");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(PropertyDeclaration propertyDeclaration, object data)
+ {
+ DebugOutput(propertyDeclaration);
+ AppendNewLine();
+ AppendAttributes(propertyDeclaration.Attributes);
+ AppendIndentation();
+ sourceText.Append(GetModifier(propertyDeclaration.Modifier & ~Modifier.ReadOnly));
+
+ sourceText.Append(GetTypeString(propertyDeclaration.TypeReference));
+ sourceText.Append(" ");
+ sourceText.Append(propertyDeclaration.Name);
+ sourceText.Append(" {");
+ AppendNewLine();
+
+ if (currentType.Type != Types.Interface) {
+ if (propertyDeclaration.GetRegion != null) {
+ ++indentLevel;
+ propertyDeclaration.GetRegion.AcceptVisitor(this, data);
+ --indentLevel;
+ }
+
+ if (propertyDeclaration.SetRegion != null) {
+ ++indentLevel;
+ propertyDeclaration.SetRegion.AcceptVisitor(this, data);
+ --indentLevel;
+ }
+
+ }
+ // if abstract, add default get/set
+ if ((propertyDeclaration.Modifier & Modifier.MustOverride) == Modifier.MustOverride &&
+ propertyDeclaration.GetRegion == null &&
+ propertyDeclaration.SetRegion == null) {
+ AppendIndentation();
+ sourceText.Append("get;");
+ AppendNewLine();
+ AppendIndentation();
+ sourceText.Append("set;");
+ AppendNewLine();
+ }
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(PropertyGetRegion propertyGetRegion, object data)
+ {
+ DebugOutput(propertyGetRegion);
+ exitConstructStack.Push(new DictionaryEntry(typeof(PropertyDeclaration), null));
+ AppendAttributes(propertyGetRegion.Attributes);
+ AppendIndentation();
+ sourceText.Append("get {");
+ AppendNewLine();
+ if (propertyGetRegion.Block != null) {
+ ++indentLevel;
+ propertyGetRegion.Block.AcceptVisitor(this, data);
+ --indentLevel;
+ }
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(PropertySetRegion propertySetRegion, object data)
+ {
+ DebugOutput(propertySetRegion);
+ exitConstructStack.Push(new DictionaryEntry(typeof(PropertyDeclaration), null));
+ AppendAttributes(propertySetRegion.Attributes);
+ AppendIndentation();
+ sourceText.Append("set {");
+ AppendNewLine();
+ if (propertySetRegion.Block != null) {
+ ++indentLevel;
+ propertySetRegion.Block.AcceptVisitor(this, data);
+ --indentLevel;
+ }
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(TypeReference typeReference, object data)
+ {
+ return ConvertTypeString(typeReference.Type);
+ }
+#endregion
+
+#region Statements
+ public object Visit(Statement statement, object data)
+ {
+ AppendIndentation();
+ sourceText.Append("// warning visited unknown statment :");
+ sourceText.Append(statement);
+ AppendNewLine();
+ return String.Empty;
+ }
+
+ public object Visit(BlockStatement blockStatement, object data)
+ {
+ DebugOutput(blockStatement);
+ blockStatement.AcceptChildren(this, data);
+ return null;
+ }
+
+ public object Visit(StatementExpression statementExpression, object data)
+ {
+ DebugOutput(statementExpression);
+ AppendIndentation();
+ if (statementExpression.Expression == null) {
+ sourceText.Append("// warning got empty statement expression :");
+ sourceText.Append(statementExpression);
+ } else {
+ sourceText.Append(statementExpression.Expression.AcceptVisitor(this, data).ToString());
+ sourceText.Append(";");
+ }
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+ {
+ DebugOutput(localVariableDeclaration);
+ for (int i = 0; i < localVariableDeclaration.Variables.Count; ++i) {
+ VariableDeclaration localVar = (VariableDeclaration)localVariableDeclaration.Variables[i];
+ AppendIndentation();
+ sourceText.Append(GetModifier(localVariableDeclaration.Modifier));
+ ArrayCreateExpression ace = localVar.Initializer as ArrayCreateExpression;
+ if (ace != null && (ace.ArrayInitializer == null || ace.ArrayInitializer.CreateExpressions == null)) {
+ sourceText.Append(ConvertTypeString(ace.CreateType.Type));
+ sourceText.Append(" ");
+ sourceText.Append(localVar.Name);
+ sourceText.Append("[");
+ sourceText.Append(GetExpressionList(ace.Parameters));
+ sourceText.Append("]");
+
+ } else {
+ if (localVar.Type == null) {
+ bool foundType = false;
+ for (int j = i + 1; j < localVariableDeclaration.Variables.Count; ++j) {
+ VariableDeclaration nextLocalVar = (VariableDeclaration)localVariableDeclaration.Variables[j];
+ if (nextLocalVar.Type != null) {
+ sourceText.Append(GetTypeString(nextLocalVar.Type));
+ foundType = true;
+ break;
+ }
+ }
+ if (!foundType) {
+ sourceText.Append("object");
+ }
+ } else {
+ sourceText.Append(GetTypeString(localVar.Type));
+ }
+ sourceText.Append(" ");
+ sourceText.Append(localVar.Name);
+ if (localVar.Initializer != null) {
+ sourceText.Append(" = ");
+ sourceText.Append(localVar.Initializer.AcceptVisitor(this, data).ToString());
+ } else {
+ if (localVar.Type != null && localVar.Type.Dimension != null) {
+ sourceText.Append(" = new ");
+ sourceText.Append(ConvertTypeString(localVar.Type.Type));
+ sourceText.Append("[");
+ sourceText.Append(GetExpressionList(localVar.Type.Dimension));
+ sourceText.Append("]");
+ }
+ }
+ }
+ sourceText.Append(";");
+ AppendNewLine();
+ }
+ return null;
+ }
+
+ public object Visit(SimpleIfStatement ifStatement, object data)
+ {
+ AppendIndentation();
+ sourceText.Append("if (");
+ sourceText.Append(ifStatement.Condition.AcceptVisitor(this, data).ToString());
+ sourceText.Append(") {");
+ AppendNewLine();
+ ++indentLevel;
+ foreach(Statement statement in ifStatement.Statements) {
+ statement.AcceptVisitor(this, data);
+ }
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+
+ if(ifStatement.ElseStatements != null && ifStatement.ElseStatements.Count > 0) {
+ sourceText.Append(" else {");
+ AppendNewLine();
+ ++indentLevel;
+ foreach(Statement statement in ifStatement.ElseStatements) {
+ statement.AcceptVisitor(this, data);
+ }
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ }
+
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(IfStatement ifStatement, object data)
+ {
+ DebugOutput(ifStatement);
+ AppendIndentation();
+ sourceText.Append("if (");
+ sourceText.Append(ifStatement.Condition.AcceptVisitor(this, data).ToString());
+ sourceText.Append(") {");
+ AppendNewLine();
+ ++indentLevel;
+ ifStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("}");
+
+ if (ifStatement.ElseIfStatements != null) {
+ foreach (ElseIfSection elseIfSection in ifStatement.ElseIfStatements) {
+ sourceText.Append(" else if (");
+ sourceText.Append(elseIfSection.Condition.AcceptVisitor(this, data).ToString());
+ sourceText.Append(") {");
+ AppendNewLine();
+ ++indentLevel;
+ elseIfSection.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ }
+ }
+
+ if (ifStatement.EmbeddedElseStatement != null) {
+ sourceText.Append(" else {");
+ AppendNewLine();
+ ++indentLevel;
+ ifStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ }
+
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(LabelStatement labelStatement, object data)
+ {
+ DebugOutput(labelStatement);
+ AppendIndentation();
+ sourceText.Append(labelStatement.Label);
+ sourceText.Append(":");
+ AppendNewLine();
+ if (labelStatement.EmbeddedStatement != null) {
+ labelStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+ return null;
+ }
+
+ public object Visit(GoToStatement goToStatement, object data)
+ {
+ DebugOutput(goToStatement);
+ AppendIndentation();
+ sourceText.Append("goto");
+ sourceText.Append(goToStatement.LabelName);
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(SelectStatement selectStatement, object data)
+ {
+ DebugOutput(selectStatement);
+ exitConstructStack.Push(new DictionaryEntry(typeof(SelectStatement), null));
+ string selectExpression = selectStatement.SelectExpression.AcceptVisitor(this, data).ToString();
+ AppendIndentation();
+ for (int j = 0; j < selectStatement.SelectSections.Count; ++j) {
+ SelectSection selectSection = (SelectSection)selectStatement.SelectSections[j];
+ if (selectSection.CaseClauses.Count == 1 && ((CaseClause)selectSection.CaseClauses[0]).IsDefaultCase) {
+ sourceText.Append("{");
+ } else {
+ sourceText.Append("if (");
+ for (int i = 0; i < selectSection.CaseClauses.Count; ++i) {
+ CaseClause caseClause = (CaseClause)selectSection.CaseClauses[i];
+ if (caseClause.BoundaryExpression != null) {
+ sourceText.Append(caseClause.ComparisonExpression.AcceptVisitor(this, data));
+ sourceText.Append(" <= ");
+ sourceText.Append(selectExpression);
+ sourceText.Append(" && ");
+ sourceText.Append(selectExpression);
+ sourceText.Append(" <= ");
+ sourceText.Append(caseClause.BoundaryExpression.AcceptVisitor(this, data));
+ } else {
+ if (caseClause.ComparisonExpression != null) {
+ sourceText.Append(selectExpression);
+ sourceText.Append(" == ");
+ sourceText.Append(caseClause.ComparisonExpression.AcceptVisitor(this, data));
+ } else {
+ // dummy default should never evaluate (only for default case)
+ sourceText.Append(" true ");
+ }
+ }
+ if (i + 1 < selectSection.CaseClauses.Count) {
+ sourceText.Append(" || ");
+ }
+ }
+ sourceText.Append(") {");
+ }
+ AppendNewLine();
+ ++indentLevel;
+ selectSection.EmbeddedStatement.AcceptChildren(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ if (j + 1 < selectStatement.SelectSections.Count) {
+ sourceText.Append(" else ");
+ }
+ }
+ AppendNewLine();
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(StopStatement stopStatement, object data)
+ {
+ DebugOutput(stopStatement);
+ AppendIndentation();
+ sourceText.Append("Debugger.Break();");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ResumeStatement resumeStatement, object data)
+ {
+ DebugOutput(resumeStatement);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(resumeStatement);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(EraseStatement eraseStatement, object data)
+ {
+ DebugOutput(eraseStatement);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(eraseStatement);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ErrorStatement errorStatement, object data)
+ {
+ DebugOutput(errorStatement);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(errorStatement);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(OnErrorStatement onErrorStatement, object data)
+ {
+ DebugOutput(onErrorStatement);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(onErrorStatement);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ReDimStatement reDimStatement, object data)
+ {
+ DebugOutput(reDimStatement);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(reDimStatement);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(AddHandlerStatement addHandlerStatement, object data)
+ {
+ DebugOutput(addHandlerStatement);
+ AppendIndentation();
+ sourceText.Append(addHandlerStatement.EventExpression.AcceptVisitor(this, data));
+ sourceText.Append(" += ");
+ sourceText.Append(addHandlerStatement.HandlerExpression.AcceptVisitor(this, data));
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
+ {
+ DebugOutput(removeHandlerStatement);
+ AppendIndentation();
+ sourceText.Append(removeHandlerStatement.EventExpression.AcceptVisitor(this, data));
+ sourceText.Append(" -= ");
+ sourceText.Append(removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data));
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(DoLoopStatement doLoopStatement, object data)
+ {
+ DebugOutput(doLoopStatement);
+ exitConstructStack.Push(new DictionaryEntry(typeof(DoLoopStatement), null));
+ if (doLoopStatement.ConditionPosition == ConditionPosition.Start) {
+ AppendIndentation();
+ sourceText.Append("while (");
+ if (doLoopStatement.ConditionType == ConditionType.Until) {
+ sourceText.Append("!(");
+ }
+ sourceText.Append(doLoopStatement.Condition.AcceptVisitor(this, data).ToString());
+ if (doLoopStatement.ConditionType == ConditionType.Until) {
+ sourceText.Append(")");
+ }
+ sourceText.Append(") {");
+
+ AppendNewLine();
+
+ ++indentLevel;
+ doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ } else {
+ AppendIndentation();
+ sourceText.Append("do {");
+ AppendNewLine();
+
+ ++indentLevel;
+ doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("} while (");
+ if (doLoopStatement.Condition == null) {
+ sourceText.Append("true");
+ } else {
+ if (doLoopStatement.ConditionType == ConditionType.Until) {
+ sourceText.Append("!(");
+ }
+ sourceText.Append(doLoopStatement.Condition.AcceptVisitor(this, data).ToString());
+ if (doLoopStatement.ConditionType == ConditionType.Until) {
+ sourceText.Append(")");
+ }
+ }
+ sourceText.Append(");");
+ AppendNewLine();
+ }
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(EndStatement endStatement, object data)
+ {
+ DebugOutput(endStatement);
+ AppendIndentation();
+ sourceText.Append("System.Environment.Exit(0);");
+ AppendNewLine();
+ return null;
+ }
+
+ Stack exitConstructStack = new Stack();
+ int exitLabelCount = 0;
+ public string AddExitOnConstructStack(Type exitType)
+ {
+ string labelName = String.Concat("exit" + exitType.Name, exitLabelCount++);
+ if (exitConstructStack.Count > 0) {
+ object[] exitArray = exitConstructStack.ToArray();
+ for (int i = exitArray.Length - 1; i >= 0; --i) {
+ if ((Type)((DictionaryEntry)exitArray[i]).Key == exitType) {
+ exitArray[i] = new DictionaryEntry(((DictionaryEntry)exitArray[i]).Key, labelName);
+ }
+ }
+ Array.Reverse(exitArray);
+ exitConstructStack = new Stack(exitArray);
+ }
+ return String.Concat(labelName);
+ }
+
+ public void GenerateExitConstructLabel()
+ {
+ if (exitConstructStack.Count > 0) {
+ DictionaryEntry entry = (DictionaryEntry)exitConstructStack.Pop();
+ if (entry.Value != null) {
+ AppendIndentation();
+ sourceText.Append(entry.Value.ToString());
+ sourceText.Append(": ;");
+ AppendNewLine();
+ }
+ }
+ }
+
+ public object Visit(ExitStatement exitStatement, object data)
+ {
+ DebugOutput(exitStatement);
+ Type exitType = null;
+ switch (exitStatement.ExitType) {
+ case ExitType.Sub:
+ sourceText.Append("return;");
+ AppendNewLine();
+ return null;
+ case ExitType.Function:
+ sourceText.Append("return null;");
+ AppendNewLine();
+ return null;
+ case ExitType.Property:
+ exitType = typeof(PropertyDeclaration);
+ break;
+ case ExitType.Do:
+ exitType = typeof(DoLoopStatement);
+ break;
+ case ExitType.For:
+ exitType = typeof(ForStatement);
+ break;
+ case ExitType.While:
+ exitType = typeof(WhileStatement);
+ break;
+ case ExitType.Select:
+ exitType = typeof(SelectStatement);
+ break;
+ case ExitType.Try:
+ exitType = typeof(TryCatchStatement);
+ break;
+ }
+ if (exitType != null) {
+ AppendIndentation();
+ sourceText.Append("goto ");
+ sourceText.Append(AddExitOnConstructStack(exitType));
+ sourceText.Append(";");
+ AppendNewLine();
+ } else {
+ AppendIndentation();
+ sourceText.Append("ERROR IN GENERATION: EXIT TO ");
+ sourceText.Append(exitStatement.ExitType);
+ sourceText.Append(" FAILED!!!");
+ AppendNewLine();
+ }
+ return null;
+ }
+
+ public object Visit(ForeachStatement foreachStatement, object data)
+ {
+ DebugOutput(foreachStatement);
+ exitConstructStack.Push(new DictionaryEntry(typeof(ForStatement), null));
+
+ AppendIndentation();
+ sourceText.Append("foreach (");
+ if (foreachStatement.LoopControlVariable.Type != null) {
+ sourceText.Append(this.GetTypeString(foreachStatement.LoopControlVariable.Type));
+ sourceText.Append(" ");
+ }
+ sourceText.Append(foreachStatement.LoopControlVariable.Name);
+ sourceText.Append(" in ");
+ sourceText.Append(foreachStatement.Expression.AcceptVisitor(this, data));
+ sourceText.Append(") {");
+ AppendNewLine();
+
+ ++indentLevel;
+ foreachStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(ForStatement forStatement, object data)
+ {
+ DebugOutput(forStatement);
+ exitConstructStack.Push(new DictionaryEntry(typeof(ForStatement), null));
+ bool stepIsNegative = false;
+ string step = null;
+ if (forStatement.Step != null) {
+ step = forStatement.Step.AcceptVisitor(this, data).ToString();
+ stepIsNegative = step.StartsWith("-");
+ }
+
+ AppendIndentation();
+ sourceText.Append("for (");
+
+
+ if (forStatement.LoopControlVariable.Type != null) {
+ sourceText.Append(this.GetTypeString(forStatement.LoopControlVariable.Type));
+ sourceText.Append(" ");
+ }
+ sourceText.Append(forStatement.LoopControlVariable.Name);
+ sourceText.Append(" = ");
+
+ sourceText.Append(forStatement.Start.AcceptVisitor(this, data));
+ sourceText.Append("; ");
+ sourceText.Append(forStatement.LoopControlVariable.Name);
+ sourceText.Append(stepIsNegative ? " >= " : " <= ");
+ sourceText.Append(forStatement.End.AcceptVisitor(this, data));
+ sourceText.Append("; ");
+ if (forStatement.Step == null) {
+ sourceText.Append(forStatement.LoopControlVariable.Name);
+ sourceText.Append("++");
+ } else {
+ sourceText.Append(forStatement.LoopControlVariable.Name);
+ if (stepIsNegative) {
+ if (step == "-1") {
+ sourceText.Append("--");
+ } else {
+ sourceText.Append(" -= ");
+ sourceText.Append(step.Substring(1));
+ }
+ } else {
+ sourceText.Append(" += ");
+ sourceText.Append(step);
+ }
+ }
+ sourceText.Append(") {");
+ AppendNewLine();
+
+ ++indentLevel;
+ forStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ GenerateExitConstructLabel();
+
+ return null;
+ }
+
+ public object Visit(LockStatement lockStatement, object data)
+ {
+ DebugOutput(lockStatement);
+ AppendIndentation();
+ sourceText.Append("lock (");
+ sourceText.Append(lockStatement.LockExpression.AcceptVisitor(this, data));
+ sourceText.Append(") {");
+ AppendNewLine();
+
+ ++indentLevel;
+ lockStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(RaiseEventStatement raiseEventStatement, object data)
+ {
+ DebugOutput(raiseEventStatement);
+ AppendIndentation();
+ sourceText.Append("if (");
+ sourceText.Append(raiseEventStatement.EventName);
+ sourceText.Append(" != null) {");
+ AppendNewLine();
+
+ ++indentLevel;
+ AppendIndentation();
+ sourceText.Append(raiseEventStatement.EventName);
+ sourceText.Append(GetParameters(raiseEventStatement.Parameters));
+ sourceText.Append(";");
+ AppendNewLine();
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ return null;
+ }
+
+
+ public object Visit(ReturnStatement returnStatement, object data)
+ {
+ DebugOutput(returnStatement);
+ AppendIndentation();
+ sourceText.Append("return");
+ if (returnStatement.ReturnExpression != null) {
+ sourceText.Append(" ");
+ sourceText.Append(returnStatement.ReturnExpression.AcceptVisitor(this,data));
+ }
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(ThrowStatement throwStatement, object data)
+ {
+ DebugOutput(throwStatement);
+ AppendIndentation();
+ sourceText.Append("throw");
+ if (throwStatement.ThrowExpression != null) {
+ sourceText.Append(" ");
+ sourceText.Append(throwStatement.ThrowExpression.AcceptVisitor(this, data).ToString());
+ }
+ sourceText.Append(";");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(TryCatchStatement tryCatchStatement, object data)
+ {
+ DebugOutput(tryCatchStatement);
+ exitConstructStack.Push(new DictionaryEntry(typeof(TryCatchStatement), null));
+ AppendIndentation();
+ sourceText.Append("try {");
+ AppendNewLine();
+
+ ++indentLevel;
+ tryCatchStatement.StatementBlock.AcceptVisitor(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ if (tryCatchStatement.CatchClauses != null) {
+ foreach (CatchClause catchClause in tryCatchStatement.CatchClauses) {
+ sourceText.Append(" catch ");
+ if (catchClause.Type != null) {
+ sourceText.Append("(");
+ sourceText.Append(GetTypeString(catchClause.Type));
+ if (catchClause.VariableName != null) {
+ sourceText.Append(" ");
+ sourceText.Append(catchClause.VariableName);
+ }
+ sourceText.Append(") ");
+ }
+ sourceText.Append("{");
+ AppendNewLine();
+ ++indentLevel;
+ if (catchClause.Condition != null) {
+ AppendIndentation();
+ sourceText.Append("//TODO: review the original conditional catch clause");
+ AppendNewLine();
+ AppendIndentation();
+ sourceText.Append("if (");
+ sourceText.Append(catchClause.Condition.AcceptVisitor(this, data));
+ sourceText.Append(") {");
+ AppendNewLine();
+ ++indentLevel;
+ catchClause.StatementBlock.AcceptVisitor(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ } else {
+ catchClause.StatementBlock.AcceptVisitor(this, data);
+ }
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ }
+ }
+
+ if (tryCatchStatement.FinallyBlock != null) {
+ sourceText.Append(" finally {");
+ AppendNewLine();
+
+ ++indentLevel;
+ tryCatchStatement.FinallyBlock.AcceptVisitor(this, data);
+ --indentLevel;
+ AppendIndentation();
+ sourceText.Append("}");
+ }
+ AppendNewLine();
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(WhileStatement whileStatement, object data)
+ {
+ DebugOutput(whileStatement);
+ exitConstructStack.Push(new DictionaryEntry(typeof(WhileStatement), null));
+ AppendIndentation();
+ sourceText.Append("while (");
+ sourceText.Append(whileStatement.Condition.AcceptVisitor(this, data).ToString());
+ sourceText.Append(") {");
+ AppendNewLine();
+
+ ++indentLevel;
+ whileStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ --indentLevel;
+
+ AppendIndentation();
+ sourceText.Append("}");
+ AppendNewLine();
+ GenerateExitConstructLabel();
+ return null;
+ }
+
+ public object Visit(WithStatement withStatement, object data)
+ {
+ DebugOutput(withStatement);
+ withExpressionStack.Push(withStatement.WithExpression);
+ withStatement.Body.AcceptVisitor(this, data);
+ withExpressionStack.Pop();
+ return null;
+ }
+
+ public object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data)
+ {
+ DebugOutput(attribute);
+ AppendIndentation();
+ sourceText.Append("// Should never happen (this is handled in AttributeSection) attribute was:");
+ sourceText.Append(attribute);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(AttributeSection attributeSection, object data)
+ {
+ DebugOutput(attributeSection);
+ AppendIndentation();
+ sourceText.Append("[");
+ if (attributeSection.AttributeTarget != null && attributeSection.AttributeTarget.Length > 0) {
+ sourceText.Append(attributeSection.AttributeTarget);
+ sourceText.Append(": ");
+ }
+ for (int j = 0; j < attributeSection.Attributes.Count; ++j) {
+ ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attr = (ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute)attributeSection.Attributes[j];
+
+ sourceText.Append(attr.Name);
+ sourceText.Append("(");
+ for (int i = 0; i < attr.PositionalArguments.Count; ++i) {
+ Expression expr = (Expression)attr.PositionalArguments[i];
+ sourceText.Append(expr.AcceptVisitor(this, data).ToString());
+ if (i + 1 < attr.PositionalArguments.Count | attr.NamedArguments.Count > 0) {
+ sourceText.Append(", ");
+ }
+ }
+
+ for (int i = 0; i < attr.NamedArguments.Count; ++i) {
+ NamedArgumentExpression named = (NamedArgumentExpression)attr.NamedArguments[i];
+ sourceText.Append(named.AcceptVisitor(this, data).ToString());
+ if (i + 1 < attr.NamedArguments.Count) {
+ sourceText.Append(", ");
+ }
+ }
+ sourceText.Append(")");
+ if (j + 1 < attributeSection.Attributes.Count) {
+ sourceText.Append(", ");
+ }
+ }
+ sourceText.Append("]");
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(OptionCompareDeclaration optionCompareDeclaration, object data)
+ {
+ DebugOutput(optionCompareDeclaration);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(optionCompareDeclaration);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data)
+ {
+ DebugOutput(optionExplicitDeclaration);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(optionExplicitDeclaration);
+ AppendNewLine();
+ return null;
+ }
+
+ public object Visit(OptionStrictDeclaration optionStrictDeclaration, object data)
+ {
+ DebugOutput(optionStrictDeclaration);
+ AppendIndentation();
+ sourceText.Append("// TODO: NotImplemented statement: ");
+ sourceText.Append(optionStrictDeclaration);
+ AppendNewLine();
+ return null;
+ }
+#endregion
+
+#region Expressions
+ public object Visit(PrimitiveExpression primitiveExpression, object data)
+ {
+ DebugOutput(primitiveExpression);
+ if (primitiveExpression.Value == null) {
+ return "null";
+ }
+ if (primitiveExpression.Value is bool) {
+ if ((bool)primitiveExpression.Value) {
+ return "true";
+ }
+ return "false";
+ }
+
+ if (primitiveExpression.Value is string) {
+ string s = primitiveExpression.Value.ToString();
+ s = s.Replace("\\","\\\\");
+ s = s.Replace("\"","\\\"");
+ return String.Concat('"', s, '"');
+ }
+
+ if (primitiveExpression.Value is char) {
+ string s = primitiveExpression.Value.ToString();
+ s = s.Replace("\\","\\\\");
+ s = s.Replace("\'","\\\'");
+ return String.Concat("'", s, "'");
+ }
+
+ if (primitiveExpression.Value is System.DateTime) {
+ string s = primitiveExpression.StringValue;
+ s = s.Replace("\\","\\\\");
+ s = s.Replace("\"","\\\"");
+ return String.Concat("System.DateTime.Parse(\"", s, "\")");
+ }
+
+ return primitiveExpression.Value;
+ }
+
+ public object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
+ {
+ DebugOutput(binaryOperatorExpression);
+ string op = null;
+ string left = binaryOperatorExpression.Left.AcceptVisitor(this, data).ToString();
+ string right = binaryOperatorExpression.Right.AcceptVisitor(this, data).ToString();
+
+ switch (binaryOperatorExpression.Op) {
+ case BinaryOperatorType.Concat:
+ op = " + ";
+ break;
+
+ case BinaryOperatorType.Add:
+ op = " + ";
+ break;
+
+ case BinaryOperatorType.Subtract:
+ op = " - ";
+ break;
+
+ case BinaryOperatorType.Multiply:
+ op = " * ";
+ break;
+
+ case BinaryOperatorType.DivideInteger:
+ case BinaryOperatorType.Divide:
+ op = " / ";
+ break;
+
+ case BinaryOperatorType.Modulus:
+ op = " % ";
+ break;
+
+ case BinaryOperatorType.ShiftLeft:
+ op = " << ";
+ break;
+
+ case BinaryOperatorType.ShiftRight:
+ op = " >> ";
+ break;
+
+ case BinaryOperatorType.BitwiseAnd:
+ op = " & ";
+ break;
+ case BinaryOperatorType.BitwiseOr:
+ op = " | ";
+ break;
+ case BinaryOperatorType.ExclusiveOr:
+ op = " ^ ";
+ break;
+
+ case BinaryOperatorType.BooleanAnd:
+ op = " && ";
+ break;
+ case BinaryOperatorType.BooleanOr:
+ op = " || ";
+ break;
+
+ case BinaryOperatorType.Equality:
+ op = " == ";
+ break;
+ case BinaryOperatorType.GreaterThan:
+ op = " > ";
+ break;
+ case BinaryOperatorType.GreaterThanOrEqual:
+ op = " >= ";
+ break;
+ case BinaryOperatorType.InEquality:
+ op = " != ";
+ break;
+ case BinaryOperatorType.LessThan:
+ op = " < ";
+ break;
+ case BinaryOperatorType.IS:
+ op = " == ";
+ break;
+ case BinaryOperatorType.LessThanOrEqual:
+ op = " <= ";
+ break;
+ case BinaryOperatorType.Power:
+ return "Math.Pow(" + left + ", " + right + ")";
+ default:
+ throw new Exception("Unknown binary operator:" + binaryOperatorExpression.Op);
+ }
+
+ return String.Concat(left,
+ op,
+ right);
+ }
+
+ public object Visit(ParenthesizedExpression parenthesizedExpression, object data)
+ {
+ DebugOutput(parenthesizedExpression);
+ string innerExpr = parenthesizedExpression.Expression.AcceptVisitor(this, data).ToString();
+ return String.Concat("(", innerExpr, ")");
+ }
+
+ public object Visit(InvocationExpression invocationExpression, object data)
+ {
+ DebugOutput(invocationExpression);
+ return String.Concat(invocationExpression.TargetObject.AcceptVisitor(this, data),
+ GetParameters(invocationExpression.Parameters)
+ );
+ }
+
+ public object Visit(IdentifierExpression identifierExpression, object data)
+ {
+ DebugOutput(identifierExpression);
+ return identifierExpression.Identifier;
+ }
+
+ public object Visit(TypeReferenceExpression typeReferenceExpression, object data)
+ {
+ DebugOutput(typeReferenceExpression);
+ return GetTypeString(typeReferenceExpression.TypeReference);
+ }
+
+ public object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
+ {
+ DebugOutput(unaryOperatorExpression);
+ switch (unaryOperatorExpression.Op) {
+ case UnaryOperatorType.BitNot:
+ return String.Concat("~", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+ case UnaryOperatorType.Decrement:
+ return String.Concat("--", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
+ case UnaryOperatorType.Increment:
+ return String.Concat("++", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
+ case UnaryOperatorType.Minus:
+ return String.Concat("-", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+ case UnaryOperatorType.Not:
+ return String.Concat("!(", unaryOperatorExpression.Expression.AcceptVisitor(this, data), ")");
+ case UnaryOperatorType.Plus:
+ return String.Concat("+", unaryOperatorExpression.Expression.AcceptVisitor(this, data));
+ case UnaryOperatorType.PostDecrement:
+ return String.Concat(unaryOperatorExpression.Expression.AcceptVisitor(this, data), "--");
+ case UnaryOperatorType.PostIncrement:
+ return String.Concat(unaryOperatorExpression.Expression.AcceptVisitor(this, data), "++");
+ }
+ throw new System.NotSupportedException();
+ }
+
+ public object Visit(AssignmentExpression assignmentExpression, object data)
+ {
+ DebugOutput(assignmentExpression);
+ string op = null;
+ string left = assignmentExpression.Left.AcceptVisitor(this, data).ToString();
+ string right = assignmentExpression.Right.AcceptVisitor(this, data).ToString();
+
+ switch (assignmentExpression.Op) {
+ case AssignmentOperatorType.Assign:
+ op = " = ";
+ break;
+ case AssignmentOperatorType.ConcatString:
+ case AssignmentOperatorType.Add:
+ op = " += ";
+ break;
+ case AssignmentOperatorType.Subtract:
+ op = " -= ";
+ break;
+ case AssignmentOperatorType.Multiply:
+ op = " *= ";
+ break;
+ case AssignmentOperatorType.Divide:
+ op = " /= ";
+ break;
+ case AssignmentOperatorType.ShiftLeft:
+ op = " <<= ";
+ break;
+ case AssignmentOperatorType.ShiftRight:
+ op = " >>= ";
+ break;
+
+ case AssignmentOperatorType.ExclusiveOr:
+ op = " ^= ";
+ break;
+ case AssignmentOperatorType.Modulus:
+ op = " %= ";
+ break;
+ case AssignmentOperatorType.BitwiseAnd:
+ op = " &= ";
+ break;
+ case AssignmentOperatorType.BitwiseOr:
+ op = " |= ";
+ break;
+ }
+ return String.Concat(left,
+ op,
+ right);
+ }
+
+ public object Visit(CastExpression castExpression, object data)
+ {
+ DebugOutput(castExpression);
+ string type = ConvertTypeString(castExpression.CastTo.Type);
+ string castExpr = castExpression.Expression.AcceptVisitor(this, data).ToString();
+
+ if (castExpression.IsSpecializedCast) {
+ switch (type) {
+ case "System.Object":
+ break;
+ default:
+ string convToType = type.Substring("System.".Length);
+ return String.Format("System.Convert.To{0}({1})", convToType, castExpr);
+ }
+ }
+ return String.Format("(({0})({1}))", type, castExpr);
+ }
+
+ public object Visit(ThisReferenceExpression thisReferenceExpression, object data)
+ {
+ DebugOutput(thisReferenceExpression);
+ return "this";
+ }
+
+ public object Visit(BaseReferenceExpression baseReferenceExpression, object data)
+ {
+ DebugOutput(baseReferenceExpression);
+ return "base";
+ }
+
+ public object Visit(ObjectCreateExpression objectCreateExpression, object data)
+ {
+ return String.Format("new {0}{1}",
+ GetTypeString(objectCreateExpression.CreateType),
+ GetParameters(objectCreateExpression.Parameters)
+ );
+ }
+
+ public object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
+ {
+ DebugOutput(parameterDeclarationExpression);
+ // Is handled in the AppendParameters method
+ return "// should never happen" + parameterDeclarationExpression;
+ }
+
+ public object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data)
+ {
+ DebugOutput(fieldReferenceOrInvocationExpression);
+ INode target = fieldReferenceOrInvocationExpression.TargetObject;
+ if (target == null && withExpressionStack.Count > 0) {
+ target = withExpressionStack.Peek() as INode;
+ }
+ return String.Concat(target.AcceptVisitor(this, data),
+ '.',
+ fieldReferenceOrInvocationExpression.FieldName);
+ }
+
+ public object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
+ {
+ DebugOutput(arrayInitializerExpression);
+ if (arrayInitializerExpression.CreateExpressions.Count > 0) {
+ return String.Concat("{",
+ GetExpressionList(arrayInitializerExpression.CreateExpressions),
+ "}");
+ }
+ return String.Empty;
+ }
+
+ public object Visit(GetTypeExpression getTypeExpression, object data)
+ {
+ DebugOutput(getTypeExpression);
+ return String.Concat("typeof(",
+ this.GetTypeString(getTypeExpression.Type),
+ ")");
+ }
+
+ public object Visit(ClassReferenceExpression classReferenceExpression, object data)
+ {
+ // ALMOST THE SAME AS '.this' but ignores all overridings from virtual
+ // members. How can this done in C# ?
+ DebugOutput(classReferenceExpression);
+ return "TODO : " + classReferenceExpression;
+ }
+
+ public object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+ {
+ // I think the LoopControlVariableExpression is only used in the for statement
+ // and there it is handled
+ DebugOutput(loopControlVariableExpression);
+ return "Should Never happen : " + loopControlVariableExpression;
+ }
+
+ public object Visit(NamedArgumentExpression namedArgumentExpression, object data)
+ {
+ return String.Concat(namedArgumentExpression.Parametername,
+ "=",
+ namedArgumentExpression.Expression.AcceptVisitor(this, data));
+ }
+
+ public object Visit(AddressOfExpression addressOfExpression, object data)
+ {
+ DebugOutput(addressOfExpression);
+ string procedureName = addressOfExpression.Procedure.AcceptVisitor(this, data).ToString();
+ string eventHandlerType = "EventHandler";
+ bool foundEventHandler = false;
+ // try to resolve the type of the eventhandler using a little trick :)
+ foreach (INode node in currentType.Children) {
+ MethodDeclaration md = node as MethodDeclaration;
+ if (md != null && md.Parameters != null && md.Parameters.Count > 0) {
+ if (procedureName == md.Name || procedureName.EndsWith("." + md.Name)) {
+ ParameterDeclarationExpression pde = (ParameterDeclarationExpression)md.Parameters[md.Parameters.Count - 1];
+ string typeName = GetTypeString(pde.TypeReference);
+ if (typeName.EndsWith("Args")) {
+ eventHandlerType = typeName.Substring(0, typeName.Length - "Args".Length) + "Handler";
+ foundEventHandler = true;
+ }
+ }
+ }
+ }
+ return String.Concat(foundEventHandler ? "new " : "/* might be wrong, please check */ new ",
+ eventHandlerType,
+ "(",
+ procedureName,
+ ")");
+ }
+
+ public object Visit(TypeOfExpression typeOfExpression, object data)
+ {
+ DebugOutput(typeOfExpression);
+ return String.Concat(typeOfExpression.Expression.AcceptVisitor(this, data),
+ " is ",
+ GetTypeString(typeOfExpression.Type));
+ }
+
+ public object Visit(ArrayCreateExpression ace, object data)
+ {
+ DebugOutput(ace);
+
+ return String.Concat("new ",
+ GetTypeString(ace.CreateType),
+ "[",
+ GetExpressionList(ace.Parameters),
+ "]",
+ ace.ArrayInitializer.AcceptVisitor(this, data));
+ }
+#endregion
+#endregion
+
+ public void AppendAttributes(ArrayList attr)
+ {
+ if (attr != null) {
+ foreach (AttributeSection section in attr) {
+ section.AcceptVisitor(this, null);
+ }
+ }
+ }
+
+ public void AppendParameters(ArrayList parameters)
+ {
+ if (parameters == null) {
+ return;
+ }
+ for (int i = 0; i < parameters.Count; ++i) {
+ ParameterDeclarationExpression pde = (ParameterDeclarationExpression)parameters[i];
+ AppendAttributes(pde.Attributes);
+
+ if ((pde.ParamModifiers.Modifier & ParamModifier.ByRef) == ParamModifier.ByRef) {
+ sourceText.Append("ref ");
+ } else if ((pde.ParamModifiers.Modifier & ParamModifier.ParamArray) == ParamModifier.ParamArray) {
+ sourceText.Append("params ");
+ }
+
+ sourceText.Append(GetTypeString(pde.TypeReference));
+ sourceText.Append(" ");
+ sourceText.Append(pde.ParameterName);
+ if (i + 1 < parameters.Count) {
+ sourceText.Append(", ");
+ }
+ }
+ }
+
+ string ConvertTypeString(string typeString)
+ {
+ switch (typeString.ToLower()) {
+ case "boolean":
+ return "bool";
+ case "string":
+ return "string";
+ case "char":
+ return "char";
+ case "double":
+ return "double";
+ case "single":
+ return "float";
+ case "decimal":
+ return "decimal";
+ case "date":
+ return "System.DateTime";
+ case "long":
+ return "long";
+ case "integer":
+ return "int";
+ case "short":
+ return "short";
+ case "byte":
+ return "byte";
+ case "void":
+ return "void";
+ case "system.object":
+ case "object":
+ return "object";
+ case "system.uint64":
+ return "ulong";
+ case "system.uint32":
+ return "uint";
+ case "system.uint16":
+ return "ushort";
+ }
+ return typeString;
+ }
+
+ string GetTypeString(TypeReference typeRef)
+ {
+ if (typeRef == null) {
+ return "void";
+ }
+
+ string typeStr = ConvertTypeString(typeRef.Type);
+
+ StringBuilder arrays = new StringBuilder();
+
+ if (typeRef.RankSpecifier != null) {
+ for (int i = 0; i < typeRef.RankSpecifier.Count; ++i) {
+ arrays.Append("[");
+ arrays.Append(new String(',', (int)typeRef.RankSpecifier[i]));
+ arrays.Append("]");
+ }
+ } else {
+ if (typeRef.Dimension != null) {
+ arrays.Append("[");
+ if (typeRef.Dimension.Count > 0) {
+ arrays.Append(new String(',', typeRef.Dimension.Count - 1));
+ }
+ arrays.Append("]");
+ }
+ }
+
+ return typeStr + arrays.ToString();
+ }
+
+ string GetModifier(Modifier modifier)
+ {
+ StringBuilder builder = new StringBuilder();
+
+ if ((modifier & Modifier.Public) == Modifier.Public) {
+ builder.Append("public ");
+ } else if ((modifier & Modifier.Private) == Modifier.Private) {
+ builder.Append("private ");
+ } else if ((modifier & (Modifier.Protected | Modifier.Friend)) == (Modifier.Protected | Modifier.Friend)) {
+ builder.Append("protected internal ");
+ } else if ((modifier & Modifier.Friend) == Modifier.Friend) {
+ builder.Append("internal ");
+ } else if ((modifier & Modifier.Protected) == Modifier.Protected) {
+ builder.Append("protected ");
+ }
+
+ if ((modifier & Modifier.MustInherit) == Modifier.MustInherit) {
+ builder.Append("abstract ");
+ }
+ if ((modifier & Modifier.Shared) == Modifier.Shared) {
+ builder.Append("static ");
+ }
+ if ((modifier & Modifier.Overridable) == Modifier.Overridable) {
+ builder.Append("virtual ");
+ }
+ if ((modifier & Modifier.MustOverride) == Modifier.MustOverride) {
+ builder.Append("abstract ");
+ }
+ if ((modifier & Modifier.Overrides) == Modifier.Overrides) {
+ builder.Append("override ");
+ }
+ if ((modifier & Modifier.Shadows) == Modifier.Shadows) {
+ builder.Append("new ");
+ }
+
+ if ((modifier & Modifier.NotInheritable) == Modifier.NotInheritable) {
+ builder.Append("sealed ");
+ }
+
+ if ((modifier & Modifier.Constant) == Modifier.Constant) {
+ builder.Append("const ");
+ }
+ if ((modifier & Modifier.ReadOnly) == Modifier.ReadOnly) {
+ builder.Append("readonly ");
+ }
+ return builder.ToString();
+ }
+
+ string GetParameters(ArrayList list)
+ {
+ return String.Concat("(",
+ GetExpressionList(list),
+ ")");
+ }
+
+ string GetExpressionList(ArrayList list)
+ {
+ StringBuilder sb = new StringBuilder();
+ if (list != null) {
+ for (int i = 0; i < list.Count; ++i) {
+ Expression exp = (Expression)list[i];
+ if (exp != null) {
+ sb.Append(exp.AcceptVisitor(this, null));
+ if (i + 1 < list.Count) {
+ sb.Append(", ");
+ }
+ }
+ }
+ }
+ return sb.ToString();
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/CSharpConverter/CSharpVisitor.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,885 +1,885 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.Drawing;
-using System.Diagnostics;
-using System.Globalization;
-using System.Text;
-using ICSharpCode.SharpRefactory.Parser;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class Token
- {
- public int kind;
-
- public int col;
- public int line;
-
- public object literalValue = null;
- public string val;
- public Token next;
- public ArrayList specials;
-
- public Point EndLocation {
- get {
- return new Point(col + val.Length - 1, line);
- }
- }
-
- public Point Location {
- get {
- return new Point(col, line);
- }
- }
-
- public Token()
- {
- }
-
- public Token(int kind)
- {
- this.kind = kind;
- }
-
- public Token(int kind, int col, int line, string val)
- {
- this.kind = kind;
- this.col = col;
- this.line = line;
- this.val = val;
- }
-
- public Token(int kind, int col, int line, string val, object literalValue)
- {
- this.kind = kind;
- this.col = col;
- this.line = line;
- this.val = val;
- this.literalValue = literalValue;
- }
- }
-
- public class Lexer
- {
- IReader reader;
- static Hashtable keywords = new Hashtable();
-
- int col = 1;
- int line = 1;
-
- bool lineEnd = false;
-
- Errors errors = new Errors();
-
- SpecialTracker specialTracker = new SpecialTracker();
-
- Token lastToken = null;
- Token curToken = null;
- Token peekToken = null;
-
- string[] specialCommentTags = null;
- Hashtable specialCommentHash = null;
- ArrayList tagComments = new ArrayList();
-
- public ArrayList TagComments
- {
- get {
- return tagComments;
- }
- }
-
- public string[] SpecialCommentTags
- {
- get {
- return specialCommentTags;
- }
- set {
- specialCommentTags = value;
- specialCommentHash = new Hashtable();
- if (specialCommentTags != null) {
- foreach (string str in specialCommentTags) {
- specialCommentHash[str] = 0;
- }
- }
- }
- }
-
- public SpecialTracker SpecialTracker
- {
- get {
- return specialTracker;
- }
- }
-
- public Errors Errors
- {
- get {
- return errors;
- }
- }
-
- public Token Token
- {
- get {
- return lastToken;
- }
- }
-
- public Token LookAhead
- {
- get {
- return curToken;
- }
- }
-
- public void StartPeek()
- {
- peekToken = curToken;
- }
-
- public Token Peek()
- {
- if (peekToken.next == null) {
- peekToken.next = Next();
- specialTracker.InformToken(peekToken.next.kind);
- }
- peekToken = peekToken.next;
- return peekToken;
- }
-
- public Token NextToken()
- {
- if (curToken == null) { // first call of NextToken()
- curToken = Next();
- specialTracker.InformToken(curToken.kind);
- return curToken;
- }
-
- lastToken = curToken;
-
- if (curToken.next == null) {
- curToken.next = Next();
- specialTracker.InformToken(curToken.next.kind);
- }
-
- curToken = curToken.next;
-
- if (curToken.kind == Tokens.EOF && !(lastToken.kind == Tokens.EOL)) { // be sure that before EOF there is an EOL token
- curToken = new Token(Tokens.EOL, curToken.col, curToken.line, "\n");
- curToken.next = new Token(Tokens.EOF, curToken.col, curToken.line, "\n");
- specialTracker.InformToken(curToken.next.kind);
- }
-
- return curToken;
- }
-
- public ArrayList RetriveComments()
- {
- return specialTracker.RetrieveSpecials();
- }
-
-// public ArrayList RetrieveSpecials()
-// {
-// if (lastToken == null) {
-// return this.specialTracker.RetrieveSpecials();
-// }
-//
-// Debug.Assert(lastToken.specials != null);
-//
-// ArrayList tmp = lastToken.specials;
-// lastToken.specials = null;
-// return tmp;
-// }
-//
- public Lexer(IReader reader)
- {
- this.reader = reader;
- }
-
- public Token Next()
- {
- while (!reader.Eos()) {
-
- char ch = reader.GetNext();
-
- ++col;
- if (Char.IsWhiteSpace(ch)) {
-
- if (ch == '\n') {
- int x = col - 1;
- int y = line;
- ++line;
- col = 1;
- if (reader.Peek() == '\r') {
- reader.GetNext();
- if (!lineEnd) {
- lineEnd = true;
- return new Token(Tokens.EOL, x -1 , y, "\n\r");
- }
- }
- if (!lineEnd) {
- lineEnd = true;
- return new Token(Tokens.EOL, x, y, "\n");
- }
- }
- continue;
-
- }
- if (ch == '_') {
- if (reader.Eos()) {
- errors.Error(line, col, String.Format("No EOF expected after _"));
- }
- ch = reader.GetNext();
- ++col;
- if (!Char.IsWhiteSpace(ch)) {
- reader.UnGet();
- --col;
- int x = col;
- int y = line;
- string s = ReadIdent('_');
- lineEnd = false;
-
- return new Token(Tokens.Identifier, x, y, s);
- }
- while (Char.IsWhiteSpace(ch)) {
- if (ch == '\n') {
- ++line;
- col = 0;
- break;
- }
- if (!reader.Eos()) {
- ch = reader.GetNext();
- ++col;
- }
- }
- if (ch != '\n') {
- errors.Error(line, col, String.Format("Return expected"));
- }
- continue;
- }
-
- if (ch == '#') {
- while (Char.IsWhiteSpace(reader.Peek())) {
- ++col;
- reader.GetNext();
- }
- if (Char.IsDigit(reader.Peek())) {
- int x = col;
- int y = line;
- string s = ReadDate();
- DateTime time = DateTime.Now;
- try {
- time = System.DateTime.Parse(s, System.Globalization.CultureInfo.InvariantCulture);
- } catch (Exception e) {
- errors.Error(line, col, String.Format("Invalid date time {0}", e));
- }
- return new Token(Tokens.LiteralDate, x, y, s, time);
- } else {
- ReadPreprocessorDirective();
- continue;
- }
- }
-
- if (ch == '[') { // Identifier
- lineEnd = false;
- if (reader.Eos()) {
- errors.Error(line, col, String.Format("Identifier expected"));
- }
- ch = reader.GetNext();
- ++col;
- if (ch == ']' || Char.IsWhiteSpace(ch)) {
- errors.Error(line, col, String.Format("Identifier expected"));
- }
- int x = col - 1;
- int y = line;
- string s = ReadIdent(ch);
- if (reader.Eos()) {
- errors.Error(line, col, String.Format("']' expected"));
- }
- ch = reader.GetNext();
- ++col;
- if (!(ch == ']')) {
- errors.Error(line, col, String.Format("']' expected"));
- }
-// Console.WriteLine(">" + s + "<");
- return new Token(Tokens.Identifier, x, y, s);
- }
- if (Char.IsLetter(ch)) {
- int x = col - 1;
- int y = line;
- string s = ReadIdent(ch);
- if (Keywords.IsKeyword(s)) {
- lineEnd = false;
- return new Token(Keywords.GetToken(s), x, y, s);
- }
-
- // handle 'REM' comments
- if (s.ToUpper() == "REM") {
- ReadComment();
- if (!lineEnd) {
- lineEnd = true;
- return new Token(Tokens.EOL, x, y, "\n");
- }
- continue;
- }
-
- lineEnd = false;
- return new Token(Tokens.Identifier, x, y, s);
-
- }
- if (Char.IsDigit(ch)) {
- lineEnd = false;
- return ReadDigit(ch, col);
- }
- if (ch == '&') {
- lineEnd = false;
- if (reader.Eos()) {
- return ReadOperator('&');
- }
- ch = reader.GetNext();
- ++col;
- if (Char.ToUpper(ch) == 'H' || Char.ToUpper(ch) == 'O') {
- reader.UnGet();
- --col;
- return ReadDigit('&', col);
- } else {
- reader.UnGet();
- return ReadOperator('&');
- }
- }
- if (ch == '\'') {
- int x = col - 1;
- int y = line;
- ReadComment();
- if (!lineEnd) {
- lineEnd = true;
- return new Token(Tokens.EOL, x, y, "\n");
- }
- continue;
- }
- if (ch == '"') {
- lineEnd = false;
- int x = col - 1;
- int y = line;
- string s = ReadString();
- if (!reader.Eos() && (reader.Peek() == 'C' || reader.Peek() == 'c')) {
- reader.GetNext();
- ++col;
- if (s.Length != 1) {
- errors.Error(line, col, String.Format("Chars can only have Length 1 "));
- }
- return new Token(Tokens.LiteralCharacter, x, y, String.Concat('"', s , "\"C") , s[0]);
- }
- return new Token(Tokens.LiteralString, x, y, String.Concat('"', s , '"'), s);
- }
- Token token = ReadOperator(ch);
- if (token != null) {
- lineEnd = false;
- return token;
- }
- errors.Error(line, col, String.Format("Unknown char({0}) which can't be read", ch));
- }
-
- return new Token(Tokens.EOF);
- }
-
- string ReadIdent(char ch)
- {
- StringBuilder s = new StringBuilder(ch.ToString());
- while (!reader.Eos() && (Char.IsLetterOrDigit(ch = reader.GetNext()) || ch == '_')) {
- ++col;
- s.Append(ch.ToString());
- }
- ++col;
- if (reader.Eos()) {
- --col;
- return s.ToString();
- }
- reader.UnGet();
- --col;
- if (!reader.Eos() && "%&@!#$".IndexOf(Char.ToUpper(reader.Peek())) != -1) {
- reader.GetNext();
- ++col;
- }
- return s.ToString();
- }
-
- Token ReadDigit(char ch, int x)
- {
- StringBuilder sb = new StringBuilder(ch.ToString());
- int y = line;
- string digit = "";
- if (ch != '&') {
- digit += ch;
- }
-
- bool ishex = false;
- bool isokt = false;
- bool issingle = false;
- bool isdouble = false;
- bool isdecimal = false;
-
- if (reader.Eos()) {
- if (ch == '&') {
- errors.Error(line, col, String.Format("digit expected"));
- }
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString() ,ch - '0');
- }
- if (ch == '&' && Char.ToUpper(reader.Peek()) == 'H') {
- const string hex = "0123456789ABCDEF";
- sb.Append(reader.GetNext()); // skip 'H'
- ++col;
- while (!reader.Eos() && hex.IndexOf(Char.ToUpper(reader.Peek())) != -1) {
- ch = reader.GetNext();
- sb.Append(ch);
- digit += Char.ToUpper(ch);
- ++col;
- }
- ishex = true;
- } else if (!reader.Eos() && ch == '&' && Char.ToUpper(reader.Peek()) == 'O') {
- const string okt = "01234567";
- sb.Append(reader.GetNext()); // skip 'O'
- ++col;
- while (!reader.Eos() && okt.IndexOf(Char.ToUpper(reader.Peek())) != -1) {
- ch = reader.GetNext();
- sb.Append(ch);
- digit += Char.ToUpper(ch);
- ++col;
- }
- isokt = true;
- } else {
- while (!reader.Eos() && Char.IsDigit(reader.Peek())) {
- ch = reader.GetNext();;
- digit += ch;
- sb.Append(ch);
- ++col;
- }
- }
- if (!reader.Eos() && "%&SIL".IndexOf(Char.ToUpper(reader.Peek())) != -1 || ishex || isokt) {
- ch = reader.GetNext();
- sb.Append(ch);
- ch = Char.ToUpper(ch);
- ++col;
- if (isokt) {
- long number = 0L;
- for (int i = 0; i < digit.Length; ++i) {
- number = number * 8 + digit[i] - '0';
- }
- if (ch == 'S') {
- return new Token(Tokens.LiteralSingle, x, y, sb.ToString(), (short)number);
- } else if (ch == '%' || ch == 'I') {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
- } else if (ch == '&' || ch == 'L') {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (long)number);
- } else {
- if (number > int.MaxValue || number < int.MinValue) {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (long)number);
- } else {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
- }
- }
- }
- if (ch == 'S') {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int16.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
- } else if (ch == '%' || ch == 'I') {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
- } else if (ch == '&' || ch == 'L') {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
- } else if (ishex) {
- reader.UnGet();
- --col;
- long number = Int64.Parse(digit, NumberStyles.HexNumber);
- if (number > int.MaxValue || number < int.MinValue) {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), number);
- } else {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
- }
- }
- }
- if (!reader.Eos() && reader.Peek() == '.') { // read floating point number
- reader.GetNext();
- if (!Char.IsDigit(reader.Peek())) {
- reader.UnGet();
- } else {
- isdouble = true; // double is default
- if (ishex || isokt) {
- errors.Error(line, col, String.Format("No hexadecimal or oktadecimal floating point values allowed"));
- }
- digit += '.';
- ++col;
- while (!reader.Eos() && Char.IsDigit(reader.Peek())){ // read decimal digits beyond the dot
- digit += reader.GetNext();
- ++col;
- }
- }
- }
-
- if (!reader.Eos() && Char.ToUpper(reader.Peek()) == 'E') { // read exponent
- isdouble = true;
- digit += reader.GetNext();
- ++col;
- if (!reader.Eos() && (reader.Peek() == '-' || reader.Peek() == '+')) {
- digit += reader.GetNext();
- ++col;
- }
- while (!reader.Eos() && Char.IsDigit(reader.Peek())) { // read exponent value
- digit += reader.GetNext();
- ++col;
- }
- }
-
- if (!reader.Eos()) {
- if (Char.ToUpper(reader.Peek()) == 'R' || Char.ToUpper(reader.Peek()) == '#') { // double type suffix (obsolete, double is default)
- reader.GetNext();
- ++col;
- isdouble = true;
- } else if (Char.ToUpper(reader.Peek()) == 'D' || Char.ToUpper(reader.Peek()) == '@') { // decimal value
- reader.GetNext();
- ++col;
- isdecimal = true;
- } else if (Char.ToUpper(reader.Peek()) == 'F' || Char.ToUpper(reader.Peek()) == '!') { // decimal value
- reader.GetNext();
- ++col;
- issingle = true;
- }
- }
-
- if (issingle) {
- NumberFormatInfo mi = new NumberFormatInfo();
- mi.CurrencyDecimalSeparator = ".";
- return new Token(Tokens.LiteralSingle, x, y, sb.ToString(), Single.Parse(digit, mi));
- }
- if (isdecimal) {
- NumberFormatInfo mi = new NumberFormatInfo();
- mi.CurrencyDecimalSeparator = ".";
- return new Token(Tokens.LiteralDecimal, x, y, sb.ToString(), Decimal.Parse(digit, mi));
- }
- if (isdouble) {
- NumberFormatInfo mi = new NumberFormatInfo();
- mi.CurrencyDecimalSeparator = ".";
- return new Token(Tokens.LiteralDouble, x, y, sb.ToString(), Double.Parse(digit, mi));
- }
- try {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
- } catch (Exception) {
- try {
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
- } catch (Exception) {
- errors.Error(line, col, String.Format("{0} is not a parseable number (too long?)", sb.ToString()));
- // fallback, when nothing helps :)
- return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), 0);
- }
- }
- }
-
- void ReadPreprocessorDirective()
- {
- Point start = new Point(col - 1, line);
- string directive = ReadIdent('#');
- string argument = ReadToEOL();
- this.specialTracker.AddPreProcessingDirective(directive, argument.Trim(), start, new Point(start.X + directive.Length + argument.Length, start.Y));
- }
-
- string ReadToEOL()
- {
- StringBuilder sb = new StringBuilder();
- if (!reader.Eos()) {
- char ch = reader.GetNext();
- while (!reader.Eos()) {
- if (ch == '\r') {
- if (reader.Peek() == '\n') {
- ch = reader.GetNext();
- }
- }
- if (ch == '\n') {
- ++line;
- col = 1;
- return sb.ToString();
- } else {
- sb.Append(ch);
- }
- ch = reader.GetNext();
- ++col;
- }
- }
- return sb.ToString();
- }
-
- string ReadDate()
- {
- char ch = '\0';
- StringBuilder sb = new StringBuilder();
- while (!reader.Eos()) {
- ch = reader.GetNext();
- ++col;
- if (ch == '#') {
- break;
- } else if (ch == '\n') {
- errors.Error(line, col, String.Format("No return allowed inside Date literal"));
- } else {
- sb.Append(ch);
- }
- }
- if (ch != '#') {
- errors.Error(line, col, String.Format("End of File reached before Date literal terminated"));
- }
- return sb.ToString();
- }
-
- string ReadString()
- {
- char ch = '\0';
- StringBuilder s = new StringBuilder();
- while (!reader.Eos()) {
- ch = reader.GetNext();
- ++col;
- if (ch == '"') {
- if (!reader.Eos() && reader.Peek() == '"') {
- s.Append('"');
- reader.GetNext();
- ++col;
- } else {
- break;
- }
- } else if (ch == '\n') {
- errors.Error(line, col, String.Format("No return allowed inside String literal"));
- } else {
- s.Append(ch);
- }
- }
- if (ch != '"') {
- errors.Error(line, col, String.Format("End of File reached before String terminated "));
- }
- return s.ToString();
- }
-
- protected bool HandleLineEnd(char ch)
- {
- if (WasLineEnd(ch)) {
- ++line;
- col = 1;
- return true;
- }
- return false;
- }
-
- protected bool WasLineEnd(char ch)
- {
- // Handle MS-DOS or MacOS line ends.
- if (ch == '\r') {
- if (reader.Peek() == '\n') { // MS-DOS line end '\r\n'
- ch = (char)reader.GetNext();
- } else { // assume MacOS line end which is '\r'
- ch = '\n';
- }
- }
- return ch == '\n';
- }
-
- void ReadComment()
- {
- StringBuilder curWord = new StringBuilder();
- StringBuilder comment = new StringBuilder();
-
- int nextChar;
- while ((nextChar = reader.GetNext()) != -1) {
- char ch = (char)nextChar;
- comment.Append(ch);
- ++col;
- if (HandleLineEnd(ch) || nextChar == 0) {
- specialTracker.StartComment(CommentType.SingleLine, new Point(col, line));
- specialTracker.AddString(comment.ToString());
- specialTracker.FinishComment();
- return;
- }
-
- if (Char.IsLetter(ch)) {
- curWord.Append(ch);
- } else {
- string tag = curWord.ToString();
- curWord = new StringBuilder();
- if (specialCommentHash != null && specialCommentHash[tag] != null) {
- Point p = new Point(col, line);
- string commentStr = ReadToEOL();
- tagComments.Add(new TagComment(tag, commentStr, p));
- return;
- }
- }
- }
- }
-
- Token ReadOperator(char ch)
- {
- int x = col;
- int y = line;
- switch(ch) {
- case '+':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.PlusAssign, x, y, "+=");
- default:
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.Plus, x, y, "+");
- case '-':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.MinusAssign, x, y, "-=");
- default:
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.Minus, x, y, "-");
- case '*':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.TimesAssign, x, y, "*=");
- default:
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.Times, x, y, "*");
- case '/':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.DivAssign, x, y, "/=");
- default:
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.Div, x, y, "/");
- case '\\':
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.DivIntegerAssign, x, y, "\\=");
- default:
- reader.UnGet();
- break;
- }
- return new Token(Tokens.DivInteger, x, y, "\\");
- case '&':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.ConcatStringAssign, x, y, "&=");
- default:
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.ConcatString, x, y, "&");
- case '^':
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.PowerAssign, x, y, "^=");
- default:
- reader.UnGet();
- break;
- }
- return new Token(Tokens.Power, x, y, "^");
- case ':':
- return new Token(Tokens.Colon, x, y, ":");
- case '=':
- return new Token(Tokens.Assign, x, y, "=");
- case '<':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.LessEqual, x, y, "<=");
- case '>':
- ++col;
- return new Token(Tokens.NotEqual, x, y, "<>");
- case '<':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- col += 2;
- return new Token(Tokens.ShiftLeftAssign, x, y, "<<=");
- default:
- ++col;
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.ShiftLeft, x, y, "<<");
- default:
- reader.UnGet();
- return new Token(Tokens.LessThan, x, y, "<");
- }
- }
- return new Token(Tokens.LessThan, x, y, "<");
- case '>':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- ++col;
- return new Token(Tokens.GreaterEqual, x, y, ">=");
- case '>':
- if (!reader.Eos()) {
- switch (reader.GetNext()) {
- case '=':
- col += 2;
- return new Token(Tokens.ShiftRightAssign, x, y, ">>=");
- default:
- ++col;
- reader.UnGet();
- break;
- }
- }
- return new Token(Tokens.ShiftRight, x, y, ">>");
- default:
- reader.UnGet();
- return new Token(Tokens.GreaterThan, x, y, ">");
- }
- }
- return new Token(Tokens.GreaterThan, x, y, "<=");
- case ',':
- return new Token(Tokens.Comma, x, y, ",");
- case '.':
- if (Char.IsDigit(reader.Peek())) {
- reader.UnGet();
- --col;
- return ReadDigit('0', col);
- }
- return new Token(Tokens.Dot, x, y, ".");
- case '(':
- return new Token(Tokens.OpenParenthesis, x, y, "(");
- case ')':
- return new Token(Tokens.CloseParenthesis, x, y, ")");
- case '{':
- return new Token(Tokens.OpenCurlyBrace, x, y, "{");
- case '}':
- return new Token(Tokens.CloseCurlyBrace, x, y, "}");
- case '[':
- return new Token(Tokens.OpenSquareBracket, x, y, "[");
- case ']':
- return new Token(Tokens.CloseSquareBracket, x, y, "]");
- }
- return null;
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Collections;
+using System.Drawing;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class Token
+ {
+ public int kind;
+
+ public int col;
+ public int line;
+
+ public object literalValue = null;
+ public string val;
+ public Token next;
+ public ArrayList specials;
+
+ public Point EndLocation {
+ get {
+ return new Point(col + val.Length - 1, line);
+ }
+ }
+
+ public Point Location {
+ get {
+ return new Point(col, line);
+ }
+ }
+
+ public Token()
+ {
+ }
+
+ public Token(int kind)
+ {
+ this.kind = kind;
+ }
+
+ public Token(int kind, int col, int line, string val)
+ {
+ this.kind = kind;
+ this.col = col;
+ this.line = line;
+ this.val = val;
+ }
+
+ public Token(int kind, int col, int line, string val, object literalValue)
+ {
+ this.kind = kind;
+ this.col = col;
+ this.line = line;
+ this.val = val;
+ this.literalValue = literalValue;
+ }
+ }
+
+ public class Lexer
+ {
+ IReader reader;
+ static Hashtable keywords = new Hashtable();
+
+ int col = 1;
+ int line = 1;
+
+ bool lineEnd = false;
+
+ Errors errors = new Errors();
+
+ SpecialTracker specialTracker = new SpecialTracker();
+
+ Token lastToken = null;
+ Token curToken = null;
+ Token peekToken = null;
+
+ string[] specialCommentTags = null;
+ Hashtable specialCommentHash = null;
+ ArrayList tagComments = new ArrayList();
+
+ public ArrayList TagComments
+ {
+ get {
+ return tagComments;
+ }
+ }
+
+ public string[] SpecialCommentTags
+ {
+ get {
+ return specialCommentTags;
+ }
+ set {
+ specialCommentTags = value;
+ specialCommentHash = new Hashtable();
+ if (specialCommentTags != null) {
+ foreach (string str in specialCommentTags) {
+ specialCommentHash[str] = 0;
+ }
+ }
+ }
+ }
+
+ public SpecialTracker SpecialTracker
+ {
+ get {
+ return specialTracker;
+ }
+ }
+
+ public Errors Errors
+ {
+ get {
+ return errors;
+ }
+ }
+
+ public Token Token
+ {
+ get {
+ return lastToken;
+ }
+ }
+
+ public Token LookAhead
+ {
+ get {
+ return curToken;
+ }
+ }
+
+ public void StartPeek()
+ {
+ peekToken = curToken;
+ }
+
+ public Token Peek()
+ {
+ if (peekToken.next == null) {
+ peekToken.next = Next();
+ specialTracker.InformToken(peekToken.next.kind);
+ }
+ peekToken = peekToken.next;
+ return peekToken;
+ }
+
+ public Token NextToken()
+ {
+ if (curToken == null) { // first call of NextToken()
+ curToken = Next();
+ specialTracker.InformToken(curToken.kind);
+ return curToken;
+ }
+
+ lastToken = curToken;
+
+ if (curToken.next == null) {
+ curToken.next = Next();
+ specialTracker.InformToken(curToken.next.kind);
+ }
+
+ curToken = curToken.next;
+
+ if (curToken.kind == Tokens.EOF && !(lastToken.kind == Tokens.EOL)) { // be sure that before EOF there is an EOL token
+ curToken = new Token(Tokens.EOL, curToken.col, curToken.line, "\n");
+ curToken.next = new Token(Tokens.EOF, curToken.col, curToken.line, "\n");
+ specialTracker.InformToken(curToken.next.kind);
+ }
+
+ return curToken;
+ }
+
+ public ArrayList RetriveComments()
+ {
+ return specialTracker.RetrieveSpecials();
+ }
+
+// public ArrayList RetrieveSpecials()
+// {
+// if (lastToken == null) {
+// return this.specialTracker.RetrieveSpecials();
+// }
+//
+// Debug.Assert(lastToken.specials != null);
+//
+// ArrayList tmp = lastToken.specials;
+// lastToken.specials = null;
+// return tmp;
+// }
+//
+ public Lexer(IReader reader)
+ {
+ this.reader = reader;
+ }
+
+ public Token Next()
+ {
+ while (!reader.Eos()) {
+
+ char ch = reader.GetNext();
+
+ ++col;
+ if (Char.IsWhiteSpace(ch)) {
+
+ if (ch == '\n') {
+ int x = col - 1;
+ int y = line;
+ ++line;
+ col = 1;
+ if (reader.Peek() == '\r') {
+ reader.GetNext();
+ if (!lineEnd) {
+ lineEnd = true;
+ return new Token(Tokens.EOL, x -1 , y, "\n\r");
+ }
+ }
+ if (!lineEnd) {
+ lineEnd = true;
+ return new Token(Tokens.EOL, x, y, "\n");
+ }
+ }
+ continue;
+
+ }
+ if (ch == '_') {
+ if (reader.Eos()) {
+ errors.Error(line, col, String.Format("No EOF expected after _"));
+ }
+ ch = reader.GetNext();
+ ++col;
+ if (!Char.IsWhiteSpace(ch)) {
+ reader.UnGet();
+ --col;
+ int x = col;
+ int y = line;
+ string s = ReadIdent('_');
+ lineEnd = false;
+
+ return new Token(Tokens.Identifier, x, y, s);
+ }
+ while (Char.IsWhiteSpace(ch)) {
+ if (ch == '\n') {
+ ++line;
+ col = 0;
+ break;
+ }
+ if (!reader.Eos()) {
+ ch = reader.GetNext();
+ ++col;
+ }
+ }
+ if (ch != '\n') {
+ errors.Error(line, col, String.Format("Return expected"));
+ }
+ continue;
+ }
+
+ if (ch == '#') {
+ while (Char.IsWhiteSpace(reader.Peek())) {
+ ++col;
+ reader.GetNext();
+ }
+ if (Char.IsDigit(reader.Peek())) {
+ int x = col;
+ int y = line;
+ string s = ReadDate();
+ DateTime time = DateTime.Now;
+ try {
+ time = System.DateTime.Parse(s, System.Globalization.CultureInfo.InvariantCulture);
+ } catch (Exception e) {
+ errors.Error(line, col, String.Format("Invalid date time {0}", e));
+ }
+ return new Token(Tokens.LiteralDate, x, y, s, time);
+ } else {
+ ReadPreprocessorDirective();
+ continue;
+ }
+ }
+
+ if (ch == '[') { // Identifier
+ lineEnd = false;
+ if (reader.Eos()) {
+ errors.Error(line, col, String.Format("Identifier expected"));
+ }
+ ch = reader.GetNext();
+ ++col;
+ if (ch == ']' || Char.IsWhiteSpace(ch)) {
+ errors.Error(line, col, String.Format("Identifier expected"));
+ }
+ int x = col - 1;
+ int y = line;
+ string s = ReadIdent(ch);
+ if (reader.Eos()) {
+ errors.Error(line, col, String.Format("']' expected"));
+ }
+ ch = reader.GetNext();
+ ++col;
+ if (!(ch == ']')) {
+ errors.Error(line, col, String.Format("']' expected"));
+ }
+// Console.WriteLine(">" + s + "<");
+ return new Token(Tokens.Identifier, x, y, s);
+ }
+ if (Char.IsLetter(ch)) {
+ int x = col - 1;
+ int y = line;
+ string s = ReadIdent(ch);
+ if (Keywords.IsKeyword(s)) {
+ lineEnd = false;
+ return new Token(Keywords.GetToken(s), x, y, s);
+ }
+
+ // handle 'REM' comments
+ if (s.ToUpper() == "REM") {
+ ReadComment();
+ if (!lineEnd) {
+ lineEnd = true;
+ return new Token(Tokens.EOL, x, y, "\n");
+ }
+ continue;
+ }
+
+ lineEnd = false;
+ return new Token(Tokens.Identifier, x, y, s);
+
+ }
+ if (Char.IsDigit(ch)) {
+ lineEnd = false;
+ return ReadDigit(ch, col);
+ }
+ if (ch == '&') {
+ lineEnd = false;
+ if (reader.Eos()) {
+ return ReadOperator('&');
+ }
+ ch = reader.GetNext();
+ ++col;
+ if (Char.ToUpper(ch) == 'H' || Char.ToUpper(ch) == 'O') {
+ reader.UnGet();
+ --col;
+ return ReadDigit('&', col);
+ } else {
+ reader.UnGet();
+ return ReadOperator('&');
+ }
+ }
+ if (ch == '\'') {
+ int x = col - 1;
+ int y = line;
+ ReadComment();
+ if (!lineEnd) {
+ lineEnd = true;
+ return new Token(Tokens.EOL, x, y, "\n");
+ }
+ continue;
+ }
+ if (ch == '"') {
+ lineEnd = false;
+ int x = col - 1;
+ int y = line;
+ string s = ReadString();
+ if (!reader.Eos() && (reader.Peek() == 'C' || reader.Peek() == 'c')) {
+ reader.GetNext();
+ ++col;
+ if (s.Length != 1) {
+ errors.Error(line, col, String.Format("Chars can only have Length 1 "));
+ }
+ return new Token(Tokens.LiteralCharacter, x, y, String.Concat('"', s , "\"C") , s[0]);
+ }
+ return new Token(Tokens.LiteralString, x, y, String.Concat('"', s , '"'), s);
+ }
+ Token token = ReadOperator(ch);
+ if (token != null) {
+ lineEnd = false;
+ return token;
+ }
+ errors.Error(line, col, String.Format("Unknown char({0}) which can't be read", ch));
+ }
+
+ return new Token(Tokens.EOF);
+ }
+
+ string ReadIdent(char ch)
+ {
+ StringBuilder s = new StringBuilder(ch.ToString());
+ while (!reader.Eos() && (Char.IsLetterOrDigit(ch = reader.GetNext()) || ch == '_')) {
+ ++col;
+ s.Append(ch.ToString());
+ }
+ ++col;
+ if (reader.Eos()) {
+ --col;
+ return s.ToString();
+ }
+ reader.UnGet();
+ --col;
+ if (!reader.Eos() && "%&@!#$".IndexOf(Char.ToUpper(reader.Peek())) != -1) {
+ reader.GetNext();
+ ++col;
+ }
+ return s.ToString();
+ }
+
+ Token ReadDigit(char ch, int x)
+ {
+ StringBuilder sb = new StringBuilder(ch.ToString());
+ int y = line;
+ string digit = "";
+ if (ch != '&') {
+ digit += ch;
+ }
+
+ bool ishex = false;
+ bool isokt = false;
+ bool issingle = false;
+ bool isdouble = false;
+ bool isdecimal = false;
+
+ if (reader.Eos()) {
+ if (ch == '&') {
+ errors.Error(line, col, String.Format("digit expected"));
+ }
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString() ,ch - '0');
+ }
+ if (ch == '&' && Char.ToUpper(reader.Peek()) == 'H') {
+ const string hex = "0123456789ABCDEF";
+ sb.Append(reader.GetNext()); // skip 'H'
+ ++col;
+ while (!reader.Eos() && hex.IndexOf(Char.ToUpper(reader.Peek())) != -1) {
+ ch = reader.GetNext();
+ sb.Append(ch);
+ digit += Char.ToUpper(ch);
+ ++col;
+ }
+ ishex = true;
+ } else if (!reader.Eos() && ch == '&' && Char.ToUpper(reader.Peek()) == 'O') {
+ const string okt = "01234567";
+ sb.Append(reader.GetNext()); // skip 'O'
+ ++col;
+ while (!reader.Eos() && okt.IndexOf(Char.ToUpper(reader.Peek())) != -1) {
+ ch = reader.GetNext();
+ sb.Append(ch);
+ digit += Char.ToUpper(ch);
+ ++col;
+ }
+ isokt = true;
+ } else {
+ while (!reader.Eos() && Char.IsDigit(reader.Peek())) {
+ ch = reader.GetNext();;
+ digit += ch;
+ sb.Append(ch);
+ ++col;
+ }
+ }
+ if (!reader.Eos() && "%&SIL".IndexOf(Char.ToUpper(reader.Peek())) != -1 || ishex || isokt) {
+ ch = reader.GetNext();
+ sb.Append(ch);
+ ch = Char.ToUpper(ch);
+ ++col;
+ if (isokt) {
+ long number = 0L;
+ for (int i = 0; i < digit.Length; ++i) {
+ number = number * 8 + digit[i] - '0';
+ }
+ if (ch == 'S') {
+ return new Token(Tokens.LiteralSingle, x, y, sb.ToString(), (short)number);
+ } else if (ch == '%' || ch == 'I') {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
+ } else if (ch == '&' || ch == 'L') {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (long)number);
+ } else {
+ if (number > int.MaxValue || number < int.MinValue) {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (long)number);
+ } else {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
+ }
+ }
+ }
+ if (ch == 'S') {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int16.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+ } else if (ch == '%' || ch == 'I') {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+ } else if (ch == '&' || ch == 'L') {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+ } else if (ishex) {
+ reader.UnGet();
+ --col;
+ long number = Int64.Parse(digit, NumberStyles.HexNumber);
+ if (number > int.MaxValue || number < int.MinValue) {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), number);
+ } else {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), (int)number);
+ }
+ }
+ }
+ if (!reader.Eos() && reader.Peek() == '.') { // read floating point number
+ reader.GetNext();
+ if (!Char.IsDigit(reader.Peek())) {
+ reader.UnGet();
+ } else {
+ isdouble = true; // double is default
+ if (ishex || isokt) {
+ errors.Error(line, col, String.Format("No hexadecimal or oktadecimal floating point values allowed"));
+ }
+ digit += '.';
+ ++col;
+ while (!reader.Eos() && Char.IsDigit(reader.Peek())){ // read decimal digits beyond the dot
+ digit += reader.GetNext();
+ ++col;
+ }
+ }
+ }
+
+ if (!reader.Eos() && Char.ToUpper(reader.Peek()) == 'E') { // read exponent
+ isdouble = true;
+ digit += reader.GetNext();
+ ++col;
+ if (!reader.Eos() && (reader.Peek() == '-' || reader.Peek() == '+')) {
+ digit += reader.GetNext();
+ ++col;
+ }
+ while (!reader.Eos() && Char.IsDigit(reader.Peek())) { // read exponent value
+ digit += reader.GetNext();
+ ++col;
+ }
+ }
+
+ if (!reader.Eos()) {
+ if (Char.ToUpper(reader.Peek()) == 'R' || Char.ToUpper(reader.Peek()) == '#') { // double type suffix (obsolete, double is default)
+ reader.GetNext();
+ ++col;
+ isdouble = true;
+ } else if (Char.ToUpper(reader.Peek()) == 'D' || Char.ToUpper(reader.Peek()) == '@') { // decimal value
+ reader.GetNext();
+ ++col;
+ isdecimal = true;
+ } else if (Char.ToUpper(reader.Peek()) == 'F' || Char.ToUpper(reader.Peek()) == '!') { // decimal value
+ reader.GetNext();
+ ++col;
+ issingle = true;
+ }
+ }
+
+ if (issingle) {
+ NumberFormatInfo mi = new NumberFormatInfo();
+ mi.CurrencyDecimalSeparator = ".";
+ return new Token(Tokens.LiteralSingle, x, y, sb.ToString(), Single.Parse(digit, mi));
+ }
+ if (isdecimal) {
+ NumberFormatInfo mi = new NumberFormatInfo();
+ mi.CurrencyDecimalSeparator = ".";
+ return new Token(Tokens.LiteralDecimal, x, y, sb.ToString(), Decimal.Parse(digit, mi));
+ }
+ if (isdouble) {
+ NumberFormatInfo mi = new NumberFormatInfo();
+ mi.CurrencyDecimalSeparator = ".";
+ return new Token(Tokens.LiteralDouble, x, y, sb.ToString(), Double.Parse(digit, mi));
+ }
+ try {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int32.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+ } catch (Exception) {
+ try {
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), Int64.Parse(digit, ishex ? NumberStyles.HexNumber : NumberStyles.Number));
+ } catch (Exception) {
+ errors.Error(line, col, String.Format("{0} is not a parseable number (too long?)", sb.ToString()));
+ // fallback, when nothing helps :)
+ return new Token(Tokens.LiteralInteger, x, y, sb.ToString(), 0);
+ }
+ }
+ }
+
+ void ReadPreprocessorDirective()
+ {
+ Point start = new Point(col - 1, line);
+ string directive = ReadIdent('#');
+ string argument = ReadToEOL();
+ this.specialTracker.AddPreProcessingDirective(directive, argument.Trim(), start, new Point(start.X + directive.Length + argument.Length, start.Y));
+ }
+
+ string ReadToEOL()
+ {
+ StringBuilder sb = new StringBuilder();
+ if (!reader.Eos()) {
+ char ch = reader.GetNext();
+ while (!reader.Eos()) {
+ if (ch == '\r') {
+ if (reader.Peek() == '\n') {
+ ch = reader.GetNext();
+ }
+ }
+ if (ch == '\n') {
+ ++line;
+ col = 1;
+ return sb.ToString();
+ } else {
+ sb.Append(ch);
+ }
+ ch = reader.GetNext();
+ ++col;
+ }
+ }
+ return sb.ToString();
+ }
+
+ string ReadDate()
+ {
+ char ch = '\0';
+ StringBuilder sb = new StringBuilder();
+ while (!reader.Eos()) {
+ ch = reader.GetNext();
+ ++col;
+ if (ch == '#') {
+ break;
+ } else if (ch == '\n') {
+ errors.Error(line, col, String.Format("No return allowed inside Date literal"));
+ } else {
+ sb.Append(ch);
+ }
+ }
+ if (ch != '#') {
+ errors.Error(line, col, String.Format("End of File reached before Date literal terminated"));
+ }
+ return sb.ToString();
+ }
+
+ string ReadString()
+ {
+ char ch = '\0';
+ StringBuilder s = new StringBuilder();
+ while (!reader.Eos()) {
+ ch = reader.GetNext();
+ ++col;
+ if (ch == '"') {
+ if (!reader.Eos() && reader.Peek() == '"') {
+ s.Append('"');
+ reader.GetNext();
+ ++col;
+ } else {
+ break;
+ }
+ } else if (ch == '\n') {
+ errors.Error(line, col, String.Format("No return allowed inside String literal"));
+ } else {
+ s.Append(ch);
+ }
+ }
+ if (ch != '"') {
+ errors.Error(line, col, String.Format("End of File reached before String terminated "));
+ }
+ return s.ToString();
+ }
+
+ protected bool HandleLineEnd(char ch)
+ {
+ if (WasLineEnd(ch)) {
+ ++line;
+ col = 1;
+ return true;
+ }
+ return false;
+ }
+
+ protected bool WasLineEnd(char ch)
+ {
+ // Handle MS-DOS or MacOS line ends.
+ if (ch == '\r') {
+ if (reader.Peek() == '\n') { // MS-DOS line end '\r\n'
+ ch = (char)reader.GetNext();
+ } else { // assume MacOS line end which is '\r'
+ ch = '\n';
+ }
+ }
+ return ch == '\n';
+ }
+
+ void ReadComment()
+ {
+ StringBuilder curWord = new StringBuilder();
+ StringBuilder comment = new StringBuilder();
+
+ int nextChar;
+ while ((nextChar = reader.GetNext()) != -1) {
+ char ch = (char)nextChar;
+ comment.Append(ch);
+ ++col;
+ if (HandleLineEnd(ch) || nextChar == 0) {
+ specialTracker.StartComment(CommentType.SingleLine, new Point(col, line));
+ specialTracker.AddString(comment.ToString());
+ specialTracker.FinishComment();
+ return;
+ }
+
+ if (Char.IsLetter(ch)) {
+ curWord.Append(ch);
+ } else {
+ string tag = curWord.ToString();
+ curWord = new StringBuilder();
+ if (specialCommentHash != null && specialCommentHash[tag] != null) {
+ Point p = new Point(col, line);
+ string commentStr = ReadToEOL();
+ tagComments.Add(new TagComment(tag, commentStr, p));
+ return;
+ }
+ }
+ }
+ }
+
+ Token ReadOperator(char ch)
+ {
+ int x = col;
+ int y = line;
+ switch(ch) {
+ case '+':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.PlusAssign, x, y, "+=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.Plus, x, y, "+");
+ case '-':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.MinusAssign, x, y, "-=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.Minus, x, y, "-");
+ case '*':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.TimesAssign, x, y, "*=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.Times, x, y, "*");
+ case '/':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.DivAssign, x, y, "/=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.Div, x, y, "/");
+ case '\\':
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.DivIntegerAssign, x, y, "\\=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ return new Token(Tokens.DivInteger, x, y, "\\");
+ case '&':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.ConcatStringAssign, x, y, "&=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.ConcatString, x, y, "&");
+ case '^':
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.PowerAssign, x, y, "^=");
+ default:
+ reader.UnGet();
+ break;
+ }
+ return new Token(Tokens.Power, x, y, "^");
+ case ':':
+ return new Token(Tokens.Colon, x, y, ":");
+ case '=':
+ return new Token(Tokens.Assign, x, y, "=");
+ case '<':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.LessEqual, x, y, "<=");
+ case '>':
+ ++col;
+ return new Token(Tokens.NotEqual, x, y, "<>");
+ case '<':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ col += 2;
+ return new Token(Tokens.ShiftLeftAssign, x, y, "<<=");
+ default:
+ ++col;
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.ShiftLeft, x, y, "<<");
+ default:
+ reader.UnGet();
+ return new Token(Tokens.LessThan, x, y, "<");
+ }
+ }
+ return new Token(Tokens.LessThan, x, y, "<");
+ case '>':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ ++col;
+ return new Token(Tokens.GreaterEqual, x, y, ">=");
+ case '>':
+ if (!reader.Eos()) {
+ switch (reader.GetNext()) {
+ case '=':
+ col += 2;
+ return new Token(Tokens.ShiftRightAssign, x, y, ">>=");
+ default:
+ ++col;
+ reader.UnGet();
+ break;
+ }
+ }
+ return new Token(Tokens.ShiftRight, x, y, ">>");
+ default:
+ reader.UnGet();
+ return new Token(Tokens.GreaterThan, x, y, ">");
+ }
+ }
+ return new Token(Tokens.GreaterThan, x, y, "<=");
+ case ',':
+ return new Token(Tokens.Comma, x, y, ",");
+ case '.':
+ if (Char.IsDigit(reader.Peek())) {
+ reader.UnGet();
+ --col;
+ return ReadDigit('0', col);
+ }
+ return new Token(Tokens.Dot, x, y, ".");
+ case '(':
+ return new Token(Tokens.OpenParenthesis, x, y, "(");
+ case ')':
+ return new Token(Tokens.CloseParenthesis, x, y, ")");
+ case '{':
+ return new Token(Tokens.OpenCurlyBrace, x, y, "{");
+ case '}':
+ return new Token(Tokens.CloseCurlyBrace, x, y, "}");
+ case '[':
+ return new Token(Tokens.OpenSquareBracket, x, y, "[");
+ case ']':
+ return new Token(Tokens.CloseSquareBracket, x, y, "]");
+ }
+ return null;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Lexer.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,53 +1,53 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class FileReader : IReader
- {
- string file = null;
- int ptr = 0;
-
- public FileReader(string filename)
- {
- StreamReader sreader = File.OpenText(filename);
- file = sreader.ReadToEnd();
- sreader.Close();
- }
-
- public char GetNext()
- {
- if (Eos()) {
- return '\0';
-// throw new ParserException("warning : FileReader.GetNext : Read char over eos.", 0, 0);
- }
- return file[ptr++];
- }
-
- public char Peek()
- {
- if (Eos()) {
- return '\0';
-// throw new ParserException("warning : FileReader.Peek : Read char over eos.", 0, 0);
- }
- return file[ptr];
- }
-
- public void UnGet()
- {
- ptr = Math.Max(0, ptr -1);
- }
-
- public bool Eos()
- {
- return ptr >= file.Length;
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class FileReader : IReader
+ {
+ string file = null;
+ int ptr = 0;
+
+ public FileReader(string filename)
+ {
+ StreamReader sreader = File.OpenText(filename);
+ file = sreader.ReadToEnd();
+ sreader.Close();
+ }
+
+ public char GetNext()
+ {
+ if (Eos()) {
+ return '\0';
+// throw new ParserException("warning : FileReader.GetNext : Read char over eos.", 0, 0);
+ }
+ return file[ptr++];
+ }
+
+ public char Peek()
+ {
+ if (Eos()) {
+ return '\0';
+// throw new ParserException("warning : FileReader.Peek : Read char over eos.", 0, 0);
+ }
+ return file[ptr];
+ }
+
+ public void UnGet()
+ {
+ ptr = Math.Max(0, ptr -1);
+ }
+
+ public bool Eos()
+ {
+ return ptr >= file.Length;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/FileReader.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,19 +1,19 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public interface IReader
- {
- char GetNext();
- char Peek();
-
- void UnGet();
-
- bool Eos();
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public interface IReader
+ {
+ char GetNext();
+ char Peek();
+
+ void UnGet();
+
+ bool Eos();
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/IReader.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,49 +1,49 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class StringReader : IReader
- {
- string data = null;
- int ptr = 0;
-
- public StringReader(string data)
- {
- this.data = data;
- }
-
- public char GetNext()
- {
- if (Eos()) {
- return '\n';
- }
- return data[ptr++];
- }
-
- public char Peek()
- {
- if (Eos()) {
- return '\n';
- }
- return data[ptr];
- }
-
- public void UnGet()
- {
- ptr = Math.Max(0, ptr -1);
- }
-
- public bool Eos()
- {
- return ptr >= data.Length;
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Andrea Paatz" email="andrea at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class StringReader : IReader
+ {
+ string data = null;
+ int ptr = 0;
+
+ public StringReader(string data)
+ {
+ this.data = data;
+ }
+
+ public char GetNext()
+ {
+ if (Eos()) {
+ return '\n';
+ }
+ return data[ptr++];
+ }
+
+ public char Peek()
+ {
+ if (Eos()) {
+ return '\n';
+ }
+ return data[ptr];
+ }
+
+ public void UnGet()
+ {
+ ptr = Math.Max(0, ptr -1);
+ }
+
+ public bool Eos()
+ {
+ return ptr >= data.Length;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Reader/StringReader.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,49 +1,49 @@
-using System;
-using System.Text;
-using System.CodeDom;
-using System.Collections;
-using System.Drawing;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class Comment
- {
- CommentType commentType;
- string comment;
- Point startPosition;
-
- public CommentType CommentType {
- get {
- return commentType;
- }
- set {
- commentType = value;
- }
- }
-
- public string CommentText {
- get {
- return comment;
- }
- set {
- comment = value;
- }
- }
-
- public Point StartPosition {
- get {
- return startPosition;
- }
- set {
- startPosition = value;
- }
- }
-
- public Comment(CommentType commentType, string comment, Point startPosition)
- {
- this.commentType = commentType;
- this.comment = comment;
- this.startPosition = startPosition;
- }
- }
-}
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+using System.Drawing;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class Comment
+ {
+ CommentType commentType;
+ string comment;
+ Point startPosition;
+
+ public CommentType CommentType {
+ get {
+ return commentType;
+ }
+ set {
+ commentType = value;
+ }
+ }
+
+ public string CommentText {
+ get {
+ return comment;
+ }
+ set {
+ comment = value;
+ }
+ }
+
+ public Point StartPosition {
+ get {
+ return startPosition;
+ }
+ set {
+ startPosition = value;
+ }
+ }
+
+ public Comment(CommentType commentType, string comment, Point startPosition)
+ {
+ this.commentType = commentType;
+ this.comment = comment;
+ this.startPosition = startPosition;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/Comment.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,13 +1,13 @@
-using System;
-using System.Text;
-using System.CodeDom;
-using System.Collections;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public enum CommentType
- {
- REM,
- SingleLine
- }
-}
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public enum CommentType
+ {
+ REM,
+ SingleLine
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/CommentType.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,14 +1,14 @@
-using System;
-using System.Text;
-using System.CodeDom;
-using System.Collections;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class NewLine
- {
- public NewLine()
- {
- }
- }
-}
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class NewLine
+ {
+ public NewLine()
+ {
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/NewLine.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,61 +1,61 @@
-using System;
-using System.Drawing;
-using System.Text;
-using System.CodeDom;
-using System.Collections;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class PreProcessingDirective
- {
- string cmd;
- string arg;
- Point start;
- Point end;
-
- public Point Start {
- get {
- return start;
- }
- set {
- start = value;
- }
- }
-
- public Point End {
- get {
- return end;
- }
- set {
- end = value;
- }
- }
-
- public string Cmd {
- get {
- return cmd;
- }
- set {
- cmd = value;
- }
- }
-
- public string Arg {
- get {
- return arg;
- }
- set {
- arg = value;
- }
- }
-
- public PreProcessingDirective(string cmd, string arg, Point start, Point end)
- {
- this.cmd = cmd;
- this.arg = arg;
- this.start = start;
- this.end = end;
- }
- }
-}
-
+using System;
+using System.Drawing;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class PreProcessingDirective
+ {
+ string cmd;
+ string arg;
+ Point start;
+ Point end;
+
+ public Point Start {
+ get {
+ return start;
+ }
+ set {
+ start = value;
+ }
+ }
+
+ public Point End {
+ get {
+ return end;
+ }
+ set {
+ end = value;
+ }
+ }
+
+ public string Cmd {
+ get {
+ return cmd;
+ }
+ set {
+ cmd = value;
+ }
+ }
+
+ public string Arg {
+ get {
+ return arg;
+ }
+ set {
+ arg = value;
+ }
+ }
+
+ public PreProcessingDirective(string cmd, string arg, Point start, Point end)
+ {
+ this.cmd = cmd;
+ this.arg = arg;
+ this.start = start;
+ this.end = end;
+ }
+ }
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/PreProcessingDirective.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,79 +1,79 @@
-using System;
-using System.Text;
-using System.CodeDom;
-using System.Collections;
-using System.Drawing;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class SpecialTracker
- {
- ArrayList currentSpecials = new ArrayList();
- ArrayList tempComments = new ArrayList();
-
- CommentType currentCommentType;
- StringBuilder sb = new StringBuilder();
- Point startPosition;
-
- public ArrayList CurrentSpecials
- {
- get {
- return currentSpecials;
- }
- }
-
- public void InformToken(int kind)
- {
- currentSpecials.Add(kind);
- }
-
- public ArrayList RetrieveSpecials()
- {
- ArrayList tmp = currentSpecials;
- currentSpecials = new ArrayList();
- return tmp;
- }
-
- public ArrayList RetreiveComments()
- {
- ArrayList tmp = tempComments;
- tempComments = new ArrayList();
- return tmp;
- }
-
- public void AddEndOfLine()
- {
- currentSpecials.Add(new NewLine());
- }
-
- public void AddPreProcessingDirective(string cmd, string arg, Point start, Point end)
- {
- currentSpecials.Add(new PreProcessingDirective(cmd, arg, start, end));
- }
-
- // used for comment tracking
- public void StartComment(CommentType commentType, Point startPosition)
- {
- this.currentCommentType = commentType;
- this.startPosition = startPosition;
- this.sb.Length = 0;
- }
-
- public void AddChar(char c)
- {
- sb.Append(c);
- }
-
- public void AddString(string s)
- {
- sb.Append(s);
- }
-
- public void FinishComment()
- {
- Comment comment = new Comment(currentCommentType, sb.ToString(), startPosition);
- currentSpecials.Add(comment);
- tempComments.Add(comment);
- }
- }
-}
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+using System.Drawing;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class SpecialTracker
+ {
+ ArrayList currentSpecials = new ArrayList();
+ ArrayList tempComments = new ArrayList();
+
+ CommentType currentCommentType;
+ StringBuilder sb = new StringBuilder();
+ Point startPosition;
+
+ public ArrayList CurrentSpecials
+ {
+ get {
+ return currentSpecials;
+ }
+ }
+
+ public void InformToken(int kind)
+ {
+ currentSpecials.Add(kind);
+ }
+
+ public ArrayList RetrieveSpecials()
+ {
+ ArrayList tmp = currentSpecials;
+ currentSpecials = new ArrayList();
+ return tmp;
+ }
+
+ public ArrayList RetreiveComments()
+ {
+ ArrayList tmp = tempComments;
+ tempComments = new ArrayList();
+ return tmp;
+ }
+
+ public void AddEndOfLine()
+ {
+ currentSpecials.Add(new NewLine());
+ }
+
+ public void AddPreProcessingDirective(string cmd, string arg, Point start, Point end)
+ {
+ currentSpecials.Add(new PreProcessingDirective(cmd, arg, start, end));
+ }
+
+ // used for comment tracking
+ public void StartComment(CommentType commentType, Point startPosition)
+ {
+ this.currentCommentType = commentType;
+ this.startPosition = startPosition;
+ this.sb.Length = 0;
+ }
+
+ public void AddChar(char c)
+ {
+ sb.Append(c);
+ }
+
+ public void AddString(string s)
+ {
+ sb.Append(s);
+ }
+
+ public void FinishComment()
+ {
+ Comment comment = new Comment(currentCommentType, sb.ToString(), startPosition);
+ currentSpecials.Add(comment);
+ tempComments.Add(comment);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/SpecialTracker.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,30 +1,30 @@
-using System;
-using System.Text;
-using System.CodeDom;
-using System.Collections;
-using System.Drawing;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- /// <summary>
- /// Description of TagComment.
- /// </summary>
- public class TagComment : Comment
- {
- string tag;
-
- public string Tag {
- get {
- return tag;
- }
- set {
- tag = value;
- }
- }
-
- public TagComment(string tag, string comment, Point startPosition) : base(CommentType.SingleLine, comment, startPosition)
- {
- this.tag = tag;
- }
- }
-}
+using System;
+using System.Text;
+using System.CodeDom;
+using System.Collections;
+using System.Drawing;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ /// <summary>
+ /// Description of TagComment.
+ /// </summary>
+ public class TagComment : Comment
+ {
+ string tag;
+
+ public string Tag {
+ get {
+ return tag;
+ }
+ set {
+ tag = value;
+ }
+ }
+
+ public TagComment(string tag, string comment, Point startPosition) : base(CommentType.SingleLine, comment, startPosition)
+ {
+ this.tag = tag;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Lexer/Specials/TagComment.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,41 +1,41 @@
-/*using System;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-class MainClass
-{
- public static void Main (string[] args) {
-
- string fileName = args[0];
-
- Console.WriteLine("Parsing source file {0}", fileName);
- IReader reader = new FileReader(fileName);
- Lexer lexer = new Lexer(reader);
-
-// while(true)
-// {
-// Token t = lexer.NextToken();
-// if(t.kind == Tokens.EOF) break;
-//
-// System.Console.WriteLine(t.val + "\t" + t.kind);
-// }
-
- Parser p = new Parser();
- p.Parse(lexer);
- if(p.Errors.count == 0) {
-// p.compilationUnit.AcceptVisitor(new DebugVisitor(), null);
- }
-
- System.Console.WriteLine("=======================");
- if (p.Errors.count == 1)
- Console.WriteLine("1 error dectected");
- else {
- Console.WriteLine("{0} errors dectected", p.Errors.count);
- }
-
- if(p.Errors.count != 0) {
- System.Console.WriteLine(p.Errors.ErrorOutput);
- }
- System.Console.WriteLine("=======================");
- }
-}*/
+/*using System;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+class MainClass
+{
+ public static void Main (string[] args) {
+
+ string fileName = args[0];
+
+ Console.WriteLine("Parsing source file {0}", fileName);
+ IReader reader = new FileReader(fileName);
+ Lexer lexer = new Lexer(reader);
+
+// while(true)
+// {
+// Token t = lexer.NextToken();
+// if(t.kind == Tokens.EOF) break;
+//
+// System.Console.WriteLine(t.val + "\t" + t.kind);
+// }
+
+ Parser p = new Parser();
+ p.Parse(lexer);
+ if(p.Errors.count == 0) {
+// p.compilationUnit.AcceptVisitor(new DebugVisitor(), null);
+ }
+
+ System.Console.WriteLine("=======================");
+ if (p.Errors.count == 1)
+ Console.WriteLine("1 error dectected");
+ else {
+ Console.WriteLine("{0} errors dectected", p.Errors.count);
+ }
+
+ if(p.Errors.count != 0) {
+ System.Console.WriteLine(p.Errors.ErrorOutput);
+ }
+ System.Console.WriteLine("=======================");
+ }
+}*/
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Main.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,678 +1,678 @@
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public abstract class AbstractASTVisitor : IASTVisitor
- {
- protected Stack blockStack = new Stack();
-
- public BlockStatement CurrentBlock {
- get {
- if (blockStack.Count == 0) {
- return null;
- }
- return (BlockStatement)blockStack.Peek();
- }
- }
-
- public virtual object Visit(INode node, object data)
- {
- Console.WriteLine("Warning, INode visited!");
- Console.WriteLine("Type is " + node.GetType());
- Console.WriteLine("Visitor is " + this.GetType());
- return node.AcceptChildren(this, data);
- }
-
- public virtual object Visit(CompilationUnit compilationUnit, object data)
- {
- if (compilationUnit == null) {
- return data;
- }
- return compilationUnit.AcceptChildren(this, data);
- }
-
- public virtual object Visit(NamespaceDeclaration namespaceDeclaration, object data)
- {
- return namespaceDeclaration.AcceptChildren(this, data);
- }
-
- public virtual object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data)
- {
- return data;
- }
-
- public virtual object Visit(OptionStrictDeclaration optionStrictDeclaration, object data)
- {
- return data;
- }
-
- public virtual object Visit(OptionCompareDeclaration optionCompareDeclaration, object data)
- {
- return data;
- }
-
- public virtual object Visit(ImportsStatement importsStatement, object data)
- {
- object ret = data;
- foreach (INode n in importsStatement.ImportClauses) {
- ret = n.AcceptVisitor(this, data);
- }
- return ret;
- }
-
- public virtual object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
- {
- return data;
- }
-
- public virtual object Visit(ImportsDeclaration importsDeclaration, object data)
- {
- return data;
- }
-
- public virtual object Visit(AttributeSection attributeSection, object data)
- {
- object ret = data;
- foreach (ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute a in attributeSection.Attributes) {
- ret = a.AcceptVisitor(this, data);
- }
- return ret;
- }
-
- public virtual object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data)
- {
- object ret = data;
- foreach (Expression e in attribute.PositionalArguments) {
- ret = e.AcceptVisitor(this, data);
- }
- foreach (NamedArgumentExpression n in attribute.NamedArguments) {
- ret = n.AcceptVisitor(this, data);
- }
- return ret;
- }
-
- public virtual object Visit(NamedArgumentExpression namedArgumentExpression, object data)
- {
- return namedArgumentExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(TypeReference typeReference, object data)
- {
- return data;
- }
-
- public virtual object Visit(TypeDeclaration typeDeclaration, object data)
- {
- foreach (AttributeSection a in typeDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- return typeDeclaration.AcceptChildren(this, data);
- }
-
- public virtual object Visit(DelegateDeclaration delegateDeclaration, object data)
- {
- foreach (AttributeSection a in delegateDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- if (delegateDeclaration.Parameters != null) {
- foreach (ParameterDeclarationExpression p in delegateDeclaration.Parameters) {
- p.AcceptVisitor(this, data);
- }
- }
- if (delegateDeclaration.ReturnType == null) {
- return data;
- }
- return delegateDeclaration.ReturnType.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(FieldDeclaration fieldDeclaration, object data)
- {
- foreach (AttributeSection a in fieldDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- if (fieldDeclaration.Fields != null) {
- foreach (VariableDeclaration v in fieldDeclaration.Fields) {
- v.AcceptVisitor(this, data);
- }
- }
- if (fieldDeclaration.TypeReference == null) {
- return data;
- }
- return fieldDeclaration.TypeReference.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(VariableDeclaration variableDeclaration, object data)
- {
- if (variableDeclaration.Initializer == null) {
- return data;
- }
- return variableDeclaration.Initializer.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
- {
- object ret = data;
- foreach (AttributeSection a in parameterDeclarationExpression.Attributes) {
- a.AcceptVisitor(this, data);
- }
- ret = parameterDeclarationExpression.TypeReference.AcceptVisitor(this, data);
- if (parameterDeclarationExpression.DefaultValue != null) {
- ret = parameterDeclarationExpression.DefaultValue.AcceptVisitor(this, data);
- }
- return ret;
- }
-
- public virtual object Visit(ConstructorDeclaration constructorDeclaration, object data)
- {
- blockStack.Push(constructorDeclaration.Body);
- foreach (AttributeSection a in constructorDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- if (constructorDeclaration.Parameters != null) {
- foreach (ParameterDeclarationExpression p in constructorDeclaration.Parameters) {
- p.AcceptVisitor(this, data);
- }
- }
- object ret = null;
- if (constructorDeclaration.Body != null) {
- ret = constructorDeclaration.Body.AcceptChildren(this, data);
- }
- blockStack.Pop();
- return ret;
- }
-
- public virtual object Visit(MethodDeclaration methodDeclaration, object data)
- {
- blockStack.Push(methodDeclaration.Body);
- foreach (AttributeSection a in methodDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- if (methodDeclaration.TypeReference != null) {
- methodDeclaration.TypeReference.AcceptVisitor(this, data);
- }
-
- if (methodDeclaration.Parameters != null) {
- foreach (ParameterDeclarationExpression p in methodDeclaration.Parameters) {
- p.AcceptVisitor(this, data);
- }
- }
-
- if (methodDeclaration.HandlesClause != null) {
- methodDeclaration.HandlesClause.AcceptVisitor(this, data);
- }
- if (methodDeclaration.ImplementsClause != null) {
- methodDeclaration.ImplementsClause.AcceptVisitor(this, data);
- }
- object ret = null;
- if (methodDeclaration.Body != null) {
- methodDeclaration.Body.AcceptChildren(this, data);
- }
- blockStack.Pop();
- return ret;
- }
-
- public virtual object Visit(DeclareDeclaration declareDeclaration, object data)
- {
- if (declareDeclaration != null) {
- if (declareDeclaration.Attributes != null) {
- foreach (AttributeSection a in declareDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- }
-
- if (declareDeclaration.ReturnType != null) {
- declareDeclaration.ReturnType.AcceptVisitor(this, data);
- }
-
- if (declareDeclaration.Parameters != null) {
- foreach (ParameterDeclarationExpression p in declareDeclaration.Parameters) {
- p.AcceptVisitor(this, data);
- }
- }
- }
- return data;
- }
-
- public virtual object Visit(PropertyDeclaration propertyDeclaration, object data)
- {
- foreach (AttributeSection a in propertyDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- propertyDeclaration.TypeReference.AcceptVisitor(this, data);
- if (propertyDeclaration.Parameters != null) {
- foreach (ParameterDeclarationExpression p in propertyDeclaration.Parameters) {
- p.AcceptVisitor(this, data);
- }
- }
- if (propertyDeclaration.ImplementsClause != null) {
- propertyDeclaration.ImplementsClause.AcceptVisitor(this, data);
- }
- if (propertyDeclaration.HasGetRegion) {
- propertyDeclaration.GetRegion.AcceptVisitor(this, data);
- }
- if (propertyDeclaration.HasSetRegion) {
- propertyDeclaration.SetRegion.AcceptVisitor(this, data);
- }
- return data;
- }
-
- public virtual object Visit(PropertyGetRegion propertyGetRegion, object data)
- {
- blockStack.Push(propertyGetRegion.Block);
- foreach (AttributeSection a in propertyGetRegion.Attributes) {
- a.AcceptVisitor(this, data);
- }
- object ret = null;
- if (propertyGetRegion.Block != null) {
- ret = propertyGetRegion.Block.AcceptChildren(this, data);
- }
- blockStack.Pop();
- return ret;
- }
-
- public virtual object Visit(PropertySetRegion propertySetRegion, object data)
- {
- blockStack.Push(propertySetRegion.Block);
- foreach (AttributeSection a in propertySetRegion.Attributes) {
- a.AcceptVisitor(this, data);
- }
- object ret = null;
- if (propertySetRegion.Block != null) {
- ret = propertySetRegion.Block.AcceptChildren(this, data);
- }
- blockStack.Pop();
- return ret;
- }
-
- public virtual object Visit(EventDeclaration eventDeclaration, object data)
- {
- foreach (AttributeSection a in eventDeclaration.Attributes) {
- a.AcceptVisitor(this, data);
- }
- eventDeclaration.TypeReference.AcceptVisitor(this, data);
- if (eventDeclaration.Parameters != null) {
- foreach (ParameterDeclarationExpression p in eventDeclaration.Parameters) {
- p.AcceptVisitor(this, data);
- }
- }
- if (eventDeclaration.ImplementsClause != null) {
- eventDeclaration.ImplementsClause.AcceptVisitor(this, data);
- }
- return data;
- }
-
- public virtual object Visit(BlockStatement blockStatement, object data)
- {
- if (blockStatement == null) {
- return null;
- }
- blockStack.Push(blockStatement);
- object ret = blockStatement.AcceptChildren(this, data);
- blockStack.Pop();
- return ret;
- }
-
- public virtual object Visit(Statement statement, object data)
- {
- Console.WriteLine("Warning, visited Statement!");
- return data;
- }
-
- public virtual object Visit(StatementExpression statementExpression, object data)
- {
- if (statementExpression.Expression == null) {
- return data;
- }
- return statementExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
- {
- object ret = data;
- if (localVariableDeclaration.Variables != null) {
- foreach (VariableDeclaration v in localVariableDeclaration.Variables) {
- ret = v.AcceptVisitor(this, data);
- }
- }
- return ret;
- }
-
- public virtual object Visit(SimpleIfStatement ifStatement, object data)
- {
- object ret = ifStatement.Condition.AcceptVisitor(this, data);
- if(ifStatement.Statements != null) {
- foreach (Statement s in ifStatement.Statements) {
- ret = s.AcceptVisitor(this, data);
- }
- }
- if(ifStatement.ElseStatements != null) {
- foreach (Statement s in ifStatement.ElseStatements) {
- ret = s.AcceptVisitor(this, data);
- }
- }
- return ret;
- }
-
- public virtual object Visit(IfStatement ifStatement, object data)
- {
- object ret = ifStatement.Condition.AcceptVisitor(this, data);
- if(ifStatement.ElseIfStatements != null) {
- foreach (Statement s in ifStatement.ElseIfStatements) {
- ret = s.AcceptVisitor(this, data);
- }
- }
- if (ifStatement.EmbeddedElseStatement != null) {
- ret = ifStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
- }
- return ret;
- }
-
- public virtual object Visit(LabelStatement labelStatement, object data)
- {
- if (labelStatement.EmbeddedStatement == null) {
- return null;
- }
- return labelStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(GoToStatement goToStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(SelectStatement selectStatement, object data)
- {
- selectStatement.SelectExpression.AcceptVisitor(this, data);
- if (selectStatement.SelectSections != null) {
- foreach (SelectSection s in selectStatement.SelectSections) {
- s.AcceptVisitor(this, data);
- }
- }
- return data;
- }
-
- public virtual object Visit(SelectSection selectSection, object data)
- {
- if (selectSection.CaseClauses != null) {
- foreach (CaseClause c in selectSection.CaseClauses) {
- c.AcceptVisitor(this, data);
- }
- }
- return data;
- }
-
- public virtual object Visit(CaseClause caseClause, object data)
- {
- caseClause.ComparisonExpression.AcceptVisitor(this, data);
- return caseClause.BoundaryExpression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(ExitStatement exitStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(EndStatement endStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(StopStatement stopStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(ResumeStatement resumeStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(ErrorStatement errorStatement, object data)
- {
- return errorStatement.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(OnErrorStatement onErrorStatement, object data)
- {
- return onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(EraseStatement eraseStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(ReDimStatement reDimStatement, object data)
- {
- return data;
- }
-
- public virtual object Visit(AddHandlerStatement addHandlerStatement, object data)
- {
- addHandlerStatement.EventExpression.AcceptVisitor(this, data);
- addHandlerStatement.HandlerExpression.AcceptVisitor(this, data);
- return data;
- }
-
- public virtual object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
- {
- removeHandlerStatement.EventExpression.AcceptVisitor(this, data);
- removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data);
- return data;
- }
-
- public virtual object Visit(ReturnStatement returnStatement, object data)
- {
- return returnStatement.ReturnExpression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(RaiseEventStatement raiseEventStatement, object data)
- {
- if (raiseEventStatement.Parameters != null) {
- foreach (INode node in raiseEventStatement.Parameters) {
- node.AcceptVisitor(this, data);
- }
- }
- return data;
- }
-
- public virtual object Visit(WhileStatement whileStatement, object data)
- {
- if (whileStatement.EmbeddedStatement == null) {
- return null;
- }
- return whileStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(WithStatement withStatement, object data)
- {
- if (withStatement.WithExpression != null) {
- withStatement.WithExpression.AcceptVisitor(this, data);
- }
-
- if (withStatement.Body == null) {
- return null;
- }
- return withStatement.Body.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(DoLoopStatement doLoopStatement, object data)
- {
- if (doLoopStatement.EmbeddedStatement == null) {
- return null;
- }
- return doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
- public virtual object Visit(ForStatement forStatement, object data)
- {
- if (forStatement.EmbeddedStatement == null) {
- return null;
- }
- return forStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(ForeachStatement foreachStatement, object data)
- {
- if (foreachStatement.EmbeddedStatement == null) {
- return null;
- }
- return foreachStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
- public virtual object Visit(LockStatement lockStatement, object data)
- {
- if (lockStatement.EmbeddedStatement == null) {
- return null;
- }
- return lockStatement.EmbeddedStatement.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(TryCatchStatement tryCatchStatement, object data)
- {
- if (tryCatchStatement.StatementBlock == null) {
- return null;
- }
- return tryCatchStatement.StatementBlock.AcceptVisitor(this, data);
- }
- public virtual object Visit(ThrowStatement throwStatement, object data)
- {
- if (throwStatement.ThrowExpression == null) {
- return null;
- }
- return throwStatement.ThrowExpression.AcceptVisitor(this, data);
- }
-
-#region Expressions
- public virtual object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data)
- {
- if (fieldReferenceOrInvocationExpression.TargetObject == null) {
- return null;
- }
- return fieldReferenceOrInvocationExpression.TargetObject.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(PrimitiveExpression primitiveExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
- {
- // visit but can't give back 2 values
- binaryOperatorExpression.Left.AcceptVisitor(this, data);
- binaryOperatorExpression.Right.AcceptVisitor(this, data);
-
- return data;
- }
- public virtual object Visit(ParenthesizedExpression parenthesizedExpression, object data)
- {
- return parenthesizedExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(InvocationExpression invocationExpression, object data)
- {
- if (invocationExpression.TargetObject == null) {
- return data;
- }
- return invocationExpression.TargetObject.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(IdentifierExpression identifierExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(TypeReferenceExpression typeReferenceExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
- {
- return unaryOperatorExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(AssignmentExpression assignmentExpression, object data)
- {
- // visit but can't give back 2 values
- assignmentExpression.Left.AcceptVisitor(this, data);
- assignmentExpression.Right.AcceptVisitor(this, data);
-
- return data;
- }
-
- public virtual object Visit(CastExpression castExpression, object data)
- {
- return castExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(ThisReferenceExpression thisReferenceExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(BaseReferenceExpression baseReferenceExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(ObjectCreateExpression objectCreateExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
- {
- if (arrayInitializerExpression.CreateExpressions != null) {
- foreach (INode node in arrayInitializerExpression.CreateExpressions) {
- node.AcceptVisitor(this, data);
- }
- }
-
- return data;
- }
-
- public virtual object Visit(GetTypeExpression getTypeExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(ClassReferenceExpression classReferenceExpression, object data)
- {
- // nothing to visit
- return data;
- }
-
- public virtual object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
- {
- return loopControlVariableExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(AddressOfExpression addressOfExpression, object data)
- {
- return addressOfExpression.Procedure.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(TypeOfExpression typeOfExpression, object data)
- {
- return typeOfExpression.Expression.AcceptVisitor(this, data);
- }
-
- public virtual object Visit(ArrayCreateExpression arrayCreateExpression, object data)
- {
- if (arrayCreateExpression.ArrayInitializer == null) {
- return data;
- }
- return arrayCreateExpression.ArrayInitializer.AcceptVisitor(this, data);
- }
-#endregion
- }
-}
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public abstract class AbstractASTVisitor : IASTVisitor
+ {
+ protected Stack blockStack = new Stack();
+
+ public BlockStatement CurrentBlock {
+ get {
+ if (blockStack.Count == 0) {
+ return null;
+ }
+ return (BlockStatement)blockStack.Peek();
+ }
+ }
+
+ public virtual object Visit(INode node, object data)
+ {
+ Console.WriteLine("Warning, INode visited!");
+ Console.WriteLine("Type is " + node.GetType());
+ Console.WriteLine("Visitor is " + this.GetType());
+ return node.AcceptChildren(this, data);
+ }
+
+ public virtual object Visit(CompilationUnit compilationUnit, object data)
+ {
+ if (compilationUnit == null) {
+ return data;
+ }
+ return compilationUnit.AcceptChildren(this, data);
+ }
+
+ public virtual object Visit(NamespaceDeclaration namespaceDeclaration, object data)
+ {
+ return namespaceDeclaration.AcceptChildren(this, data);
+ }
+
+ public virtual object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(OptionStrictDeclaration optionStrictDeclaration, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(OptionCompareDeclaration optionCompareDeclaration, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(ImportsStatement importsStatement, object data)
+ {
+ object ret = data;
+ foreach (INode n in importsStatement.ImportClauses) {
+ ret = n.AcceptVisitor(this, data);
+ }
+ return ret;
+ }
+
+ public virtual object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(ImportsDeclaration importsDeclaration, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(AttributeSection attributeSection, object data)
+ {
+ object ret = data;
+ foreach (ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute a in attributeSection.Attributes) {
+ ret = a.AcceptVisitor(this, data);
+ }
+ return ret;
+ }
+
+ public virtual object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data)
+ {
+ object ret = data;
+ foreach (Expression e in attribute.PositionalArguments) {
+ ret = e.AcceptVisitor(this, data);
+ }
+ foreach (NamedArgumentExpression n in attribute.NamedArguments) {
+ ret = n.AcceptVisitor(this, data);
+ }
+ return ret;
+ }
+
+ public virtual object Visit(NamedArgumentExpression namedArgumentExpression, object data)
+ {
+ return namedArgumentExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(TypeReference typeReference, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(TypeDeclaration typeDeclaration, object data)
+ {
+ foreach (AttributeSection a in typeDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ return typeDeclaration.AcceptChildren(this, data);
+ }
+
+ public virtual object Visit(DelegateDeclaration delegateDeclaration, object data)
+ {
+ foreach (AttributeSection a in delegateDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ if (delegateDeclaration.Parameters != null) {
+ foreach (ParameterDeclarationExpression p in delegateDeclaration.Parameters) {
+ p.AcceptVisitor(this, data);
+ }
+ }
+ if (delegateDeclaration.ReturnType == null) {
+ return data;
+ }
+ return delegateDeclaration.ReturnType.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(FieldDeclaration fieldDeclaration, object data)
+ {
+ foreach (AttributeSection a in fieldDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ if (fieldDeclaration.Fields != null) {
+ foreach (VariableDeclaration v in fieldDeclaration.Fields) {
+ v.AcceptVisitor(this, data);
+ }
+ }
+ if (fieldDeclaration.TypeReference == null) {
+ return data;
+ }
+ return fieldDeclaration.TypeReference.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(VariableDeclaration variableDeclaration, object data)
+ {
+ if (variableDeclaration.Initializer == null) {
+ return data;
+ }
+ return variableDeclaration.Initializer.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data)
+ {
+ object ret = data;
+ foreach (AttributeSection a in parameterDeclarationExpression.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ ret = parameterDeclarationExpression.TypeReference.AcceptVisitor(this, data);
+ if (parameterDeclarationExpression.DefaultValue != null) {
+ ret = parameterDeclarationExpression.DefaultValue.AcceptVisitor(this, data);
+ }
+ return ret;
+ }
+
+ public virtual object Visit(ConstructorDeclaration constructorDeclaration, object data)
+ {
+ blockStack.Push(constructorDeclaration.Body);
+ foreach (AttributeSection a in constructorDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ if (constructorDeclaration.Parameters != null) {
+ foreach (ParameterDeclarationExpression p in constructorDeclaration.Parameters) {
+ p.AcceptVisitor(this, data);
+ }
+ }
+ object ret = null;
+ if (constructorDeclaration.Body != null) {
+ ret = constructorDeclaration.Body.AcceptChildren(this, data);
+ }
+ blockStack.Pop();
+ return ret;
+ }
+
+ public virtual object Visit(MethodDeclaration methodDeclaration, object data)
+ {
+ blockStack.Push(methodDeclaration.Body);
+ foreach (AttributeSection a in methodDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ if (methodDeclaration.TypeReference != null) {
+ methodDeclaration.TypeReference.AcceptVisitor(this, data);
+ }
+
+ if (methodDeclaration.Parameters != null) {
+ foreach (ParameterDeclarationExpression p in methodDeclaration.Parameters) {
+ p.AcceptVisitor(this, data);
+ }
+ }
+
+ if (methodDeclaration.HandlesClause != null) {
+ methodDeclaration.HandlesClause.AcceptVisitor(this, data);
+ }
+ if (methodDeclaration.ImplementsClause != null) {
+ methodDeclaration.ImplementsClause.AcceptVisitor(this, data);
+ }
+ object ret = null;
+ if (methodDeclaration.Body != null) {
+ methodDeclaration.Body.AcceptChildren(this, data);
+ }
+ blockStack.Pop();
+ return ret;
+ }
+
+ public virtual object Visit(DeclareDeclaration declareDeclaration, object data)
+ {
+ if (declareDeclaration != null) {
+ if (declareDeclaration.Attributes != null) {
+ foreach (AttributeSection a in declareDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ }
+
+ if (declareDeclaration.ReturnType != null) {
+ declareDeclaration.ReturnType.AcceptVisitor(this, data);
+ }
+
+ if (declareDeclaration.Parameters != null) {
+ foreach (ParameterDeclarationExpression p in declareDeclaration.Parameters) {
+ p.AcceptVisitor(this, data);
+ }
+ }
+ }
+ return data;
+ }
+
+ public virtual object Visit(PropertyDeclaration propertyDeclaration, object data)
+ {
+ foreach (AttributeSection a in propertyDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ propertyDeclaration.TypeReference.AcceptVisitor(this, data);
+ if (propertyDeclaration.Parameters != null) {
+ foreach (ParameterDeclarationExpression p in propertyDeclaration.Parameters) {
+ p.AcceptVisitor(this, data);
+ }
+ }
+ if (propertyDeclaration.ImplementsClause != null) {
+ propertyDeclaration.ImplementsClause.AcceptVisitor(this, data);
+ }
+ if (propertyDeclaration.HasGetRegion) {
+ propertyDeclaration.GetRegion.AcceptVisitor(this, data);
+ }
+ if (propertyDeclaration.HasSetRegion) {
+ propertyDeclaration.SetRegion.AcceptVisitor(this, data);
+ }
+ return data;
+ }
+
+ public virtual object Visit(PropertyGetRegion propertyGetRegion, object data)
+ {
+ blockStack.Push(propertyGetRegion.Block);
+ foreach (AttributeSection a in propertyGetRegion.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ object ret = null;
+ if (propertyGetRegion.Block != null) {
+ ret = propertyGetRegion.Block.AcceptChildren(this, data);
+ }
+ blockStack.Pop();
+ return ret;
+ }
+
+ public virtual object Visit(PropertySetRegion propertySetRegion, object data)
+ {
+ blockStack.Push(propertySetRegion.Block);
+ foreach (AttributeSection a in propertySetRegion.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ object ret = null;
+ if (propertySetRegion.Block != null) {
+ ret = propertySetRegion.Block.AcceptChildren(this, data);
+ }
+ blockStack.Pop();
+ return ret;
+ }
+
+ public virtual object Visit(EventDeclaration eventDeclaration, object data)
+ {
+ foreach (AttributeSection a in eventDeclaration.Attributes) {
+ a.AcceptVisitor(this, data);
+ }
+ eventDeclaration.TypeReference.AcceptVisitor(this, data);
+ if (eventDeclaration.Parameters != null) {
+ foreach (ParameterDeclarationExpression p in eventDeclaration.Parameters) {
+ p.AcceptVisitor(this, data);
+ }
+ }
+ if (eventDeclaration.ImplementsClause != null) {
+ eventDeclaration.ImplementsClause.AcceptVisitor(this, data);
+ }
+ return data;
+ }
+
+ public virtual object Visit(BlockStatement blockStatement, object data)
+ {
+ if (blockStatement == null) {
+ return null;
+ }
+ blockStack.Push(blockStatement);
+ object ret = blockStatement.AcceptChildren(this, data);
+ blockStack.Pop();
+ return ret;
+ }
+
+ public virtual object Visit(Statement statement, object data)
+ {
+ Console.WriteLine("Warning, visited Statement!");
+ return data;
+ }
+
+ public virtual object Visit(StatementExpression statementExpression, object data)
+ {
+ if (statementExpression.Expression == null) {
+ return data;
+ }
+ return statementExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+ {
+ object ret = data;
+ if (localVariableDeclaration.Variables != null) {
+ foreach (VariableDeclaration v in localVariableDeclaration.Variables) {
+ ret = v.AcceptVisitor(this, data);
+ }
+ }
+ return ret;
+ }
+
+ public virtual object Visit(SimpleIfStatement ifStatement, object data)
+ {
+ object ret = ifStatement.Condition.AcceptVisitor(this, data);
+ if(ifStatement.Statements != null) {
+ foreach (Statement s in ifStatement.Statements) {
+ ret = s.AcceptVisitor(this, data);
+ }
+ }
+ if(ifStatement.ElseStatements != null) {
+ foreach (Statement s in ifStatement.ElseStatements) {
+ ret = s.AcceptVisitor(this, data);
+ }
+ }
+ return ret;
+ }
+
+ public virtual object Visit(IfStatement ifStatement, object data)
+ {
+ object ret = ifStatement.Condition.AcceptVisitor(this, data);
+ if(ifStatement.ElseIfStatements != null) {
+ foreach (Statement s in ifStatement.ElseIfStatements) {
+ ret = s.AcceptVisitor(this, data);
+ }
+ }
+ if (ifStatement.EmbeddedElseStatement != null) {
+ ret = ifStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
+ }
+ return ret;
+ }
+
+ public virtual object Visit(LabelStatement labelStatement, object data)
+ {
+ if (labelStatement.EmbeddedStatement == null) {
+ return null;
+ }
+ return labelStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(GoToStatement goToStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(SelectStatement selectStatement, object data)
+ {
+ selectStatement.SelectExpression.AcceptVisitor(this, data);
+ if (selectStatement.SelectSections != null) {
+ foreach (SelectSection s in selectStatement.SelectSections) {
+ s.AcceptVisitor(this, data);
+ }
+ }
+ return data;
+ }
+
+ public virtual object Visit(SelectSection selectSection, object data)
+ {
+ if (selectSection.CaseClauses != null) {
+ foreach (CaseClause c in selectSection.CaseClauses) {
+ c.AcceptVisitor(this, data);
+ }
+ }
+ return data;
+ }
+
+ public virtual object Visit(CaseClause caseClause, object data)
+ {
+ caseClause.ComparisonExpression.AcceptVisitor(this, data);
+ return caseClause.BoundaryExpression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(ExitStatement exitStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(EndStatement endStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(StopStatement stopStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(ResumeStatement resumeStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(ErrorStatement errorStatement, object data)
+ {
+ return errorStatement.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(OnErrorStatement onErrorStatement, object data)
+ {
+ return onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(EraseStatement eraseStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(ReDimStatement reDimStatement, object data)
+ {
+ return data;
+ }
+
+ public virtual object Visit(AddHandlerStatement addHandlerStatement, object data)
+ {
+ addHandlerStatement.EventExpression.AcceptVisitor(this, data);
+ addHandlerStatement.HandlerExpression.AcceptVisitor(this, data);
+ return data;
+ }
+
+ public virtual object Visit(RemoveHandlerStatement removeHandlerStatement, object data)
+ {
+ removeHandlerStatement.EventExpression.AcceptVisitor(this, data);
+ removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data);
+ return data;
+ }
+
+ public virtual object Visit(ReturnStatement returnStatement, object data)
+ {
+ return returnStatement.ReturnExpression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(RaiseEventStatement raiseEventStatement, object data)
+ {
+ if (raiseEventStatement.Parameters != null) {
+ foreach (INode node in raiseEventStatement.Parameters) {
+ node.AcceptVisitor(this, data);
+ }
+ }
+ return data;
+ }
+
+ public virtual object Visit(WhileStatement whileStatement, object data)
+ {
+ if (whileStatement.EmbeddedStatement == null) {
+ return null;
+ }
+ return whileStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(WithStatement withStatement, object data)
+ {
+ if (withStatement.WithExpression != null) {
+ withStatement.WithExpression.AcceptVisitor(this, data);
+ }
+
+ if (withStatement.Body == null) {
+ return null;
+ }
+ return withStatement.Body.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(DoLoopStatement doLoopStatement, object data)
+ {
+ if (doLoopStatement.EmbeddedStatement == null) {
+ return null;
+ }
+ return doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+ public virtual object Visit(ForStatement forStatement, object data)
+ {
+ if (forStatement.EmbeddedStatement == null) {
+ return null;
+ }
+ return forStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(ForeachStatement foreachStatement, object data)
+ {
+ if (foreachStatement.EmbeddedStatement == null) {
+ return null;
+ }
+ return foreachStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+ public virtual object Visit(LockStatement lockStatement, object data)
+ {
+ if (lockStatement.EmbeddedStatement == null) {
+ return null;
+ }
+ return lockStatement.EmbeddedStatement.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(TryCatchStatement tryCatchStatement, object data)
+ {
+ if (tryCatchStatement.StatementBlock == null) {
+ return null;
+ }
+ return tryCatchStatement.StatementBlock.AcceptVisitor(this, data);
+ }
+ public virtual object Visit(ThrowStatement throwStatement, object data)
+ {
+ if (throwStatement.ThrowExpression == null) {
+ return null;
+ }
+ return throwStatement.ThrowExpression.AcceptVisitor(this, data);
+ }
+
+#region Expressions
+ public virtual object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data)
+ {
+ if (fieldReferenceOrInvocationExpression.TargetObject == null) {
+ return null;
+ }
+ return fieldReferenceOrInvocationExpression.TargetObject.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(PrimitiveExpression primitiveExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(BinaryOperatorExpression binaryOperatorExpression, object data)
+ {
+ // visit but can't give back 2 values
+ binaryOperatorExpression.Left.AcceptVisitor(this, data);
+ binaryOperatorExpression.Right.AcceptVisitor(this, data);
+
+ return data;
+ }
+ public virtual object Visit(ParenthesizedExpression parenthesizedExpression, object data)
+ {
+ return parenthesizedExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(InvocationExpression invocationExpression, object data)
+ {
+ if (invocationExpression.TargetObject == null) {
+ return data;
+ }
+ return invocationExpression.TargetObject.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(IdentifierExpression identifierExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(TypeReferenceExpression typeReferenceExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(UnaryOperatorExpression unaryOperatorExpression, object data)
+ {
+ return unaryOperatorExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(AssignmentExpression assignmentExpression, object data)
+ {
+ // visit but can't give back 2 values
+ assignmentExpression.Left.AcceptVisitor(this, data);
+ assignmentExpression.Right.AcceptVisitor(this, data);
+
+ return data;
+ }
+
+ public virtual object Visit(CastExpression castExpression, object data)
+ {
+ return castExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(ThisReferenceExpression thisReferenceExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(BaseReferenceExpression baseReferenceExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(ObjectCreateExpression objectCreateExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(ArrayInitializerExpression arrayInitializerExpression, object data)
+ {
+ if (arrayInitializerExpression.CreateExpressions != null) {
+ foreach (INode node in arrayInitializerExpression.CreateExpressions) {
+ node.AcceptVisitor(this, data);
+ }
+ }
+
+ return data;
+ }
+
+ public virtual object Visit(GetTypeExpression getTypeExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(ClassReferenceExpression classReferenceExpression, object data)
+ {
+ // nothing to visit
+ return data;
+ }
+
+ public virtual object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+ {
+ return loopControlVariableExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(AddressOfExpression addressOfExpression, object data)
+ {
+ return addressOfExpression.Procedure.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(TypeOfExpression typeOfExpression, object data)
+ {
+ return typeOfExpression.Expression.AcceptVisitor(this, data);
+ }
+
+ public virtual object Visit(ArrayCreateExpression arrayCreateExpression, object data)
+ {
+ if (arrayCreateExpression.ArrayInitializer == null) {
+ return data;
+ }
+ return arrayCreateExpression.ArrayInitializer.AcceptVisitor(this, data);
+ }
+#endregion
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractASTVisitor.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,125 +1,125 @@
-// AbstractNode.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Drawing;
-using System.Text;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public abstract class AbstractNode : INode
- {
- INode parent;
- ArrayList children = new ArrayList();
- Hashtable specials = new Hashtable();
- Point startLocation;
- Point endLocation;
-
- public INode Parent {
- get {
- return parent;
- }
- set {
- parent = value;
- }
- }
-
- public Point StartLocation {
- get {
- return startLocation;
- }
- set {
- startLocation = value;
- }
- }
-
- public Point EndLocation {
- get {
- return endLocation;
- }
- set {
- endLocation = value;
- }
- }
-
- public Hashtable Specials {
- get {
- return specials;
- }
- }
-
- public ArrayList Children {
- get {
- return children;
- }
- }
-
- public virtual void AddChild(INode childNode)
- {
- children.Add(childNode);
- }
-
- public virtual object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public object AcceptChildren(IASTVisitor visitor, object data)
- {
- foreach (INode child in children) {
- if (child != null) {
- child.AcceptVisitor(visitor, data);
- }
- }
- return data;
- }
-
- public static string GetCollectionString(ICollection collection)
- {
- if (collection == null) {
- return "null";
- }
- StringBuilder output = new StringBuilder();
- output.Append('{');
-
- if (collection != null) {
- IEnumerator en = collection.GetEnumerator();
- bool isFirst = true;
- while (en.MoveNext()) {
- if (!isFirst) {
- output.Append(", ");
- } else {
- isFirst = false;
- }
- if (en.Current == null) {
- output.Append("null");
- } else {
- output.Append(en.Current.ToString());
- }
- }
- } else {
- return "null";
- }
-
- output.Append('}');
- return output.ToString();
- }
- }
-}
+// AbstractNode.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Text;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public abstract class AbstractNode : INode
+ {
+ INode parent;
+ ArrayList children = new ArrayList();
+ Hashtable specials = new Hashtable();
+ Point startLocation;
+ Point endLocation;
+
+ public INode Parent {
+ get {
+ return parent;
+ }
+ set {
+ parent = value;
+ }
+ }
+
+ public Point StartLocation {
+ get {
+ return startLocation;
+ }
+ set {
+ startLocation = value;
+ }
+ }
+
+ public Point EndLocation {
+ get {
+ return endLocation;
+ }
+ set {
+ endLocation = value;
+ }
+ }
+
+ public Hashtable Specials {
+ get {
+ return specials;
+ }
+ }
+
+ public ArrayList Children {
+ get {
+ return children;
+ }
+ }
+
+ public virtual void AddChild(INode childNode)
+ {
+ children.Add(childNode);
+ }
+
+ public virtual object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public object AcceptChildren(IASTVisitor visitor, object data)
+ {
+ foreach (INode child in children) {
+ if (child != null) {
+ child.AcceptVisitor(visitor, data);
+ }
+ }
+ return data;
+ }
+
+ public static string GetCollectionString(ICollection collection)
+ {
+ if (collection == null) {
+ return "null";
+ }
+ StringBuilder output = new StringBuilder();
+ output.Append('{');
+
+ if (collection != null) {
+ IEnumerator en = collection.GetEnumerator();
+ bool isFirst = true;
+ while (en.MoveNext()) {
+ if (!isFirst) {
+ output.Append(", ");
+ } else {
+ isFirst = false;
+ }
+ if (en.Current == null) {
+ output.Append("null");
+ } else {
+ output.Append(en.Current.ToString());
+ }
+ }
+ } else {
+ return "null";
+ }
+
+ output.Append('}');
+ return output.ToString();
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/AbstractNode.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,81 +1,81 @@
-// CompilationUnit.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class CompilationUnit : AbstractNode
- {
- Stack blockStack = new Stack();
- INode lastChild = null;
-
- public CompilationUnit()
- {
- blockStack.Push(this);
- }
-
- public void BlockStart(INode block)
- {
- blockStack.Push(block);
- }
-
- public void BlockEnd()
- {
- lastChild = (INode)blockStack.Pop();
- }
-
- public INode TakeBlock()
- {
- return (INode)blockStack.Pop();
- }
-
- public override void AddChild(INode childNode)
- {
- if (childNode != null) {
- INode parent = (INode)blockStack.Peek();
- parent.Children.Add(childNode);
- childNode.Parent = parent;
- lastChild = childNode;
- }
- }
-
- ArrayList specials = new ArrayList();
- public void AddSpecial(string key, object val)
- {
- specials.Add(new DictionaryEntry(key, val));
- }
-
- public void CommitSpecials()
- {
- if (lastChild == null) {
- return;
- }
- foreach (DictionaryEntry entry in specials) {
- lastChild.Specials[entry.Key] = entry.Value;
- }
- specials.Clear();
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// CompilationUnit.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class CompilationUnit : AbstractNode
+ {
+ Stack blockStack = new Stack();
+ INode lastChild = null;
+
+ public CompilationUnit()
+ {
+ blockStack.Push(this);
+ }
+
+ public void BlockStart(INode block)
+ {
+ blockStack.Push(block);
+ }
+
+ public void BlockEnd()
+ {
+ lastChild = (INode)blockStack.Pop();
+ }
+
+ public INode TakeBlock()
+ {
+ return (INode)blockStack.Pop();
+ }
+
+ public override void AddChild(INode childNode)
+ {
+ if (childNode != null) {
+ INode parent = (INode)blockStack.Peek();
+ parent.Children.Add(childNode);
+ childNode.Parent = parent;
+ lastChild = childNode;
+ }
+ }
+
+ ArrayList specials = new ArrayList();
+ public void AddSpecial(string key, object val)
+ {
+ specials.Add(new DictionaryEntry(key, val));
+ }
+
+ public void CommitSpecials()
+ {
+ if (lastChild == null) {
+ return;
+ }
+ foreach (DictionaryEntry entry in specials) {
+ lastChild.Specials[entry.Key] = entry.Value;
+ }
+ specials.Clear();
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/CompilationUnit.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,160 +1,160 @@
-using System;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- /// <summary>
- /// The type of a type declaration.
- /// </summary>
- public enum Types
- {
- Class,
- Interface,
- Structure,
- Module,
- Enum
- }
-
- ///<summary>
- /// Compare type, used in the <c>Option Compare</c>
- /// pragma.
- ///</summary>
- public enum CompareType
- {
- Binary,
- Text
- }
-
- ///<summary>
- /// Charset types, used in external mehtods
- /// declarations.
- ///</summary>
- public enum CharsetModifier
- {
- None,
- Auto,
- Unicode,
- ANSI
- }
-
- public enum ParentType
- {
- ClassOrStruct,
- InterfaceOrEnum,
- Namespace,
- Unknown
- }
-
- public enum Members
- {
- Constant,
- Field,
- Method,
- Property,
- Event,
- Constructor,
- StaticConstructor,
- NestedType
- }
-
- ///<summary>
- /// Used at the exit statement.
- ///</summary>
- public enum ExitType
- {
- None,
- Sub,
- Function,
- Property,
- Do,
- For,
- While,
- Select,
- Try
- }
-
- public enum ConditionType
- {
- None,
- Until,
- While
- }
-
- public enum ConditionPosition
- {
- None,
- Start,
- End
- }
-
- public enum UnaryOperatorType
- {
- None,
- Not,
- BitNot,
-
- Minus,
- Plus,
-
- Increment,
- Decrement,
-
- PostIncrement,
- PostDecrement,
-
- Star,
- BitWiseAnd
- }
-
- public enum AssignmentOperatorType
- {
- None,
- Assign,
-
- Add,
- Subtract,
- Multiply,
- Divide,
- Modulus,
-
- ConcatString,
-
- ShiftLeft,
- ShiftRight,
-
- BitwiseAnd,
- BitwiseOr,
- ExclusiveOr,
- Power,
- DivideInteger
- }
-
- public enum BinaryOperatorType
- {
- None,
- Add,
- Concat,
- BitwiseAnd,
- BitwiseOr,
- BooleanAnd,
- BooleanOr,
- Divide,
- GreaterThan,
- GreaterThanOrEqual,
- Equality,
- InEquality,
- LessThan,
- LessThanOrEqual,
- Modulus,
- Multiply,
- Subtract,
- DivideInteger,
- Power,
-
- // additional
- ShiftLeft,
- ShiftRight,
- IS,
- ExclusiveOr,
- Like,
- }
-}
+using System;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ /// <summary>
+ /// The type of a type declaration.
+ /// </summary>
+ public enum Types
+ {
+ Class,
+ Interface,
+ Structure,
+ Module,
+ Enum
+ }
+
+ ///<summary>
+ /// Compare type, used in the <c>Option Compare</c>
+ /// pragma.
+ ///</summary>
+ public enum CompareType
+ {
+ Binary,
+ Text
+ }
+
+ ///<summary>
+ /// Charset types, used in external mehtods
+ /// declarations.
+ ///</summary>
+ public enum CharsetModifier
+ {
+ None,
+ Auto,
+ Unicode,
+ ANSI
+ }
+
+ public enum ParentType
+ {
+ ClassOrStruct,
+ InterfaceOrEnum,
+ Namespace,
+ Unknown
+ }
+
+ public enum Members
+ {
+ Constant,
+ Field,
+ Method,
+ Property,
+ Event,
+ Constructor,
+ StaticConstructor,
+ NestedType
+ }
+
+ ///<summary>
+ /// Used at the exit statement.
+ ///</summary>
+ public enum ExitType
+ {
+ None,
+ Sub,
+ Function,
+ Property,
+ Do,
+ For,
+ While,
+ Select,
+ Try
+ }
+
+ public enum ConditionType
+ {
+ None,
+ Until,
+ While
+ }
+
+ public enum ConditionPosition
+ {
+ None,
+ Start,
+ End
+ }
+
+ public enum UnaryOperatorType
+ {
+ None,
+ Not,
+ BitNot,
+
+ Minus,
+ Plus,
+
+ Increment,
+ Decrement,
+
+ PostIncrement,
+ PostDecrement,
+
+ Star,
+ BitWiseAnd
+ }
+
+ public enum AssignmentOperatorType
+ {
+ None,
+ Assign,
+
+ Add,
+ Subtract,
+ Multiply,
+ Divide,
+ Modulus,
+
+ ConcatString,
+
+ ShiftLeft,
+ ShiftRight,
+
+ BitwiseAnd,
+ BitwiseOr,
+ ExclusiveOr,
+ Power,
+ DivideInteger
+ }
+
+ public enum BinaryOperatorType
+ {
+ None,
+ Add,
+ Concat,
+ BitwiseAnd,
+ BitwiseOr,
+ BooleanAnd,
+ BooleanOr,
+ Divide,
+ GreaterThan,
+ GreaterThanOrEqual,
+ Equality,
+ InEquality,
+ LessThan,
+ LessThanOrEqual,
+ Modulus,
+ Multiply,
+ Subtract,
+ DivideInteger,
+ Power,
+
+ // additional
+ ShiftLeft,
+ ShiftRight,
+ IS,
+ ExclusiveOr,
+ Like,
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Enums.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,31 +1,31 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class AddressOfExpression : Expression
- {
- Expression procedure;
-
- public Expression Procedure {
- get {
- return procedure;
- }
- set {
- procedure = value;
- }
- }
-
- public AddressOfExpression(Expression Procedure)
- {
- this.Procedure = Procedure;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class AddressOfExpression : Expression
+ {
+ Expression procedure;
+
+ public Expression Procedure {
+ get {
+ return procedure;
+ }
+ set {
+ procedure = value;
+ }
+ }
+
+ public AddressOfExpression(Expression Procedure)
+ {
+ this.Procedure = Procedure;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AddressOfExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,60 +1,60 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ArrayCreateExpression : Expression
- {
- TypeReference createType = null;
- ArrayList parameters = null; // Expressions
- ArrayInitializerExpression arrayInitializer = null; // Array Initializer OR NULL
-
- public TypeReference CreateType {
- get {
- return createType;
- }
- set {
- createType = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public ArrayInitializerExpression ArrayInitializer
- {
- get {
- return arrayInitializer;
- }
- set {
- arrayInitializer = value;
- }
- }
-
- public ArrayCreateExpression(TypeReference createType, ArrayList parameters)
- {
- this.createType = createType;
- this.parameters = parameters;
- }
-
- public ArrayCreateExpression(TypeReference createType, ArrayInitializerExpression arrayInitializer)
- {
- this.createType = createType;
- this.arrayInitializer = arrayInitializer;
- }
-
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ArrayCreateExpression : Expression
+ {
+ TypeReference createType = null;
+ ArrayList parameters = null; // Expressions
+ ArrayInitializerExpression arrayInitializer = null; // Array Initializer OR NULL
+
+ public TypeReference CreateType {
+ get {
+ return createType;
+ }
+ set {
+ createType = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public ArrayInitializerExpression ArrayInitializer
+ {
+ get {
+ return arrayInitializer;
+ }
+ set {
+ arrayInitializer = value;
+ }
+ }
+
+ public ArrayCreateExpression(TypeReference createType, ArrayList parameters)
+ {
+ this.createType = createType;
+ this.parameters = parameters;
+ }
+
+ public ArrayCreateExpression(TypeReference createType, ArrayInitializerExpression arrayInitializer)
+ {
+ this.createType = createType;
+ this.arrayInitializer = arrayInitializer;
+ }
+
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayCreateExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,33 +1,33 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ArrayInitializerExpression : Expression
- {
- ArrayList createExpressions = new ArrayList();
-
- public ArrayList CreateExpressions {
- get {
- return createExpressions;
- }
- set {
- createExpressions = value;
- }
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ArrayInitializerExpression: CreateExpressions={0}]",
- GetCollectionString(createExpressions));
- }
-
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ArrayInitializerExpression : Expression
+ {
+ ArrayList createExpressions = new ArrayList();
+
+ public ArrayList CreateExpressions {
+ get {
+ return createExpressions;
+ }
+ set {
+ createExpressions = value;
+ }
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ArrayInitializerExpression: CreateExpressions={0}]",
+ GetCollectionString(createExpressions));
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ArrayInitializerExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,60 +1,60 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class AssignmentExpression : Expression
- {
- Expression left;
- AssignmentOperatorType op;
- Expression right;
-
- public Expression Left {
- get {
- return left;
- }
- set {
- left = value;
- }
- }
-
- public AssignmentOperatorType Op {
- get {
- return op;
- }
- set {
- op = value;
- }
- }
-
- public Expression Right {
- get {
- return right;
- }
- set {
- right = value;
- }
- }
-
- public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right)
- {
- this.left = left;
- this.op = op;
- this.right = right;
- }
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[AssignmentExpression: Op={0}, Left={1}, Right={2}]",
- op,
- left,
- right);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class AssignmentExpression : Expression
+ {
+ Expression left;
+ AssignmentOperatorType op;
+ Expression right;
+
+ public Expression Left {
+ get {
+ return left;
+ }
+ set {
+ left = value;
+ }
+ }
+
+ public AssignmentOperatorType Op {
+ get {
+ return op;
+ }
+ set {
+ op = value;
+ }
+ }
+
+ public Expression Right {
+ get {
+ return right;
+ }
+ set {
+ right = value;
+ }
+ }
+
+ public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right)
+ {
+ this.left = left;
+ this.op = op;
+ this.right = right;
+ }
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[AssignmentExpression: Op={0}, Left={1}, Right={2}]",
+ op,
+ left,
+ right);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/AssignmentExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,20 +1,20 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class BaseReferenceExpression : Expression
- {
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[BaseReferenceExpression]");
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class BaseReferenceExpression : Expression
+ {
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[BaseReferenceExpression]");
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BaseReferenceExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,61 +1,61 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class BinaryOperatorExpression : Expression
- {
- Expression left;
- BinaryOperatorType op;
- Expression right;
-
- public Expression Left {
- get {
- return left;
- }
- set {
- left = value;
- }
- }
-
- public BinaryOperatorType Op {
- get {
- return op;
- }
- set {
- op = value;
- }
- }
-
- public Expression Right {
- get {
- return right;
- }
- set {
- right = value;
- }
- }
-
- public BinaryOperatorExpression(Expression left, BinaryOperatorType op, Expression right)
- {
- this.left = left;
- this.op = op;
- this.right = right;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[BinaryOperatorExpression: Op={0}, Left={1}, Right={2}]",
- op,
- left,
- right);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class BinaryOperatorExpression : Expression
+ {
+ Expression left;
+ BinaryOperatorType op;
+ Expression right;
+
+ public Expression Left {
+ get {
+ return left;
+ }
+ set {
+ left = value;
+ }
+ }
+
+ public BinaryOperatorType Op {
+ get {
+ return op;
+ }
+ set {
+ op = value;
+ }
+ }
+
+ public Expression Right {
+ get {
+ return right;
+ }
+ set {
+ right = value;
+ }
+ }
+
+ public BinaryOperatorExpression(Expression left, BinaryOperatorType op, Expression right)
+ {
+ this.left = left;
+ this.op = op;
+ this.right = right;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[BinaryOperatorExpression: Op={0}, Left={1}, Right={2}]",
+ op,
+ left,
+ right);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/BinaryOperatorExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,68 +1,68 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class CastExpression : Expression
- {
- TypeReference castTo;
- Expression expression;
- bool isSpecializedCast = false;
-
-
- public TypeReference CastTo {
- get {
- return castTo;
- }
- set {
- castTo = value;
- }
- }
-
- public Expression Expression {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public bool IsSpecializedCast {
- get {
- return isSpecializedCast;
- }
- set {
- isSpecializedCast = value;
- }
- }
-
-
- public CastExpression(TypeReference castTo, Expression expression)
- {
- this.castTo = castTo;
- this.expression = expression;
- }
-
- public CastExpression(TypeReference castTo, Expression expression, bool isSpecializedCast)
- {
- this.castTo = castTo;
- this.expression = expression;
- this.isSpecializedCast = isSpecializedCast;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[CastExpression: CastTo={0}, Expression={1}]",
- castTo,
- expression);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class CastExpression : Expression
+ {
+ TypeReference castTo;
+ Expression expression;
+ bool isSpecializedCast = false;
+
+
+ public TypeReference CastTo {
+ get {
+ return castTo;
+ }
+ set {
+ castTo = value;
+ }
+ }
+
+ public Expression Expression {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public bool IsSpecializedCast {
+ get {
+ return isSpecializedCast;
+ }
+ set {
+ isSpecializedCast = value;
+ }
+ }
+
+
+ public CastExpression(TypeReference castTo, Expression expression)
+ {
+ this.castTo = castTo;
+ this.expression = expression;
+ }
+
+ public CastExpression(TypeReference castTo, Expression expression, bool isSpecializedCast)
+ {
+ this.castTo = castTo;
+ this.expression = expression;
+ this.isSpecializedCast = isSpecializedCast;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[CastExpression: CastTo={0}, Expression={1}]",
+ castTo,
+ expression);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/CastExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,20 +1,20 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ClassReferenceExpression : Expression
- {
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ClassReferenceExpression]");
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ClassReferenceExpression : Expression
+ {
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ClassReferenceExpression]");
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ClassReferenceExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,29 +1,29 @@
-// Expression.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class Expression : AbstractNode
- {
- public Expression()
- {
- }
- }
-}
+// Expression.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class Expression : AbstractNode
+ {
+ public Expression()
+ {
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/Expression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,31 +1,31 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class GetTypeExpression : Expression
- {
- TypeReference type;
-
- public TypeReference Type {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- public GetTypeExpression(TypeReference type)
- {
- this.type = type;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class GetTypeExpression : Expression
+ {
+ TypeReference type;
+
+ public TypeReference Type {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+
+ public GetTypeExpression(TypeReference type)
+ {
+ this.type = type;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/GetTypeExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,38 +1,38 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class IdentifierExpression : Expression
- {
- string identifier;
-
- public string Identifier {
- get {
- return identifier;
- }
- set {
- identifier = value;
- }
- }
-
- public IdentifierExpression(string identifier)
- {
- this.identifier = identifier;
- }
-
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[IdentifierExpression: Identifier={0}]",
- identifier);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class IdentifierExpression : Expression
+ {
+ string identifier;
+
+ public string Identifier {
+ get {
+ return identifier;
+ }
+ set {
+ identifier = value;
+ }
+ }
+
+ public IdentifierExpression(string identifier)
+ {
+ this.identifier = identifier;
+ }
+
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[IdentifierExpression: Identifier={0}]",
+ identifier);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/IdentifierExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,49 +1,49 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class InvocationExpression : Expression
- {
- Expression targetObject;
- ArrayList parameters; // Expression list
-
- public Expression TargetObject {
- get {
- return targetObject;
- }
- set {
- targetObject = value;
- }
- }
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public InvocationExpression(Expression targetObject, ArrayList parameters)
- {
- this.targetObject = targetObject;
- this.parameters = parameters;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[InvocationExpression: TargetObject={0}, parameters={1}]",
- targetObject,
- GetCollectionString(parameters));
- }
- }
-}
-
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class InvocationExpression : Expression
+ {
+ Expression targetObject;
+ ArrayList parameters; // Expression list
+
+ public Expression TargetObject {
+ get {
+ return targetObject;
+ }
+ set {
+ targetObject = value;
+ }
+ }
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public InvocationExpression(Expression targetObject, ArrayList parameters)
+ {
+ this.targetObject = targetObject;
+ this.parameters = parameters;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[InvocationExpression: TargetObject={0}, parameters={1}]",
+ targetObject,
+ GetCollectionString(parameters));
+ }
+ }
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/InvocationExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,60 +1,60 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class LoopControlVariableExpression : Expression
- {
- Expression expression = null;
- string name;
- TypeReference type;
-
- public LoopControlVariableExpression(string name, TypeReference type)
- {
- this.name = name;
- this.type = type;
- }
-
- public LoopControlVariableExpression(Expression expression)
- {
- this.expression = expression;
- }
-
- public string Name
- {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public TypeReference Type
- {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- public Expression Expression
- {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class LoopControlVariableExpression : Expression
+ {
+ Expression expression = null;
+ string name;
+ TypeReference type;
+
+ public LoopControlVariableExpression(string name, TypeReference type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+ public LoopControlVariableExpression(Expression expression)
+ {
+ this.expression = expression;
+ }
+
+ public string Name
+ {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public TypeReference Type
+ {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+
+ public Expression Expression
+ {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/LoopControlVariableExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,44 +1,44 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB {
-
- public class NamedArgumentExpression : Expression
- {
- string parametername;
- Expression expression;
-
- public string Parametername {
- get {
- return parametername;
- }
- set {
- parametername = value;
- }
- }
-
- public Expression Expression {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public NamedArgumentExpression(string parametername, Expression expression)
- {
- this.parametername = parametername;
- this.expression = expression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
-
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB {
+
+ public class NamedArgumentExpression : Expression
+ {
+ string parametername;
+ Expression expression;
+
+ public string Parametername {
+ get {
+ return parametername;
+ }
+ set {
+ parametername = value;
+ }
+ }
+
+ public Expression Expression {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public NamedArgumentExpression(string parametername, Expression expression)
+ {
+ this.parametername = parametername;
+ this.expression = expression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/NamedArgumentExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ObjectCreateExpression : Expression
- {
- TypeReference createType;
- ArrayList parameters;
-
- public TypeReference CreateType {
- get {
- return createType;
- }
- set {
- createType = value;
- }
- }
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public ObjectCreateExpression(TypeReference createType, ArrayList parameters)
- {
- this.createType = createType;
- this.parameters = parameters;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ObjectCreateExpression: CreateType={0}, Parameters={1}]",
- createType,
- GetCollectionString(parameters));
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ObjectCreateExpression : Expression
+ {
+ TypeReference createType;
+ ArrayList parameters;
+
+ public TypeReference CreateType {
+ get {
+ return createType;
+ }
+ set {
+ createType = value;
+ }
+ }
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public ObjectCreateExpression(TypeReference createType, ArrayList parameters)
+ {
+ this.createType = createType;
+ this.parameters = parameters;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ObjectCreateExpression: CreateType={0}, Parameters={1}]",
+ createType,
+ GetCollectionString(parameters));
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ObjectCreateExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,90 +1,90 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB {
-
- public class ParameterDeclarationExpression : Expression
- {
- TypeReference typeReference;
- string parameterName;
- ParamModifiers paramModifiers;
- ArrayList attributes = new ArrayList();
- Expression defaultValue;
-
- public override string ToString()
- {
- return String.Format("[ParameterDeclarationExpression: DefaultValue={0}, TypeReference={1}, ParameterName={2}, ParamModifiers={3}, Attributes=TODO]",
- defaultValue,
- typeReference,
- parameterName,
- paramModifiers);
- }
-
- public Expression DefaultValue {
- get {
- return defaultValue;
- }
- set {
- defaultValue = value;
- }
- }
-
- public TypeReference TypeReference {
- get {
- return typeReference;
- }
- set {
- typeReference = value;
- }
- }
-
- public string ParameterName {
- get {
- return parameterName;
- }
- set {
- parameterName = value;
- }
- }
-
- public ParamModifiers ParamModifiers {
- get {
- return paramModifiers;
- }
- set {
- paramModifiers = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParamModifiers paramModifiers, Expression defaultValue)
- {
- this.typeReference = typeReference;
- this.parameterName = parameterName;
- this.paramModifiers = paramModifiers;
- this.attributes = attributes;
- this.defaultValue = defaultValue;
- }
-
- public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParamModifiers paramModifiers)
- {
- this.typeReference = typeReference;
- this.parameterName = parameterName;
- this.paramModifiers = paramModifiers;
- }
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB {
+
+ public class ParameterDeclarationExpression : Expression
+ {
+ TypeReference typeReference;
+ string parameterName;
+ ParamModifiers paramModifiers;
+ ArrayList attributes = new ArrayList();
+ Expression defaultValue;
+
+ public override string ToString()
+ {
+ return String.Format("[ParameterDeclarationExpression: DefaultValue={0}, TypeReference={1}, ParameterName={2}, ParamModifiers={3}, Attributes=TODO]",
+ defaultValue,
+ typeReference,
+ parameterName,
+ paramModifiers);
+ }
+
+ public Expression DefaultValue {
+ get {
+ return defaultValue;
+ }
+ set {
+ defaultValue = value;
+ }
+ }
+
+ public TypeReference TypeReference {
+ get {
+ return typeReference;
+ }
+ set {
+ typeReference = value;
+ }
+ }
+
+ public string ParameterName {
+ get {
+ return parameterName;
+ }
+ set {
+ parameterName = value;
+ }
+ }
+
+ public ParamModifiers ParamModifiers {
+ get {
+ return paramModifiers;
+ }
+ set {
+ paramModifiers = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParamModifiers paramModifiers, Expression defaultValue)
+ {
+ this.typeReference = typeReference;
+ this.parameterName = parameterName;
+ this.paramModifiers = paramModifiers;
+ this.attributes = attributes;
+ this.defaultValue = defaultValue;
+ }
+
+ public ParameterDeclarationExpression(TypeReference typeReference, string parameterName, ParamModifiers paramModifiers)
+ {
+ this.typeReference = typeReference;
+ this.parameterName = parameterName;
+ this.paramModifiers = paramModifiers;
+ }
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParameterDeclarationExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,37 +1,37 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ParenthesizedExpression : Expression
- {
- Expression expression;
-
- public Expression Expression {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public ParenthesizedExpression(Expression expression)
- {
- this.expression = expression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ParenthesizedExpression: Expression={0}]",
- expression);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ParenthesizedExpression : Expression
+ {
+ Expression expression;
+
+ public Expression Expression {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public ParenthesizedExpression(Expression expression)
+ {
+ this.expression = expression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ParenthesizedExpression: Expression={0}]",
+ expression);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ParenthesizedExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,51 +1,51 @@
-using System;
-using System.Collections;
-using System.Globalization;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class PrimitiveExpression : Expression
- {
- object val;
- string stringValue;
-
- public object Value {
- get {
- return val;
- }
- set {
- val = value;
- }
- }
-
- public string StringValue {
- get {
- return stringValue;
- }
- set {
- stringValue = value;
- }
- }
-
- public PrimitiveExpression(object val, string stringValue)
- {
- this.val = val;
- this.stringValue = stringValue;
- }
-
- static NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[PrimitiveExpression: StringValue={0}]",
- stringValue);
- }
- }
-}
+using System;
+using System.Collections;
+using System.Globalization;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class PrimitiveExpression : Expression
+ {
+ object val;
+ string stringValue;
+
+ public object Value {
+ get {
+ return val;
+ }
+ set {
+ val = value;
+ }
+ }
+
+ public string StringValue {
+ get {
+ return stringValue;
+ }
+ set {
+ stringValue = value;
+ }
+ }
+
+ public PrimitiveExpression(object val, string stringValue)
+ {
+ this.val = val;
+ this.stringValue = stringValue;
+ }
+
+ static NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[PrimitiveExpression: StringValue={0}]",
+ stringValue);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/PrimitiveExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,54 +1,54 @@
-// StatementExpression.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class StatementExpression : Statement
- {
- Expression expression;
-
- public Expression Expression
- {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public StatementExpression(Expression expression)
- {
- this.expression = expression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[StatementExpression: Expression={0}]", expression);
- }
- }
-}
+// StatementExpression.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class StatementExpression : Statement
+ {
+ Expression expression;
+
+ public Expression Expression
+ {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public StatementExpression(Expression expression)
+ {
+ this.expression = expression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[StatementExpression: Expression={0}]", expression);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/StatementExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,21 +1,21 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ThisReferenceExpression : Expression
- {
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ThisReferenceExpression]");
- }
-
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ThisReferenceExpression : Expression
+ {
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ThisReferenceExpression]");
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/ThisReferenceExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,43 +1,43 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class TypeOfExpression : Expression
- {
- TypeReference type;
-
- Expression expression;
-
- public Expression Expression {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public TypeReference Type {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- public TypeOfExpression(Expression expression, TypeReference type)
- {
- this.type = type;
- this.expression = expression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class TypeOfExpression : Expression
+ {
+ TypeReference type;
+
+ Expression expression;
+
+ public Expression Expression {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public TypeReference Type {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+
+ public TypeOfExpression(Expression expression, TypeReference type)
+ {
+ this.type = type;
+ this.expression = expression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeOfExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,41 +1,41 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class TypeReferenceExpression : Expression
- {
- TypeReference typeReference;
-
- public TypeReference TypeReference {
- get {
- return typeReference;
- }
- set {
- typeReference = value;
- }
- }
-
- public TypeReferenceExpression(string type)
- {
- this.typeReference = new TypeReference(type);
- }
- public TypeReferenceExpression(TypeReference typeReference)
- {
- this.typeReference = typeReference;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[TypeReferenceExpression: TypeReference={0}]",
- typeReference);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class TypeReferenceExpression : Expression
+ {
+ TypeReference typeReference;
+
+ public TypeReference TypeReference {
+ get {
+ return typeReference;
+ }
+ set {
+ typeReference = value;
+ }
+ }
+
+ public TypeReferenceExpression(string type)
+ {
+ this.typeReference = new TypeReference(type);
+ }
+ public TypeReferenceExpression(TypeReference typeReference)
+ {
+ this.typeReference = typeReference;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[TypeReferenceExpression: TypeReference={0}]",
+ typeReference);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/TypeReferenceExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class UnaryOperatorExpression : Expression
- {
- Expression expression;
- UnaryOperatorType op;
-
- public Expression Expression {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
- public UnaryOperatorType Op {
- get {
- return op;
- }
- set {
- op = value;
- }
- }
-
- public UnaryOperatorExpression(Expression expression, UnaryOperatorType op)
- {
- this.expression = expression;
- this.op = op;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[UnaryOperatorExpression: Op={0}, Expression={1}]",
- op,
- expression);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class UnaryOperatorExpression : Expression
+ {
+ Expression expression;
+ UnaryOperatorType op;
+
+ public Expression Expression {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+ public UnaryOperatorType Op {
+ get {
+ return op;
+ }
+ set {
+ op = value;
+ }
+ }
+
+ public UnaryOperatorExpression(Expression expression, UnaryOperatorType op)
+ {
+ this.expression = expression;
+ this.op = op;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[UnaryOperatorExpression: Op={0}, Expression={1}]",
+ op,
+ expression);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Expressions/UnaryOperatorExpression.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,93 +1,93 @@
-// AttributeDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class Attribute : AbstractNode
- {
- string name;
- ArrayList positionalArguments; // [Expression]
- ArrayList namedArguments; // [NamedArgumentExpression]
-
- public Attribute(string name, ArrayList positionalArguments, ArrayList namedArguments)
- {
- this.name = name;
- this.positionalArguments = positionalArguments;
- this.namedArguments = namedArguments;
- }
-
- public string Name {
- get {
- return name;
- }
- }
- public ArrayList PositionalArguments {
- get {
- return positionalArguments;
- }
- }
- public ArrayList NamedArguments {
- get {
- return namedArguments;
- }
- }
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-
- public class AttributeSection : AbstractNode
- {
- string attributeTarget;
- ArrayList attributes; // [Attribute]
-
- public string AttributeTarget {
- get {
- return attributeTarget;
- }
- set {
- attributeTarget = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public AttributeSection(string attributeTarget, ArrayList attributes)
- {
- this.attributeTarget = attributeTarget;
- this.attributes = attributes;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// AttributeDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class Attribute : AbstractNode
+ {
+ string name;
+ ArrayList positionalArguments; // [Expression]
+ ArrayList namedArguments; // [NamedArgumentExpression]
+
+ public Attribute(string name, ArrayList positionalArguments, ArrayList namedArguments)
+ {
+ this.name = name;
+ this.positionalArguments = positionalArguments;
+ this.namedArguments = namedArguments;
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+ }
+ public ArrayList PositionalArguments {
+ get {
+ return positionalArguments;
+ }
+ }
+ public ArrayList NamedArguments {
+ get {
+ return namedArguments;
+ }
+ }
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+
+ public class AttributeSection : AbstractNode
+ {
+ string attributeTarget;
+ ArrayList attributes; // [Attribute]
+
+ public string AttributeTarget {
+ get {
+ return attributeTarget;
+ }
+ set {
+ attributeTarget = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public AttributeSection(string attributeTarget, ArrayList attributes)
+ {
+ this.attributeTarget = attributeTarget;
+ this.attributes = attributes;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/AttributeDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,102 +1,102 @@
-// DelegateDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class DelegateDeclaration : AbstractNode
- {
- string name;
- Modifier modifier;
- TypeReference returnType;
- ArrayList parameters; // [ParameterDeclarationExpression]
- ArrayList attributes;
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public TypeReference ReturnType {
- get {
- return returnType;
- }
- set {
- returnType = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
-// public DelegateDeclaration(string name, Modifier modifier, TypeReference returnType, ArrayList parameters, ArrayList attributes)
-// {
-// this.name = name;
-// this.modifier = modifier;
-// this.returnType = returnType;
-// this.parameters = parameters;
-// this.attributes = attributes;
-// }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[DelegateDeclaration: Name={0}, Modifier={1}, ReturnType={2}, parameters={3}, attributes={4}]",
- name,
- modifier,
- returnType,
- GetCollectionString(parameters),
- GetCollectionString(attributes));
- }
- }
-}
+// DelegateDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class DelegateDeclaration : AbstractNode
+ {
+ string name;
+ Modifier modifier;
+ TypeReference returnType;
+ ArrayList parameters; // [ParameterDeclarationExpression]
+ ArrayList attributes;
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public TypeReference ReturnType {
+ get {
+ return returnType;
+ }
+ set {
+ returnType = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+// public DelegateDeclaration(string name, Modifier modifier, TypeReference returnType, ArrayList parameters, ArrayList attributes)
+// {
+// this.name = name;
+// this.modifier = modifier;
+// this.returnType = returnType;
+// this.parameters = parameters;
+// this.attributes = attributes;
+// }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[DelegateDeclaration: Name={0}, Modifier={1}, ReturnType={2}, parameters={3}, attributes={4}]",
+ name,
+ modifier,
+ returnType,
+ GetCollectionString(parameters),
+ GetCollectionString(attributes));
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/DelegateDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,59 +1,59 @@
-// UsingAliasDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ImportsAliasDeclaration : AbstractNode
- {
- string alias;
- string nameSpace;
-
- public string Alias {
- get {
- return alias;
- }
- set {
- alias = value;
- }
- }
-
- public string Namespace {
- get {
- return nameSpace;
- }
- set {
- nameSpace = value;
- }
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public ImportsAliasDeclaration(string alias, string nameSpace)
- {
- this.alias = alias;
- this.nameSpace = nameSpace;
- }
- }
-}
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ImportsAliasDeclaration : AbstractNode
+ {
+ string alias;
+ string nameSpace;
+
+ public string Alias {
+ get {
+ return alias;
+ }
+ set {
+ alias = value;
+ }
+ }
+
+ public string Namespace {
+ get {
+ return nameSpace;
+ }
+ set {
+ nameSpace = value;
+ }
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public ImportsAliasDeclaration(string alias, string nameSpace)
+ {
+ this.alias = alias;
+ this.nameSpace = nameSpace;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsAliasDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-// UsingDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ImportsDeclaration : AbstractNode
- {
- string nameSpace;
-
- public string Namespace {
- get {
- return nameSpace;
- }
- set {
- nameSpace = value;
- }
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public ImportsDeclaration(string nameSpace)
- {
- this.nameSpace = nameSpace;
- }
- }
-}
+// UsingDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ImportsDeclaration : AbstractNode
+ {
+ string nameSpace;
+
+ public string Namespace {
+ get {
+ return nameSpace;
+ }
+ set {
+ nameSpace = value;
+ }
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public ImportsDeclaration(string nameSpace)
+ {
+ this.nameSpace = nameSpace;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-// UsingDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ImportsStatement : AbstractNode
- {
- ArrayList importClauses;
-
- public ArrayList ImportClauses {
- get {
- return importClauses;
- }
- set {
- importClauses = value;
- }
- }
-
- public ImportsStatement(ArrayList importClauses)
- {
- this.importClauses = importClauses;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// UsingDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ImportsStatement : AbstractNode
+ {
+ ArrayList importClauses;
+
+ public ArrayList ImportClauses {
+ get {
+ return importClauses;
+ }
+ set {
+ importClauses = value;
+ }
+ }
+
+ public ImportsStatement(ArrayList importClauses)
+ {
+ this.importClauses = importClauses;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/ImportsStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,47 +1,47 @@
-// NamespaceDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class NamespaceDeclaration : AbstractNode
- {
- string nameSpace;
-
- public string NameSpace {
- get {
- return nameSpace;
- }
- set {
- nameSpace = value;
- }
- }
-
- public NamespaceDeclaration(string nameSpace)
- {
- this.nameSpace = nameSpace;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// NamespaceDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class NamespaceDeclaration : AbstractNode
+ {
+ string nameSpace;
+
+ public string NameSpace {
+ get {
+ return nameSpace;
+ }
+ set {
+ nameSpace = value;
+ }
+ }
+
+ public NamespaceDeclaration(string nameSpace)
+ {
+ this.nameSpace = nameSpace;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/NamespaceDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,57 +1,57 @@
-// UsingAliasDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class OptionCompareDeclaration : AbstractNode
- {
- CompareType compareType;
- bool optionvalue;
-
- public CompareType CompareType {
- get {
- return compareType;
- }
- set {
- compareType = value;
- }
- }
-
- public bool OptionValue {
- get {
- return optionvalue;
- }
- set {
- optionvalue = value;
- }
- }
-
- public OptionCompareDeclaration(CompareType compareType)
- {
- this.compareType = compareType;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class OptionCompareDeclaration : AbstractNode
+ {
+ CompareType compareType;
+ bool optionvalue;
+
+ public CompareType CompareType {
+ get {
+ return compareType;
+ }
+ set {
+ compareType = value;
+ }
+ }
+
+ public bool OptionValue {
+ get {
+ return optionvalue;
+ }
+ set {
+ optionvalue = value;
+ }
+ }
+
+ public OptionCompareDeclaration(CompareType compareType)
+ {
+ this.compareType = compareType;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionCompareDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-// UsingAliasDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class OptionExplicitDeclaration : AbstractNode
- {
- bool optionvalue;
-
- public bool OptionValue {
- get {
- return optionvalue;
- }
- set {
- optionvalue = value;
- }
- }
-
- public OptionExplicitDeclaration(bool optionvalue)
- {
- this.optionvalue = optionvalue;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class OptionExplicitDeclaration : AbstractNode
+ {
+ bool optionvalue;
+
+ public bool OptionValue {
+ get {
+ return optionvalue;
+ }
+ set {
+ optionvalue = value;
+ }
+ }
+
+ public OptionExplicitDeclaration(bool optionvalue)
+ {
+ this.optionvalue = optionvalue;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionExplicitDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-// UsingAliasDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class OptionStrictDeclaration : AbstractNode
- {
- bool optionvalue;
-
- public bool OptionValue {
- get {
- return optionvalue;
- }
- set {
- optionvalue = value;
- }
- }
-
- public OptionStrictDeclaration(bool optionvalue)
- {
- this.optionvalue = optionvalue;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// UsingAliasDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class OptionStrictDeclaration : AbstractNode
+ {
+ bool optionvalue;
+
+ public bool OptionValue {
+ get {
+ return optionvalue;
+ }
+ set {
+ optionvalue = value;
+ }
+ }
+
+ public OptionStrictDeclaration(bool optionvalue)
+ {
+ this.optionvalue = optionvalue;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/OptionStrictDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,112 +1,112 @@
-// TypeDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class TypeDeclaration : AbstractNode
- {
- // Children of Enum : [Field]
- string name;
- Modifier modifier;
- Types type; // Class | Interface | Structure | Enum | Module
- string baseType = null;
- ArrayList attributes;
- ArrayList baseInterfaces;
-
- public string BaseType {
- get {
- return baseType;
- }
- set {
- baseType = value;
- }
- }
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
- public Types Type {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
- public ArrayList BaseInterfaces {
- get {
- return baseInterfaces;
- }
- set {
- baseInterfaces = value;
- }
- }
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
-// public TypeDeclaration(string name, Modifier modifier, Types type, StringCollection bases, ArrayList attributes)
-// {
-// this.name = name;
-// this.modifier = modifier;
-// this.type = type;
-// this.bases = bases;
-// this.attributes = attributes;
-// }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[TypeDeclaration: Name={0}, Modifier={1}, Type={2}, BaseType={3}]",
- name,
- modifier,
- type,
- baseType
-// ,GetCollectionString(bases)
- );
- }
-
- }
-}
+// TypeDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class TypeDeclaration : AbstractNode
+ {
+ // Children of Enum : [Field]
+ string name;
+ Modifier modifier;
+ Types type; // Class | Interface | Structure | Enum | Module
+ string baseType = null;
+ ArrayList attributes;
+ ArrayList baseInterfaces;
+
+ public string BaseType {
+ get {
+ return baseType;
+ }
+ set {
+ baseType = value;
+ }
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+ public Types Type {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+ public ArrayList BaseInterfaces {
+ get {
+ return baseInterfaces;
+ }
+ set {
+ baseInterfaces = value;
+ }
+ }
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+// public TypeDeclaration(string name, Modifier modifier, Types type, StringCollection bases, ArrayList attributes)
+// {
+// this.name = name;
+// this.modifier = modifier;
+// this.type = type;
+// this.bases = bases;
+// this.attributes = attributes;
+// }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[TypeDeclaration: Name={0}, Modifier={1}, Type={2}, BaseType={3}]",
+ name,
+ modifier,
+ type,
+ baseType
+// ,GetCollectionString(bases)
+ );
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/GlobalScope/TypeDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,94 +1,94 @@
-using System;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public interface IASTVisitor
- {
- // Abstract
- object Visit(INode node, object data);
- object Visit(CompilationUnit compilationUnit, object data);
-
- // Statements
- object Visit(Statement statement, object data);
- object Visit(StatementExpression statementExpression, object data);
- object Visit(LocalVariableDeclaration localVariableDeclaration, object data);
- object Visit(SimpleIfStatement ifStatement, object data);
- object Visit(IfStatement ifStatement, object data);
- object Visit(LabelStatement labelStatement, object data);
- object Visit(GoToStatement goToStatement, object data);
- object Visit(SelectStatement selectStatement, object data);
- object Visit(StopStatement stopStatement, object data);
- object Visit(ResumeStatement resumeStatement, object data);
- object Visit(EraseStatement eraseStatement, object data);
- object Visit(ErrorStatement errorStatement, object data);
- object Visit(OnErrorStatement onErrorStatement, object data);
- object Visit(ReDimStatement reDimStatement, object data);
- object Visit(AddHandlerStatement addHandlerStatement, object data);
- object Visit(BlockStatement blockStatement, object data);
- object Visit(DoLoopStatement doLoopStatement, object data);
- object Visit(EndStatement endStatement, object data);
- object Visit(ExitStatement exitStatement, object data);
- object Visit(ForeachStatement foreachStatement, object data);
- object Visit(ForStatement forStatement, object data);
- object Visit(LockStatement lockStatement, object data);
- object Visit(RaiseEventStatement raiseEventStatement, object data);
- object Visit(RemoveHandlerStatement removeHandlerStatement, object data);
- object Visit(ReturnStatement returnStatement, object data);
- object Visit(ThrowStatement throwStatement, object data);
- object Visit(TryCatchStatement tryCatchStatement, object data);
- object Visit(WhileStatement whileStatement, object data);
- object Visit(WithStatement withStatement, object data);
-
- // Declarations
- object Visit(VariableDeclaration variableDeclaration, object data);
- object Visit(FieldDeclaration fieldDeclaration, object data);
-
- object Visit(MethodDeclaration methodDeclaration, object data);
- object Visit(ConstructorDeclaration constructorDeclaration, object data);
- object Visit(DeclareDeclaration declareDeclaration, object data);
- object Visit(PropertyDeclaration propertyDeclaration, object data);
- object Visit(PropertyGetRegion propertyGetRegion, object data);
- object Visit(PropertySetRegion PropertySetRegion, object data);
- object Visit(EventDeclaration eventDeclaration, object data);
-
- // Global scope
- object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data);
- object Visit(AttributeSection attributeDeclaration, object data);
- object Visit(DelegateDeclaration delegateDeclaration, object data);
- object Visit(ImportsDeclaration importsAliasDeclaration, object data);
- object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data);
- object Visit(ImportsStatement importsStatement, object data);
- object Visit(NamespaceDeclaration namespaceDeclaration, object data);
- object Visit(OptionCompareDeclaration optionCompareDeclaration, object data);
- object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data);
- object Visit(OptionStrictDeclaration optionStrictDeclaration, object data);
- object Visit(TypeDeclaration typeDeclaration, object data);
- object Visit(TypeReference typeReference, object data);
-
- // Expressions
- object Visit(PrimitiveExpression primitiveExpression, object data);
- object Visit(BinaryOperatorExpression binaryOperatorExpression, object data);
- object Visit(ParenthesizedExpression parenthesizedExpression, object data);
- object Visit(InvocationExpression invocationExpression, object data);
- object Visit(IdentifierExpression identifierExpression, object data);
- object Visit(TypeReferenceExpression typeReferenceExpression, object data);
- object Visit(UnaryOperatorExpression unaryOperatorExpression, object data);
- object Visit(AssignmentExpression assignmentExpression, object data);
- object Visit(CastExpression castExpression, object data);
- object Visit(ThisReferenceExpression thisReferenceExpression, object data);
- object Visit(BaseReferenceExpression baseReferenceExpression, object data);
- object Visit(ObjectCreateExpression objectCreateExpression, object data);
- object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data);
- object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data);
- object Visit(ArrayInitializerExpression arrayInitializerExpression, object data);
- object Visit(GetTypeExpression getTypeExpression, object data);
- object Visit(ClassReferenceExpression classReferenceExpression, object data);
- object Visit(LoopControlVariableExpression loopControlVariableExpression, object data);
- object Visit(NamedArgumentExpression namedArgumentExpression, object data);
- object Visit(AddressOfExpression addressOfExpression, object data);
- object Visit(TypeOfExpression typeOfExpression, object data);
- object Visit(ArrayCreateExpression arrayCreateExpression, object data);
-
- }
-}
+using System;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public interface IASTVisitor
+ {
+ // Abstract
+ object Visit(INode node, object data);
+ object Visit(CompilationUnit compilationUnit, object data);
+
+ // Statements
+ object Visit(Statement statement, object data);
+ object Visit(StatementExpression statementExpression, object data);
+ object Visit(LocalVariableDeclaration localVariableDeclaration, object data);
+ object Visit(SimpleIfStatement ifStatement, object data);
+ object Visit(IfStatement ifStatement, object data);
+ object Visit(LabelStatement labelStatement, object data);
+ object Visit(GoToStatement goToStatement, object data);
+ object Visit(SelectStatement selectStatement, object data);
+ object Visit(StopStatement stopStatement, object data);
+ object Visit(ResumeStatement resumeStatement, object data);
+ object Visit(EraseStatement eraseStatement, object data);
+ object Visit(ErrorStatement errorStatement, object data);
+ object Visit(OnErrorStatement onErrorStatement, object data);
+ object Visit(ReDimStatement reDimStatement, object data);
+ object Visit(AddHandlerStatement addHandlerStatement, object data);
+ object Visit(BlockStatement blockStatement, object data);
+ object Visit(DoLoopStatement doLoopStatement, object data);
+ object Visit(EndStatement endStatement, object data);
+ object Visit(ExitStatement exitStatement, object data);
+ object Visit(ForeachStatement foreachStatement, object data);
+ object Visit(ForStatement forStatement, object data);
+ object Visit(LockStatement lockStatement, object data);
+ object Visit(RaiseEventStatement raiseEventStatement, object data);
+ object Visit(RemoveHandlerStatement removeHandlerStatement, object data);
+ object Visit(ReturnStatement returnStatement, object data);
+ object Visit(ThrowStatement throwStatement, object data);
+ object Visit(TryCatchStatement tryCatchStatement, object data);
+ object Visit(WhileStatement whileStatement, object data);
+ object Visit(WithStatement withStatement, object data);
+
+ // Declarations
+ object Visit(VariableDeclaration variableDeclaration, object data);
+ object Visit(FieldDeclaration fieldDeclaration, object data);
+
+ object Visit(MethodDeclaration methodDeclaration, object data);
+ object Visit(ConstructorDeclaration constructorDeclaration, object data);
+ object Visit(DeclareDeclaration declareDeclaration, object data);
+ object Visit(PropertyDeclaration propertyDeclaration, object data);
+ object Visit(PropertyGetRegion propertyGetRegion, object data);
+ object Visit(PropertySetRegion PropertySetRegion, object data);
+ object Visit(EventDeclaration eventDeclaration, object data);
+
+ // Global scope
+ object Visit(ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute, object data);
+ object Visit(AttributeSection attributeDeclaration, object data);
+ object Visit(DelegateDeclaration delegateDeclaration, object data);
+ object Visit(ImportsDeclaration importsAliasDeclaration, object data);
+ object Visit(ImportsAliasDeclaration importsAliasDeclaration, object data);
+ object Visit(ImportsStatement importsStatement, object data);
+ object Visit(NamespaceDeclaration namespaceDeclaration, object data);
+ object Visit(OptionCompareDeclaration optionCompareDeclaration, object data);
+ object Visit(OptionExplicitDeclaration optionExplicitDeclaration, object data);
+ object Visit(OptionStrictDeclaration optionStrictDeclaration, object data);
+ object Visit(TypeDeclaration typeDeclaration, object data);
+ object Visit(TypeReference typeReference, object data);
+
+ // Expressions
+ object Visit(PrimitiveExpression primitiveExpression, object data);
+ object Visit(BinaryOperatorExpression binaryOperatorExpression, object data);
+ object Visit(ParenthesizedExpression parenthesizedExpression, object data);
+ object Visit(InvocationExpression invocationExpression, object data);
+ object Visit(IdentifierExpression identifierExpression, object data);
+ object Visit(TypeReferenceExpression typeReferenceExpression, object data);
+ object Visit(UnaryOperatorExpression unaryOperatorExpression, object data);
+ object Visit(AssignmentExpression assignmentExpression, object data);
+ object Visit(CastExpression castExpression, object data);
+ object Visit(ThisReferenceExpression thisReferenceExpression, object data);
+ object Visit(BaseReferenceExpression baseReferenceExpression, object data);
+ object Visit(ObjectCreateExpression objectCreateExpression, object data);
+ object Visit(ParameterDeclarationExpression parameterDeclarationExpression, object data);
+ object Visit(FieldReferenceOrInvocationExpression fieldReferenceOrInvocationExpression, object data);
+ object Visit(ArrayInitializerExpression arrayInitializerExpression, object data);
+ object Visit(GetTypeExpression getTypeExpression, object data);
+ object Visit(ClassReferenceExpression classReferenceExpression, object data);
+ object Visit(LoopControlVariableExpression loopControlVariableExpression, object data);
+ object Visit(NamedArgumentExpression namedArgumentExpression, object data);
+ object Visit(AddressOfExpression addressOfExpression, object data);
+ object Visit(TypeOfExpression typeOfExpression, object data);
+ object Visit(ArrayCreateExpression arrayCreateExpression, object data);
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/IASTVisitor.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,67 +1,67 @@
-// INode.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Drawing;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public interface INode
- {
- INode Parent {
- get;
- set;
- }
-
- Hashtable Specials {
- get;
- }
-
- ArrayList Children {
- get;
- }
-
- Point StartLocation {
- get;
- set;
- }
-
- Point EndLocation {
- get;
- set;
- }
-
- /// <summary>
- /// Visits all children
- /// </summary>
- /// <param name="visitor">The visitor to accept</param>
- /// <param name="data">Additional data for the visitor</param>
- /// <returns>The paremeter <paramref name="data"/></returns>
- object AcceptChildren(IASTVisitor visitor, object data);
-
- /// <summary>
- /// Accept the visitor
- /// </summary>
- /// <param name="visitor">The visitor to accept</param>
- /// <param name="data">Additional data for the visitor</param>
- /// <returns>The value the visitor returns after the visit</returns>
- object AcceptVisitor(IASTVisitor visitor, object data);
- }
-}
+// INode.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public interface INode
+ {
+ INode Parent {
+ get;
+ set;
+ }
+
+ Hashtable Specials {
+ get;
+ }
+
+ ArrayList Children {
+ get;
+ }
+
+ Point StartLocation {
+ get;
+ set;
+ }
+
+ Point EndLocation {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// Visits all children
+ /// </summary>
+ /// <param name="visitor">The visitor to accept</param>
+ /// <param name="data">Additional data for the visitor</param>
+ /// <returns>The paremeter <paramref name="data"/></returns>
+ object AcceptChildren(IASTVisitor visitor, object data);
+
+ /// <summary>
+ /// Accept the visitor
+ /// </summary>
+ /// <param name="visitor">The visitor to accept</param>
+ /// <param name="data">Additional data for the visitor</param>
+ /// <returns>The value the visitor returns after the visit</returns>
+ object AcceptVisitor(IASTVisitor visitor, object data);
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/INode.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,98 +1,98 @@
-using System;
-using System.Drawing;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class LocalLookupVariable
- {
- TypeReference typeRef;
- Point startPos;
- Point endPos;
-
- public TypeReference TypeRef {
- get {
- return typeRef;
- }
- }
- public Point StartPos {
- get {
- return startPos;
- }
- }
- public Point EndPos {
- get {
- return endPos;
- }
- }
-
- public LocalLookupVariable(TypeReference typeRef, Point startPos, Point endPos)
- {
- this.typeRef = typeRef;
- this.startPos = startPos;
- this.endPos = endPos;
- }
- }
-
- public class LookupTableVisitor : AbstractASTVisitor
- {
- Hashtable variables = new Hashtable();
- ArrayList withStatements = new ArrayList();
-
- public Hashtable Variables {
- get {
- return variables;
- }
- }
-
- public ArrayList WithStatements {
- get {
- return withStatements;
- }
- }
-
- public void AddVariable(TypeReference typeRef, string name, Point startPos, Point endPos)
- {
- if (name == null || name.Length == 0) {
- return;
- }
- name = name.ToLower();
- ArrayList list;
- if (variables[name] == null) {
- variables[name] = list = new ArrayList();
- } else {
- list = (ArrayList)variables[name];
- }
- list.Add(new LocalLookupVariable(typeRef, startPos, endPos));
- }
-
- public override object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
- {
- foreach (VariableDeclaration varDecl in localVariableDeclaration.Variables) {
- AddVariable(varDecl.Type,
- varDecl.Name,
- localVariableDeclaration.StartLocation,
- CurrentBlock == null ? new Point(-1, -1) : CurrentBlock.EndLocation);
- }
- return data;
- }
-
- public override object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
- {
- AddVariable(loopControlVariableExpression.Type,
- loopControlVariableExpression.Name,
- loopControlVariableExpression.StartLocation,
- CurrentBlock == null ? new Point(-1, -1) : CurrentBlock.EndLocation);
- return data;
- }
-
- public override object Visit(WithStatement withStatement, object data)
- {
- withStatements.Add(withStatement);
- return base.Visit(withStatement, data);
- }
-
- }
-}
+using System;
+using System.Drawing;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class LocalLookupVariable
+ {
+ TypeReference typeRef;
+ Point startPos;
+ Point endPos;
+
+ public TypeReference TypeRef {
+ get {
+ return typeRef;
+ }
+ }
+ public Point StartPos {
+ get {
+ return startPos;
+ }
+ }
+ public Point EndPos {
+ get {
+ return endPos;
+ }
+ }
+
+ public LocalLookupVariable(TypeReference typeRef, Point startPos, Point endPos)
+ {
+ this.typeRef = typeRef;
+ this.startPos = startPos;
+ this.endPos = endPos;
+ }
+ }
+
+ public class LookupTableVisitor : AbstractASTVisitor
+ {
+ Hashtable variables = new Hashtable();
+ ArrayList withStatements = new ArrayList();
+
+ public Hashtable Variables {
+ get {
+ return variables;
+ }
+ }
+
+ public ArrayList WithStatements {
+ get {
+ return withStatements;
+ }
+ }
+
+ public void AddVariable(TypeReference typeRef, string name, Point startPos, Point endPos)
+ {
+ if (name == null || name.Length == 0) {
+ return;
+ }
+ name = name.ToLower();
+ ArrayList list;
+ if (variables[name] == null) {
+ variables[name] = list = new ArrayList();
+ } else {
+ list = (ArrayList)variables[name];
+ }
+ list.Add(new LocalLookupVariable(typeRef, startPos, endPos));
+ }
+
+ public override object Visit(LocalVariableDeclaration localVariableDeclaration, object data)
+ {
+ foreach (VariableDeclaration varDecl in localVariableDeclaration.Variables) {
+ AddVariable(varDecl.Type,
+ varDecl.Name,
+ localVariableDeclaration.StartLocation,
+ CurrentBlock == null ? new Point(-1, -1) : CurrentBlock.EndLocation);
+ }
+ return data;
+ }
+
+ public override object Visit(LoopControlVariableExpression loopControlVariableExpression, object data)
+ {
+ AddVariable(loopControlVariableExpression.Type,
+ loopControlVariableExpression.Name,
+ loopControlVariableExpression.StartLocation,
+ CurrentBlock == null ? new Point(-1, -1) : CurrentBlock.EndLocation);
+ return data;
+ }
+
+ public override object Visit(WithStatement withStatement, object data)
+ {
+ withStatements.Add(withStatement);
+ return base.Visit(withStatement, data);
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/LookupTableVisitor.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,74 +1,74 @@
-using System;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
-
- [Flags()]
- public enum ParamModifier
- {
- None = 0x0000, // 0
- ByVal = 0x0001, // 1
- ByRef = 0x0002, // 2
- ParamArray = 0x0004, // 4
- Optional = 0x0008, // 8
- All = ByVal | ByRef | ParamArray | Optional
- }
-
- [Flags()]
- public enum Modifier
- {
- None = 0x0000, // 0
-
- // Access
- Private = 0x0001, // 1
- Friend = 0x0002, // 2
- Protected = 0x0004, // 4
- Public = 0x0008, // 8
- Dim = 0x0010, // 16
-
- // Scope
- Shadows = 0x000020, // 32
- Overloads = 0x000040, // 64
- Overrides = 0x000080, // 128
- NotOverridable = 0x000100, // 256
- MustOverride = 0x000200, // 512
- MustInherit = 0x000400, // 1024
- NotInheritable = 0x000800, // 2048
- Shared = 0x001000, // 4096
- Overridable = 0x002000, // 8192
- Constant = 0x004000,
- // Methods and properties
- WithEvents = 0x008000,
- ReadOnly = 0x010000,
- WriteOnly = 0x020000,
- Default = 0x040000,
-
- // local variables
- Static = 0x100000,
-
- All = Private | Public | Protected | Friend | Shadows | Constant |
- Overloads | Overrides | NotOverridable | MustOverride |
- MustInherit | NotInheritable | Shared | Overridable |
- WithEvents | ReadOnly | WriteOnly | Default | Dim,
-
- Classes = Private | Public | Protected | Friend | Shadows | MustInherit | NotInheritable,
- Structures = Private | Public | Protected | Friend | Shadows,
- Enums = Private | Public | Protected | Friend | Shadows,
- Modules = Private | Public | Protected | Friend,
- Interfaces = Private | Public | Protected | Friend | Shadows,
- Delegates = Private | Public | Protected | Friend | Shadows,
- Methods = Private | Public | Protected | Friend | Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | Overloads,
- ExternalMethods = Private | Public | Protected | Friend | Shadows | Overloads,
- Constructors = Private | Public | Protected | Friend | Shared,
- Events = Private | Public | Protected | Friend | Shadows | Shared,
- Constants = Private | Public | Protected | Friend | Shadows,
- Fields = Private | Public | Protected | Friend | Shadows | Shared | ReadOnly | WithEvents | Dim ,
- Properties = Private | Public | Protected | Friend | Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | Overloads | Default | ReadOnly | WriteOnly,
-
- // this is not documented in the spec
- InterfaceEvents = Shadows,
- InterfaceMethods = Shadows | Overloads,
- InterfaceProperties = Shadows | Overloads | ReadOnly | WriteOnly | Default,
- InterfaceEnums = Shadows,
- }
-}
+using System;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+
+ [Flags()]
+ public enum ParamModifier
+ {
+ None = 0x0000, // 0
+ ByVal = 0x0001, // 1
+ ByRef = 0x0002, // 2
+ ParamArray = 0x0004, // 4
+ Optional = 0x0008, // 8
+ All = ByVal | ByRef | ParamArray | Optional
+ }
+
+ [Flags()]
+ public enum Modifier
+ {
+ None = 0x0000, // 0
+
+ // Access
+ Private = 0x0001, // 1
+ Friend = 0x0002, // 2
+ Protected = 0x0004, // 4
+ Public = 0x0008, // 8
+ Dim = 0x0010, // 16
+
+ // Scope
+ Shadows = 0x000020, // 32
+ Overloads = 0x000040, // 64
+ Overrides = 0x000080, // 128
+ NotOverridable = 0x000100, // 256
+ MustOverride = 0x000200, // 512
+ MustInherit = 0x000400, // 1024
+ NotInheritable = 0x000800, // 2048
+ Shared = 0x001000, // 4096
+ Overridable = 0x002000, // 8192
+ Constant = 0x004000,
+ // Methods and properties
+ WithEvents = 0x008000,
+ ReadOnly = 0x010000,
+ WriteOnly = 0x020000,
+ Default = 0x040000,
+
+ // local variables
+ Static = 0x100000,
+
+ All = Private | Public | Protected | Friend | Shadows | Constant |
+ Overloads | Overrides | NotOverridable | MustOverride |
+ MustInherit | NotInheritable | Shared | Overridable |
+ WithEvents | ReadOnly | WriteOnly | Default | Dim,
+
+ Classes = Private | Public | Protected | Friend | Shadows | MustInherit | NotInheritable,
+ Structures = Private | Public | Protected | Friend | Shadows,
+ Enums = Private | Public | Protected | Friend | Shadows,
+ Modules = Private | Public | Protected | Friend,
+ Interfaces = Private | Public | Protected | Friend | Shadows,
+ Delegates = Private | Public | Protected | Friend | Shadows,
+ Methods = Private | Public | Protected | Friend | Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | Overloads,
+ ExternalMethods = Private | Public | Protected | Friend | Shadows | Overloads,
+ Constructors = Private | Public | Protected | Friend | Shared,
+ Events = Private | Public | Protected | Friend | Shadows | Shared,
+ Constants = Private | Public | Protected | Friend | Shadows,
+ Fields = Private | Public | Protected | Friend | Shadows | Shared | ReadOnly | WithEvents | Dim ,
+ Properties = Private | Public | Protected | Friend | Shadows | Shared | Overridable | NotOverridable | MustOverride | Overrides | Overloads | Default | ReadOnly | WriteOnly,
+
+ // this is not documented in the spec
+ InterfaceEvents = Shadows,
+ InterfaceMethods = Shadows | Overloads,
+ InterfaceProperties = Shadows | Overloads | ReadOnly | WriteOnly | Default,
+ InterfaceEnums = Shadows,
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Modifier.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,41 +1,41 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class AddHandlerStatement : Statement
- {
- Expression eventExpression;
- Expression handlerExpression;
-
- public Expression EventExpression {
- get {
- return eventExpression;
- }
- set {
- eventExpression = value;
- }
- }
- public Expression HandlerExpression {
- get {
- return handlerExpression;
- }
- set {
- handlerExpression = value;
- }
- }
-
- public AddHandlerStatement(Expression eventExpression, Expression handlerExpression)
- {
- this.eventExpression = eventExpression;
- this.handlerExpression = handlerExpression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class AddHandlerStatement : Statement
+ {
+ Expression eventExpression;
+ Expression handlerExpression;
+
+ public Expression EventExpression {
+ get {
+ return eventExpression;
+ }
+ set {
+ eventExpression = value;
+ }
+ }
+ public Expression HandlerExpression {
+ get {
+ return handlerExpression;
+ }
+ set {
+ handlerExpression = value;
+ }
+ }
+
+ public AddHandlerStatement(Expression eventExpression, Expression handlerExpression)
+ {
+ this.eventExpression = eventExpression;
+ this.handlerExpression = handlerExpression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/AddHandlerStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,21 +1,21 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class BlockStatement : Statement
- {
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[BlockStatement: Children={0}]",
- GetCollectionString(base.Children));
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class BlockStatement : Statement
+ {
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[BlockStatement: Children={0}]",
+ GetCollectionString(base.Children));
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/BlockStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,64 +1,64 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class DoLoopStatement : Statement
- {
- Expression condition;
- Statement embeddedStatement;
- ConditionType conditionType;
- ConditionPosition conditionPosition;
-
- public ConditionPosition ConditionPosition {
- get {
- return conditionPosition;
- }
- set {
- conditionPosition = value;
- }
- }
-
- public ConditionType ConditionType {
- get {
- return conditionType;
- }
- set {
- conditionType = value;
- }
- }
-
- public Expression Condition {
- get {
- return condition;
- }
- set {
- condition = value;
- }
- }
-
- public Statement EmbeddedStatement {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public DoLoopStatement(Expression condition, Statement embeddedStatement, ConditionType conditionType, ConditionPosition conditionPosition)
- {
- this.condition = condition;
- this.embeddedStatement = embeddedStatement;
- this.conditionType = conditionType;
- this.conditionPosition = conditionPosition;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class DoLoopStatement : Statement
+ {
+ Expression condition;
+ Statement embeddedStatement;
+ ConditionType conditionType;
+ ConditionPosition conditionPosition;
+
+ public ConditionPosition ConditionPosition {
+ get {
+ return conditionPosition;
+ }
+ set {
+ conditionPosition = value;
+ }
+ }
+
+ public ConditionType ConditionType {
+ get {
+ return conditionType;
+ }
+ set {
+ conditionType = value;
+ }
+ }
+
+ public Expression Condition {
+ get {
+ return condition;
+ }
+ set {
+ condition = value;
+ }
+ }
+
+ public Statement EmbeddedStatement {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public DoLoopStatement(Expression condition, Statement embeddedStatement, ConditionType conditionType, ConditionPosition conditionPosition)
+ {
+ this.condition = condition;
+ this.embeddedStatement = embeddedStatement;
+ this.conditionType = conditionType;
+ this.conditionPosition = conditionPosition;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/DoLoopStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,20 +1,20 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class EndStatement : Statement
- {
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[EndStatement]");
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class EndStatement : Statement
+ {
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[EndStatement]");
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EndStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,31 +1,31 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class EraseStatement : Statement
- {
- ArrayList expressions;
-
- public ArrayList Expressions
- {
- get {
- return expressions;
- } set {
- expressions = value;
- }
- }
-
- public EraseStatement(ArrayList expressions)
- {
- this.expressions = expressions;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class EraseStatement : Statement
+ {
+ ArrayList expressions;
+
+ public ArrayList Expressions
+ {
+ get {
+ return expressions;
+ } set {
+ expressions = value;
+ }
+ }
+
+ public EraseStatement(ArrayList expressions)
+ {
+ this.expressions = expressions;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/EraseStatements.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,31 +1,31 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ErrorStatement : Statement
- {
- Expression expression;
-
- public ErrorStatement(Expression expression)
- {
- this.expression = expression;
- }
-
- public Expression Expression
- {
- get {
- return expression;
- }set {
- expression = value;
- }
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ErrorStatement : Statement
+ {
+ Expression expression;
+
+ public ErrorStatement(Expression expression)
+ {
+ this.expression = expression;
+ }
+
+ public Expression Expression
+ {
+ get {
+ return expression;
+ }set {
+ expression = value;
+ }
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ErrorStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,36 +1,36 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ExitStatement : Statement
- {
- ExitType exitType;
-
- public ExitType ExitType {
- get {
- return exitType;
- }
- set {
- exitType = value;
- }
- }
-
- public ExitStatement(ExitType exitType)
- {
- this.exitType = exitType;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ExitStatement]");
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ExitStatement : Statement
+ {
+ ExitType exitType;
+
+ public ExitType ExitType {
+ get {
+ return exitType;
+ }
+ set {
+ exitType = value;
+ }
+ }
+
+ public ExitStatement(ExitType exitType)
+ {
+ this.exitType = exitType;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ExitStatement]");
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ExitStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,92 +1,92 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ForStatement : Statement
- {
- Expression start;
- Expression end;
- Expression step;
- Statement embeddedStatement;
- ArrayList nextExpressions;
- LoopControlVariableExpression loopControlVariable;
-
- public LoopControlVariableExpression LoopControlVariable
- {
- get {
- return loopControlVariable;
- }
- set {
- loopControlVariable = value;
- }
- }
-
- public ArrayList NextExpressions
- {
- get {
- return nextExpressions;
- }
- set {
- nextExpressions = value;
- }
- }
-
- public Expression Start
- {
- get {
- return start;
- }
- set {
- start = value;
- }
- }
-
- public Expression End
- {
- get {
- return end;
- }
- set {
- end = value;
- }
- }
-
- public Expression Step
- {
- get {
- return step;
- }
- set {
- step = value;
- }
- }
-
- public Statement EmbeddedStatement
- {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public ForStatement(LoopControlVariableExpression loopControlVariable, Expression start, Expression end, Expression step, Statement embeddedStatement, ArrayList nextExpressions)
- {
- this.start = start;
- this.nextExpressions = nextExpressions;
- this.end = end;
- this.step = step;
- this.embeddedStatement = embeddedStatement;
- this.loopControlVariable = loopControlVariable;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ForStatement : Statement
+ {
+ Expression start;
+ Expression end;
+ Expression step;
+ Statement embeddedStatement;
+ ArrayList nextExpressions;
+ LoopControlVariableExpression loopControlVariable;
+
+ public LoopControlVariableExpression LoopControlVariable
+ {
+ get {
+ return loopControlVariable;
+ }
+ set {
+ loopControlVariable = value;
+ }
+ }
+
+ public ArrayList NextExpressions
+ {
+ get {
+ return nextExpressions;
+ }
+ set {
+ nextExpressions = value;
+ }
+ }
+
+ public Expression Start
+ {
+ get {
+ return start;
+ }
+ set {
+ start = value;
+ }
+ }
+
+ public Expression End
+ {
+ get {
+ return end;
+ }
+ set {
+ end = value;
+ }
+ }
+
+ public Expression Step
+ {
+ get {
+ return step;
+ }
+ set {
+ step = value;
+ }
+ }
+
+ public Statement EmbeddedStatement
+ {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public ForStatement(LoopControlVariableExpression loopControlVariable, Expression start, Expression end, Expression step, Statement embeddedStatement, ArrayList nextExpressions)
+ {
+ this.start = start;
+ this.nextExpressions = nextExpressions;
+ this.end = end;
+ this.step = step;
+ this.embeddedStatement = embeddedStatement;
+ this.loopControlVariable = loopControlVariable;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,64 +1,64 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ForeachStatement : Statement
- {
- LoopControlVariableExpression loopControlVariable;
- Expression expression;
- Statement embeddedStatement;
- Expression element;
-
- public LoopControlVariableExpression LoopControlVariable
- {
- get {
- return loopControlVariable;
- }
- set {
- loopControlVariable = value;
- }
- }
-
- public Expression Element {
- get {
- return element;
- }
- set {
- element = value;
- }
- }
-
- public Expression Expression {
- get {
- return expression;
- }
- set {
- expression = value;
- }
- }
-
- public Statement EmbeddedStatement {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public ForeachStatement(LoopControlVariableExpression loopControlVariable , Expression expression, Statement embeddedStatement, Expression element)
- {
- this.loopControlVariable = loopControlVariable;
- this.expression = expression;
- this.embeddedStatement = embeddedStatement;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ForeachStatement : Statement
+ {
+ LoopControlVariableExpression loopControlVariable;
+ Expression expression;
+ Statement embeddedStatement;
+ Expression element;
+
+ public LoopControlVariableExpression LoopControlVariable
+ {
+ get {
+ return loopControlVariable;
+ }
+ set {
+ loopControlVariable = value;
+ }
+ }
+
+ public Expression Element {
+ get {
+ return element;
+ }
+ set {
+ element = value;
+ }
+ }
+
+ public Expression Expression {
+ get {
+ return expression;
+ }
+ set {
+ expression = value;
+ }
+ }
+
+ public Statement EmbeddedStatement {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public ForeachStatement(LoopControlVariableExpression loopControlVariable , Expression expression, Statement embeddedStatement, Expression element)
+ {
+ this.loopControlVariable = loopControlVariable;
+ this.expression = expression;
+ this.embeddedStatement = embeddedStatement;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ForeachStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,32 +1,32 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class GoToStatement : Statement
- {
- string labelName;
-
- public string LabelName
- {
- get {
- return labelName;
- }
- set {
- labelName = value;
- }
- }
-
- public GoToStatement(string labelName)
- {
- this.labelName = labelName;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class GoToStatement : Statement
+ {
+ string labelName;
+
+ public string LabelName
+ {
+ get {
+ return labelName;
+ }
+ set {
+ labelName = value;
+ }
+ }
+
+ public GoToStatement(string labelName)
+ {
+ this.labelName = labelName;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/GoToStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,147 +1,147 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class IfStatement : Statement
- {
- Expression condition;
- Statement embeddedElseStatement;
- Statement embeddedStatement;
- ArrayList elseIfStatements;
-
- public ArrayList ElseIfStatements
- {
- get {
- return elseIfStatements;
- }
- set {
- elseIfStatements = value;
- }
- }
-
- public Statement EmbeddedElseStatement
- {
- get {
- return embeddedElseStatement;
- }
- set {
- embeddedElseStatement = value;
- }
- }
-
- public Expression Condition
- {
- get {
- return condition;
- }
- set {
- condition = value;
- }
- }
-
- public Statement EmbeddedStatement
- {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public IfStatement(Expression condition, Statement embeddedStatement)
- {
- this.condition = condition;
- this.embeddedStatement = embeddedStatement;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-
- public class ElseIfSection : Statement
- {
- Expression condition;
- Statement embeddedStatement;
-
- public Expression Condition
- {
- get {
- return condition;
- }
- set {
- condition = value;
- }
- }
- public Statement EmbeddedStatement
- {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public ElseIfSection(Expression condition, Statement embeddedStatement)
- {
- this.condition = condition;
- this.embeddedStatement = embeddedStatement;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-
- public class SimpleIfStatement : Statement
- {
- Expression condition;
- ArrayList statements;
- ArrayList elseStatements;
-
- public ArrayList ElseStatements
- {
- get {
- return elseStatements;
- }
- set {
- elseStatements = value;
- }
- }
-
- public Expression Condition {
- get {
- return condition;
- }
- set {
- condition = value;
- }
- }
- public ArrayList Statements {
- get {
- return statements;
- }
- set {
- statements = value;
- }
- }
-
- public SimpleIfStatement(Expression condition)
- {
- this.condition = condition;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
-
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class IfStatement : Statement
+ {
+ Expression condition;
+ Statement embeddedElseStatement;
+ Statement embeddedStatement;
+ ArrayList elseIfStatements;
+
+ public ArrayList ElseIfStatements
+ {
+ get {
+ return elseIfStatements;
+ }
+ set {
+ elseIfStatements = value;
+ }
+ }
+
+ public Statement EmbeddedElseStatement
+ {
+ get {
+ return embeddedElseStatement;
+ }
+ set {
+ embeddedElseStatement = value;
+ }
+ }
+
+ public Expression Condition
+ {
+ get {
+ return condition;
+ }
+ set {
+ condition = value;
+ }
+ }
+
+ public Statement EmbeddedStatement
+ {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public IfStatement(Expression condition, Statement embeddedStatement)
+ {
+ this.condition = condition;
+ this.embeddedStatement = embeddedStatement;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+
+ public class ElseIfSection : Statement
+ {
+ Expression condition;
+ Statement embeddedStatement;
+
+ public Expression Condition
+ {
+ get {
+ return condition;
+ }
+ set {
+ condition = value;
+ }
+ }
+ public Statement EmbeddedStatement
+ {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public ElseIfSection(Expression condition, Statement embeddedStatement)
+ {
+ this.condition = condition;
+ this.embeddedStatement = embeddedStatement;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+
+ public class SimpleIfStatement : Statement
+ {
+ Expression condition;
+ ArrayList statements;
+ ArrayList elseStatements;
+
+ public ArrayList ElseStatements
+ {
+ get {
+ return elseStatements;
+ }
+ set {
+ elseStatements = value;
+ }
+ }
+
+ public Expression Condition {
+ get {
+ return condition;
+ }
+ set {
+ condition = value;
+ }
+ }
+ public ArrayList Statements {
+ get {
+ return statements;
+ }
+ set {
+ statements = value;
+ }
+ }
+
+ public SimpleIfStatement(Expression condition)
+ {
+ this.condition = condition;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/IfStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class LabelStatement : Statement
- {
- string label;
- Statement embeddedStatement;
-
- public Statement EmbeddedStatement
- {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public string Label {
- get {
- return label;
- }
- set {
- label = value;
- }
- }
-
- public LabelStatement(string label)
- {
- this.label = label;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[LabelStatement: Label={0}]",
- label);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class LabelStatement : Statement
+ {
+ string label;
+ Statement embeddedStatement;
+
+ public Statement EmbeddedStatement
+ {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public string Label {
+ get {
+ return label;
+ }
+ set {
+ label = value;
+ }
+ }
+
+ public LabelStatement(string label)
+ {
+ this.label = label;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[LabelStatement: Label={0}]",
+ label);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LabelStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,67 +1,67 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class LocalVariableDeclaration : Statement
- {
- Modifier modifier = Modifier.None;
- ArrayList variables = new ArrayList(); // [VariableDeclaration]
- INode block;
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public ArrayList Variables {
- get {
- return variables;
- } set {
- variables = value;
- }
- }
-
- public INode Block {
- get {
- return block;
- }
- set {
- block = value;
- }
- }
-
- public LocalVariableDeclaration(Modifier modifier)
- {
- this.modifier = modifier;
- }
-
- public VariableDeclaration GetVariableDeclaration(string variableName)
- {
- foreach (VariableDeclaration variableDeclaration in variables) {
- if (variableDeclaration.Name == variableName) {
- return variableDeclaration;
- }
- }
- return null;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[LocalVariableDeclaration: Modifier ={0} Variables={1}]",
- modifier,
- GetCollectionString(variables));
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class LocalVariableDeclaration : Statement
+ {
+ Modifier modifier = Modifier.None;
+ ArrayList variables = new ArrayList(); // [VariableDeclaration]
+ INode block;
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public ArrayList Variables {
+ get {
+ return variables;
+ } set {
+ variables = value;
+ }
+ }
+
+ public INode Block {
+ get {
+ return block;
+ }
+ set {
+ block = value;
+ }
+ }
+
+ public LocalVariableDeclaration(Modifier modifier)
+ {
+ this.modifier = modifier;
+ }
+
+ public VariableDeclaration GetVariableDeclaration(string variableName)
+ {
+ foreach (VariableDeclaration variableDeclaration in variables) {
+ if (variableDeclaration.Name == variableName) {
+ return variableDeclaration;
+ }
+ }
+ return null;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[LocalVariableDeclaration: Modifier ={0} Variables={1}]",
+ modifier,
+ GetCollectionString(variables));
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LocalVariableDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,46 +1,46 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class LockStatement : Statement
- {
- Expression lockExpression;
- Statement embeddedStatement;
-
- public Expression LockExpression {
- get {
- return lockExpression;
- }
- set {
- lockExpression = value;
- }
- }
- public Statement EmbeddedStatement {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
- public LockStatement(Expression lockExpression, Statement embeddedStatement)
- {
- this.lockExpression = lockExpression;
- this.embeddedStatement = embeddedStatement;
- }
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[LockStatement: LockExpression={0}, EmbeddedStatement={1}]",
- lockExpression,
- embeddedStatement);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class LockStatement : Statement
+ {
+ Expression lockExpression;
+ Statement embeddedStatement;
+
+ public Expression LockExpression {
+ get {
+ return lockExpression;
+ }
+ set {
+ lockExpression = value;
+ }
+ }
+ public Statement EmbeddedStatement {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+ public LockStatement(Expression lockExpression, Statement embeddedStatement)
+ {
+ this.lockExpression = lockExpression;
+ this.embeddedStatement = embeddedStatement;
+ }
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[LockStatement: LockExpression={0}, EmbeddedStatement={1}]",
+ lockExpression,
+ embeddedStatement);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/LockStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,32 +1,32 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class OnErrorStatement : Statement
- {
- Statement embeddedStatement;
-
- public Statement EmbeddedStatement
- {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public OnErrorStatement(Statement embeddedStatement)
- {
- this.embeddedStatement = embeddedStatement;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class OnErrorStatement : Statement
+ {
+ Statement embeddedStatement;
+
+ public Statement EmbeddedStatement
+ {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public OnErrorStatement(Statement embeddedStatement)
+ {
+ this.embeddedStatement = embeddedStatement;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/OnErrorStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,47 +1,47 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class RaiseEventStatement : Statement
- {
- string eventName;
- ArrayList parameters;
-
- public string EventName {
- get {
- return eventName;
- }
- set {
- eventName = value;
- }
- }
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public RaiseEventStatement(string eventName, ArrayList parameters)
- {
- this.eventName = eventName;
- this.parameters = parameters;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[RaiseEventStatement: EventName={0}]",
- EventName);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class RaiseEventStatement : Statement
+ {
+ string eventName;
+ ArrayList parameters;
+
+ public string EventName {
+ get {
+ return eventName;
+ }
+ set {
+ eventName = value;
+ }
+ }
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public RaiseEventStatement(string eventName, ArrayList parameters)
+ {
+ this.eventName = eventName;
+ this.parameters = parameters;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[RaiseEventStatement: EventName={0}]",
+ EventName);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RaiseEventStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,31 +1,31 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ReDimStatement : Statement
- {
- ArrayList reDimClauses;
-
- public ArrayList ReDimClauses
- {
- get {
- return reDimClauses;
- } set {
- reDimClauses = value;
- }
- }
-
- public ReDimStatement(ArrayList reDimClauses)
- {
- this.reDimClauses = reDimClauses;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ReDimStatement : Statement
+ {
+ ArrayList reDimClauses;
+
+ public ArrayList ReDimClauses
+ {
+ get {
+ return reDimClauses;
+ } set {
+ reDimClauses = value;
+ }
+ }
+
+ public ReDimStatement(ArrayList reDimClauses)
+ {
+ this.reDimClauses = reDimClauses;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReDimStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,41 +1,41 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class RemoveHandlerStatement : Statement
- {
- Expression eventExpression;
- Expression handlerExpression;
-
- public Expression EventExpression {
- get {
- return eventExpression;
- }
- set {
- eventExpression = value;
- }
- }
- public Expression HandlerExpression {
- get {
- return handlerExpression;
- }
- set {
- handlerExpression = value;
- }
- }
-
- public RemoveHandlerStatement(Expression eventExpression, Expression handlerExpression)
- {
- this.eventExpression = eventExpression;
- this.handlerExpression = handlerExpression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class RemoveHandlerStatement : Statement
+ {
+ Expression eventExpression;
+ Expression handlerExpression;
+
+ public Expression EventExpression {
+ get {
+ return eventExpression;
+ }
+ set {
+ eventExpression = value;
+ }
+ }
+ public Expression HandlerExpression {
+ get {
+ return handlerExpression;
+ }
+ set {
+ handlerExpression = value;
+ }
+ }
+
+ public RemoveHandlerStatement(Expression eventExpression, Expression handlerExpression)
+ {
+ this.eventExpression = eventExpression;
+ this.handlerExpression = handlerExpression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/RemoveHandlerStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ResumeStatement : Statement
- {
- string labelName;
- bool next;
-
- public string LabelName
- {
- get {
- return labelName;
- }
- set {
- labelName = value;
- }
- }
-
- public bool Next
- {
- get {
- return next;
- }
- set {
- next = value;
- }
- }
-
- public ResumeStatement(bool next)
- {
- this.next = next;
- }
-
- public ResumeStatement(string labelName)
- {
- this.labelName = labelName;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ResumeStatement : Statement
+ {
+ string labelName;
+ bool next;
+
+ public string LabelName
+ {
+ get {
+ return labelName;
+ }
+ set {
+ labelName = value;
+ }
+ }
+
+ public bool Next
+ {
+ get {
+ return next;
+ }
+ set {
+ next = value;
+ }
+ }
+
+ public ResumeStatement(bool next)
+ {
+ this.next = next;
+ }
+
+ public ResumeStatement(string labelName)
+ {
+ this.labelName = labelName;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ResumeStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,37 +1,37 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ReturnStatement : Statement
- {
- Expression returnExpression;
-
- public Expression ReturnExpression {
- get {
- return returnExpression;
- }
- set {
- returnExpression = value;
- }
- }
-
- public ReturnStatement(Expression returnExpression)
- {
- this.returnExpression = returnExpression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ReturnStatement: ReturnExpression={0}]",
- returnExpression);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ReturnStatement : Statement
+ {
+ Expression returnExpression;
+
+ public Expression ReturnExpression {
+ get {
+ return returnExpression;
+ }
+ set {
+ returnExpression = value;
+ }
+ }
+
+ public ReturnStatement(Expression returnExpression)
+ {
+ this.returnExpression = returnExpression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ReturnStatement: ReturnExpression={0}]",
+ returnExpression);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ReturnStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,144 +1,144 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class SelectStatement : Statement
- {
- Expression selectExpression;
- ArrayList selectSections = new ArrayList();
-
- public Expression SelectExpression {
- get {
- return selectExpression;
- }
- set {
- selectExpression = value;
- }
- }
-
- public ArrayList SelectSections
- {
- get {
- return selectSections;
- }
- set {
- selectSections = value;
- }
- }
-
- public SelectStatement(Expression selectExpression, ArrayList selectSections)
- {
- this.selectExpression = selectExpression;
- this.selectSections = selectSections;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-
- public class SelectSection : Statement
- {
- ArrayList caseClauses = new ArrayList();
- Statement embeddedStatement;
-
- public ArrayList CaseClauses
- {
- get {
- return caseClauses;
- }
- set {
- caseClauses = value;
- }
- }
-
- public Statement EmbeddedStatement
- {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-
- public class CaseClause : AbstractNode
- {
- BinaryOperatorType comparisonOperator = BinaryOperatorType.None;
- Expression comparisonExpression;
- Expression boundaryExpression;
- bool isDefaultCase = false;
-
- public bool IsDefaultCase
- {
- get {
- return isDefaultCase;
- }
- set {
- isDefaultCase = value;
- }
- }
-
- public BinaryOperatorType ComparisonOperator
- {
- get {
- return comparisonOperator;
- }
- set {
- comparisonOperator = value;
- }
- }
-
- public Expression ComparisonExpression
- {
- get {
- return comparisonExpression;
- }
- set {
- comparisonExpression = value;
- }
- }
-
- public Expression BoundaryExpression
- {
- get {
- return boundaryExpression;
- }
- set {
- boundaryExpression = value;
- }
- }
-
- public CaseClause(bool isDefaultCase)
- {
- this.isDefaultCase = isDefaultCase;
- }
-
- public CaseClause(Expression comparisonExpression, Expression boundaryExpression)
- {
- this.boundaryExpression = boundaryExpression;
- this.comparisonExpression = comparisonExpression;
- }
-
- public CaseClause(BinaryOperatorType comparisonOperator, Expression comparisonExpression)
- {
- this.comparisonOperator = comparisonOperator;
- this.comparisonExpression = comparisonExpression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class SelectStatement : Statement
+ {
+ Expression selectExpression;
+ ArrayList selectSections = new ArrayList();
+
+ public Expression SelectExpression {
+ get {
+ return selectExpression;
+ }
+ set {
+ selectExpression = value;
+ }
+ }
+
+ public ArrayList SelectSections
+ {
+ get {
+ return selectSections;
+ }
+ set {
+ selectSections = value;
+ }
+ }
+
+ public SelectStatement(Expression selectExpression, ArrayList selectSections)
+ {
+ this.selectExpression = selectExpression;
+ this.selectSections = selectSections;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+
+ public class SelectSection : Statement
+ {
+ ArrayList caseClauses = new ArrayList();
+ Statement embeddedStatement;
+
+ public ArrayList CaseClauses
+ {
+ get {
+ return caseClauses;
+ }
+ set {
+ caseClauses = value;
+ }
+ }
+
+ public Statement EmbeddedStatement
+ {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+
+ public class CaseClause : AbstractNode
+ {
+ BinaryOperatorType comparisonOperator = BinaryOperatorType.None;
+ Expression comparisonExpression;
+ Expression boundaryExpression;
+ bool isDefaultCase = false;
+
+ public bool IsDefaultCase
+ {
+ get {
+ return isDefaultCase;
+ }
+ set {
+ isDefaultCase = value;
+ }
+ }
+
+ public BinaryOperatorType ComparisonOperator
+ {
+ get {
+ return comparisonOperator;
+ }
+ set {
+ comparisonOperator = value;
+ }
+ }
+
+ public Expression ComparisonExpression
+ {
+ get {
+ return comparisonExpression;
+ }
+ set {
+ comparisonExpression = value;
+ }
+ }
+
+ public Expression BoundaryExpression
+ {
+ get {
+ return boundaryExpression;
+ }
+ set {
+ boundaryExpression = value;
+ }
+ }
+
+ public CaseClause(bool isDefaultCase)
+ {
+ this.isDefaultCase = isDefaultCase;
+ }
+
+ public CaseClause(Expression comparisonExpression, Expression boundaryExpression)
+ {
+ this.boundaryExpression = boundaryExpression;
+ this.comparisonExpression = comparisonExpression;
+ }
+
+ public CaseClause(BinaryOperatorType comparisonOperator, Expression comparisonExpression)
+ {
+ this.comparisonOperator = comparisonOperator;
+ this.comparisonExpression = comparisonExpression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/SelectStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,28 +1,28 @@
-// Statement.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class Statement : AbstractNode
- {
- }
-}
+// Statement.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class Statement : AbstractNode
+ {
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/Statement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,20 +1,20 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class StopStatement : Statement
- {
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[StopStatement]");
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class StopStatement : Statement
+ {
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[StopStatement]");
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/StopStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,37 +1,37 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ThrowStatement : Statement
- {
- Expression throwExpression;
-
- public Expression ThrowExpression {
- get {
- return throwExpression;
- }
- set {
- throwExpression = value;
- }
- }
-
- public ThrowStatement(Expression throwExpression)
- {
- this.throwExpression = throwExpression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[ThrowStatement: ThrowExpression={0}]",
- throwExpression);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ThrowStatement : Statement
+ {
+ Expression throwExpression;
+
+ public Expression ThrowExpression {
+ get {
+ return throwExpression;
+ }
+ set {
+ throwExpression = value;
+ }
+ }
+
+ public ThrowStatement(Expression throwExpression)
+ {
+ this.throwExpression = throwExpression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[ThrowStatement: ThrowExpression={0}]",
+ throwExpression);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/ThrowStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,135 +1,135 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class TryCatchStatement : Statement
- {
- Statement statementBlock;
- ArrayList catchClauses;
- Statement finallyBlock;
-
- public Statement StatementBlock {
- get {
- return statementBlock;
- }
- set {
- statementBlock = value;
- }
- }
-
- public ArrayList CatchClauses {
- get {
- return catchClauses;
- }
- set {
- catchClauses = value;
- }
- }
-
- public Statement FinallyBlock {
- get {
- return finallyBlock;
- }
- set {
- finallyBlock = value;
- }
- }
-
- public TryCatchStatement(Statement statementBlock, ArrayList catchClauses, Statement finallyBlock)
- {
- this.statementBlock = statementBlock;
- this.catchClauses = catchClauses;
- this.finallyBlock = finallyBlock;
- }
-
- public TryCatchStatement(Statement statementBlock, ArrayList catchClauses)
- {
- this.statementBlock = statementBlock;
- this.catchClauses = catchClauses;
- this.finallyBlock = null;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[TryCatchStatement: StatementBlock={0}, CatchClauses={1}, FinallyBlock={2}]",
- statementBlock,
- GetCollectionString(catchClauses),
- finallyBlock);
- }
- }
-
- public class CatchClause
- {
- TypeReference type;
- string variableName;
- Statement statementBlock;
- Expression condition;
-
- public Expression Condition {
- get {
- return condition;
- }
- set {
- condition = value;
- }
- }
-
- public TypeReference Type {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- public string VariableName {
- get {
- return variableName;
- }
- set {
- variableName = value;
- }
- }
-
- public Statement StatementBlock {
- get {
- return statementBlock;
- }
- set {
- statementBlock = value;
- }
- }
-
- public CatchClause(TypeReference type, string variableName, Statement statementBlock, Expression condition)
- {
- this.type = type;
- this.variableName = variableName;
- this.statementBlock = statementBlock;
- this.condition = condition;
- }
-
- public CatchClause(Statement statementBlock)
- {
- this.type = null;
- this.variableName = null;
- this.statementBlock = statementBlock;
- }
-
- public override string ToString()
- {
- return String.Format("[CatchClause: Type={0}, VariableName={1}, StatementBlock={2}]",
- type,
- variableName,
- statementBlock);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class TryCatchStatement : Statement
+ {
+ Statement statementBlock;
+ ArrayList catchClauses;
+ Statement finallyBlock;
+
+ public Statement StatementBlock {
+ get {
+ return statementBlock;
+ }
+ set {
+ statementBlock = value;
+ }
+ }
+
+ public ArrayList CatchClauses {
+ get {
+ return catchClauses;
+ }
+ set {
+ catchClauses = value;
+ }
+ }
+
+ public Statement FinallyBlock {
+ get {
+ return finallyBlock;
+ }
+ set {
+ finallyBlock = value;
+ }
+ }
+
+ public TryCatchStatement(Statement statementBlock, ArrayList catchClauses, Statement finallyBlock)
+ {
+ this.statementBlock = statementBlock;
+ this.catchClauses = catchClauses;
+ this.finallyBlock = finallyBlock;
+ }
+
+ public TryCatchStatement(Statement statementBlock, ArrayList catchClauses)
+ {
+ this.statementBlock = statementBlock;
+ this.catchClauses = catchClauses;
+ this.finallyBlock = null;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[TryCatchStatement: StatementBlock={0}, CatchClauses={1}, FinallyBlock={2}]",
+ statementBlock,
+ GetCollectionString(catchClauses),
+ finallyBlock);
+ }
+ }
+
+ public class CatchClause
+ {
+ TypeReference type;
+ string variableName;
+ Statement statementBlock;
+ Expression condition;
+
+ public Expression Condition {
+ get {
+ return condition;
+ }
+ set {
+ condition = value;
+ }
+ }
+
+ public TypeReference Type {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+
+ public string VariableName {
+ get {
+ return variableName;
+ }
+ set {
+ variableName = value;
+ }
+ }
+
+ public Statement StatementBlock {
+ get {
+ return statementBlock;
+ }
+ set {
+ statementBlock = value;
+ }
+ }
+
+ public CatchClause(TypeReference type, string variableName, Statement statementBlock, Expression condition)
+ {
+ this.type = type;
+ this.variableName = variableName;
+ this.statementBlock = statementBlock;
+ this.condition = condition;
+ }
+
+ public CatchClause(Statement statementBlock)
+ {
+ this.type = null;
+ this.variableName = null;
+ this.statementBlock = statementBlock;
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[CatchClause: Type={0}, VariableName={1}, StatementBlock={2}]",
+ type,
+ variableName,
+ statementBlock);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/TryCatchStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,49 +1,49 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class WhileStatement : Statement
- {
- Expression condition;
- Statement embeddedStatement;
-
- public Expression Condition {
- get {
- return condition;
- }
- set {
- condition = value;
- }
- }
-
- public Statement EmbeddedStatement {
- get {
- return embeddedStatement;
- }
- set {
- embeddedStatement = value;
- }
- }
-
- public WhileStatement(Expression condition, Statement embeddedStatement)
- {
- this.condition = condition;
- this.embeddedStatement = embeddedStatement;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[WhileStatement: Condition={0}, EmbeddedStatement={1}]",
- condition,
- embeddedStatement);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class WhileStatement : Statement
+ {
+ Expression condition;
+ Statement embeddedStatement;
+
+ public Expression Condition {
+ get {
+ return condition;
+ }
+ set {
+ condition = value;
+ }
+ }
+
+ public Statement EmbeddedStatement {
+ get {
+ return embeddedStatement;
+ }
+ set {
+ embeddedStatement = value;
+ }
+ }
+
+ public WhileStatement(Expression condition, Statement embeddedStatement)
+ {
+ this.condition = condition;
+ this.embeddedStatement = embeddedStatement;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[WhileStatement: Condition={0}, EmbeddedStatement={1}]",
+ condition,
+ embeddedStatement);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WhileStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,44 +1,44 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class WithStatement : Statement
- {
- Expression withExpression;
- BlockStatement body = null;
-
- public Expression WithExpression {
- get {
- return withExpression;
- }
- }
-
- public BlockStatement Body {
- get {
- return body;
- }
- set {
- body = value;
- }
- }
-
- public WithStatement(Expression withExpression)
- {
- this.withExpression = withExpression;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- public override string ToString()
- {
- return String.Format("[WithStatment: WidthExpression={0}, Body={1}]",
- withExpression,
- body);
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class WithStatement : Statement
+ {
+ Expression withExpression;
+ BlockStatement body = null;
+
+ public Expression WithExpression {
+ get {
+ return withExpression;
+ }
+ }
+
+ public BlockStatement Body {
+ get {
+ return body;
+ }
+ set {
+ body = value;
+ }
+ }
+
+ public WithStatement(Expression withExpression)
+ {
+ this.withExpression = withExpression;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ public override string ToString()
+ {
+ return String.Format("[WithStatment: WidthExpression={0}, Body={1}]",
+ withExpression,
+ body);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/Statements/WithStatement.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,92 +1,92 @@
-// ConstructorDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ConstructorDeclaration : AbstractNode
- {
- string name;
- Modifier modifier;
- ArrayList parameters = new ArrayList(); // [ParameterDeclarationExpression]
- ArrayList attributes = new ArrayList();
- BlockStatement blockStatement = null;
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public BlockStatement Body {
- get {
- return blockStatement;
- }
- set {
- blockStatement = value;
- }
- }
-
- public ConstructorDeclaration(string name, Modifier modifier, ArrayList parameters, ArrayList attributes)
- {
- this.name = name;
- this.modifier = modifier;
- this.parameters = parameters;
- this.attributes = attributes;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
-
+// ConstructorDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ConstructorDeclaration : AbstractNode
+ {
+ string name;
+ Modifier modifier;
+ ArrayList parameters = new ArrayList(); // [ParameterDeclarationExpression]
+ ArrayList attributes = new ArrayList();
+ BlockStatement blockStatement = null;
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public BlockStatement Body {
+ get {
+ return blockStatement;
+ }
+ set {
+ blockStatement = value;
+ }
+ }
+
+ public ConstructorDeclaration(string name, Modifier modifier, ArrayList parameters, ArrayList attributes)
+ {
+ this.name = name;
+ this.modifier = modifier;
+ this.parameters = parameters;
+ this.attributes = attributes;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ConstructorDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,127 +1,127 @@
-// DeclareDeclaration.cs
-// Copyright (C) 2003 Markus Palme (markuspalme at gmx.de)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class DeclareDeclaration : AbstractNode
- {
- string name;
- string alias;
- string library;
- CharsetModifier charset = CharsetModifier.None;
- Modifier modifier;
- TypeReference returnType;
- ArrayList parameters;
- ArrayList attributes;
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public TypeReference ReturnType {
- get {
- return returnType;
- }
- set {
- returnType = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public CharsetModifier Charset
- {
- get {
- return charset;
- }
- set {
- charset = value;
- }
- }
-
- public string Alias
- {
- get {
- return alias;
- }
- set {
- alias = value;
- }
- }
-
- public string Library
- {
- get {
- return library;
- }
- set {
- library = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public DeclareDeclaration(string name, Modifier modifier, TypeReference returnType, ArrayList parameters, ArrayList attributes, string library, string alias, CharsetModifier charset)
- {
- this.name = name;
- this.modifier = modifier;
- this.returnType = returnType;
- this.parameters = parameters;
- this.attributes = attributes;
- this.library = library;
- this.alias = alias;
- this.charset = charset;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// DeclareDeclaration.cs
+// Copyright (C) 2003 Markus Palme (markuspalme at gmx.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class DeclareDeclaration : AbstractNode
+ {
+ string name;
+ string alias;
+ string library;
+ CharsetModifier charset = CharsetModifier.None;
+ Modifier modifier;
+ TypeReference returnType;
+ ArrayList parameters;
+ ArrayList attributes;
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public TypeReference ReturnType {
+ get {
+ return returnType;
+ }
+ set {
+ returnType = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public CharsetModifier Charset
+ {
+ get {
+ return charset;
+ }
+ set {
+ charset = value;
+ }
+ }
+
+ public string Alias
+ {
+ get {
+ return alias;
+ }
+ set {
+ alias = value;
+ }
+ }
+
+ public string Library
+ {
+ get {
+ return library;
+ }
+ set {
+ library = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public DeclareDeclaration(string name, Modifier modifier, TypeReference returnType, ArrayList parameters, ArrayList attributes, string library, string alias, CharsetModifier charset)
+ {
+ this.name = name;
+ this.modifier = modifier;
+ this.returnType = returnType;
+ this.parameters = parameters;
+ this.attributes = attributes;
+ this.library = library;
+ this.alias = alias;
+ this.charset = charset;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/DeclareDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,117 +1,117 @@
-// EventDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Drawing;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class EventDeclaration : AbstractNode
- {
- TypeReference typeReference;
- Modifier modifier;
- ArrayList parameters;
- ArrayList attributes;
- string name;
- ImplementsClause implementsClause;
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
- public ImplementsClause ImplementsClause {
- get {
- return implementsClause;
- }
- set {
- implementsClause = value;
- }
- }
-
- public TypeReference TypeReference {
- get {
- return typeReference;
- }
- set {
- typeReference = value;
- }
- }
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
-
-
- public EventDeclaration(TypeReference typeReference, Modifier modifier, ArrayList parameters, ArrayList attributes, string name, ImplementsClause implementsClause)
- {
- this.typeReference = typeReference;
- this.modifier = modifier;
- this.parameters = parameters;
- this.attributes = attributes;
- this.name = name;
- this.implementsClause = implementsClause;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[EventDeclaration: typeReference = {0}, modifier = {1}, parameters = {2}, attributes = {3}, name = {4}, implementsClause = {5}]",
- typeReference,
- modifier,
- parameters,
- attributes,
- name,
- implementsClause);
- }
-
- }
-}
+// EventDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class EventDeclaration : AbstractNode
+ {
+ TypeReference typeReference;
+ Modifier modifier;
+ ArrayList parameters;
+ ArrayList attributes;
+ string name;
+ ImplementsClause implementsClause;
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+ public ImplementsClause ImplementsClause {
+ get {
+ return implementsClause;
+ }
+ set {
+ implementsClause = value;
+ }
+ }
+
+ public TypeReference TypeReference {
+ get {
+ return typeReference;
+ }
+ set {
+ typeReference = value;
+ }
+ }
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+
+
+ public EventDeclaration(TypeReference typeReference, Modifier modifier, ArrayList parameters, ArrayList attributes, string name, ImplementsClause implementsClause)
+ {
+ this.typeReference = typeReference;
+ this.modifier = modifier;
+ this.parameters = parameters;
+ this.attributes = attributes;
+ this.name = name;
+ this.implementsClause = implementsClause;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[EventDeclaration: typeReference = {0}, modifier = {1}, parameters = {2}, attributes = {3}, name = {4}, implementsClause = {5}]",
+ typeReference,
+ modifier,
+ parameters,
+ attributes,
+ name,
+ implementsClause);
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/EventDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,104 +1,104 @@
-// FieldDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class FieldDeclaration : AbstractNode
- {
- ArrayList attributes = null;
- TypeReference typeReference = null;
- Modifier modifier;
- ArrayList fields = new ArrayList(); // [VariableDeclaration]
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
- public TypeReference TypeReference {
- get {
- return typeReference;
- }
- set {
- typeReference = value;
- }
- }
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
- public ArrayList Fields {
- get {
- return fields;
- }
- set {
- fields = value;
- }
- }
-
- // for enum members
- public FieldDeclaration(ArrayList attributes)
- {
- this.attributes = attributes;
- }
-
- // for all other cases
- public FieldDeclaration(ArrayList attributes, TypeReference typeReference, Modifier modifier)
- {
- this.attributes = attributes;
- this.typeReference = typeReference;
- this.modifier = modifier;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public VariableDeclaration GetVariableDeclaration(string variableName)
- {
- foreach (VariableDeclaration variableDeclaration in Fields) {
- if (variableDeclaration.Name == variableName) {
- return variableDeclaration;
- }
- }
- return null;
- }
-
- public override string ToString()
- {
- return String.Format("[FieldDeclaration: attributes = {0}, typeReference = {1}, modifier = {2}, fields = {3}]",
- attributes,
- typeReference,
- modifier,
- GetCollectionString(fields));
- }
-
- }
-}
+// FieldDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class FieldDeclaration : AbstractNode
+ {
+ ArrayList attributes = null;
+ TypeReference typeReference = null;
+ Modifier modifier;
+ ArrayList fields = new ArrayList(); // [VariableDeclaration]
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+ public TypeReference TypeReference {
+ get {
+ return typeReference;
+ }
+ set {
+ typeReference = value;
+ }
+ }
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+ public ArrayList Fields {
+ get {
+ return fields;
+ }
+ set {
+ fields = value;
+ }
+ }
+
+ // for enum members
+ public FieldDeclaration(ArrayList attributes)
+ {
+ this.attributes = attributes;
+ }
+
+ // for all other cases
+ public FieldDeclaration(ArrayList attributes, TypeReference typeReference, Modifier modifier)
+ {
+ this.attributes = attributes;
+ this.typeReference = typeReference;
+ this.modifier = modifier;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public VariableDeclaration GetVariableDeclaration(string variableName)
+ {
+ foreach (VariableDeclaration variableDeclaration in Fields) {
+ if (variableDeclaration.Name == variableName) {
+ return variableDeclaration;
+ }
+ }
+ return null;
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[FieldDeclaration: attributes = {0}, typeReference = {1}, modifier = {2}, fields = {3}]",
+ attributes,
+ typeReference,
+ modifier,
+ GetCollectionString(fields));
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/FieldDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,27 +1,27 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class HandlesClause : AbstractNode
- {
- ArrayList eventNames;
-
- public HandlesClause()
- {
- this.eventNames = new ArrayList();
- }
-
- public ArrayList EventNames {
- get {
- return eventNames;
- }
- set {
- eventNames = value;
- }
- }
-
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class HandlesClause : AbstractNode
+ {
+ ArrayList eventNames;
+
+ public HandlesClause()
+ {
+ this.eventNames = new ArrayList();
+ }
+
+ public ArrayList EventNames {
+ get {
+ return eventNames;
+ }
+ set {
+ eventNames = value;
+ }
+ }
+
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/HandlesClause.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,27 +1,27 @@
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class ImplementsClause : AbstractNode
- {
- ArrayList baseMembers;
-
- public ImplementsClause()
- {
- this.baseMembers = new ArrayList();
- }
-
- public ArrayList BaseMembers
- {
- get {
- return baseMembers;
- }
- set {
- baseMembers = value;
- }
- }
- }
-}
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class ImplementsClause : AbstractNode
+ {
+ ArrayList baseMembers;
+
+ public ImplementsClause()
+ {
+ this.baseMembers = new ArrayList();
+ }
+
+ public ArrayList BaseMembers
+ {
+ get {
+ return baseMembers;
+ }
+ set {
+ baseMembers = value;
+ }
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/ImplementsClause.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,127 +1,127 @@
-// MethodDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class MethodDeclaration : AbstractNode
- {
- string name;
- Modifier modifier;
- TypeReference typeReference;
- ArrayList parameters; // [ParameterDeclarationExpression]
- ArrayList attributes;
- BlockStatement body;
- HandlesClause handlesClause;
- ImplementsClause implementsClause;
-
- public ImplementsClause ImplementsClause {
- get {
- return implementsClause;
- }
- set {
- implementsClause = value;
- }
- }
-
- public HandlesClause HandlesClause {
- get {
- return handlesClause;
- }
- set {
- handlesClause = value;
- }
- }
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public BlockStatement Body {
- get {
- return body;
- }
- set {
- body = value;
- }
- }
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public TypeReference TypeReference {
- get {
- return typeReference;
- }
- set {
- typeReference = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public MethodDeclaration(string name, Modifier modifier, TypeReference typeReference, ArrayList parameters, ArrayList attributes)
- {
- this.name = name;
- this.modifier = modifier;
- this.typeReference = typeReference;
- this.parameters = parameters;
- this.attributes = attributes;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[MethodDeclaration: Name={0}, Modifier={1}, TypeReference={2}]", name, modifier, typeReference);
- }
- }
-}
+// MethodDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class MethodDeclaration : AbstractNode
+ {
+ string name;
+ Modifier modifier;
+ TypeReference typeReference;
+ ArrayList parameters; // [ParameterDeclarationExpression]
+ ArrayList attributes;
+ BlockStatement body;
+ HandlesClause handlesClause;
+ ImplementsClause implementsClause;
+
+ public ImplementsClause ImplementsClause {
+ get {
+ return implementsClause;
+ }
+ set {
+ implementsClause = value;
+ }
+ }
+
+ public HandlesClause HandlesClause {
+ get {
+ return handlesClause;
+ }
+ set {
+ handlesClause = value;
+ }
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public BlockStatement Body {
+ get {
+ return body;
+ }
+ set {
+ body = value;
+ }
+ }
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public TypeReference TypeReference {
+ get {
+ return typeReference;
+ }
+ set {
+ typeReference = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public MethodDeclaration(string name, Modifier modifier, TypeReference typeReference, ArrayList parameters, ArrayList attributes)
+ {
+ this.name = name;
+ this.modifier = modifier;
+ this.typeReference = typeReference;
+ this.parameters = parameters;
+ this.attributes = attributes;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[MethodDeclaration: Name={0}, Modifier={1}, TypeReference={2}]", name, modifier, typeReference);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/MethodDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,167 +1,167 @@
-// PropertyDeclaration.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Drawing;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class PropertyDeclaration : AbstractNode
- {
- string name;
- Modifier modifier;
- TypeReference typeReference;
- ArrayList attributes;
- ArrayList parameters;
- Point bodyStart;
- Point bodyEnd;
- ImplementsClause implementsClause;
-
- PropertyGetRegion propertyGetRegion = null;
- PropertySetRegion propertySetRegion = null;
-
- public ImplementsClause ImplementsClause {
- get {
- return implementsClause;
- }
- set {
- implementsClause = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public Modifier Modifier {
- get {
- return modifier;
- }
- set {
- modifier = value;
- }
- }
-
- public TypeReference TypeReference {
- get {
- return typeReference;
- }
- set {
- typeReference = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public PropertyGetRegion GetRegion {
- get {
- return propertyGetRegion;
- }
- set {
- propertyGetRegion = value;
- }
- }
- public PropertySetRegion SetRegion {
- get {
- return propertySetRegion;
- }
- set {
- propertySetRegion = value;
- }
- }
-
- public bool HasGetRegion {
- get {
- return propertyGetRegion != null;
- }
- }
-
- public bool HasSetRegion {
- get {
- return propertySetRegion != null;
- }
- }
-
- public bool IsReadOnly {
- get {
- return HasGetRegion && !HasSetRegion;
- }
- }
-
- public bool IsWriteOnly {
- get {
- return !HasGetRegion && HasSetRegion;
- }
- }
-
-
- public Point BodyStart {
- get {
- return bodyStart;
- }
- set {
- bodyStart = value;
- }
- }
-
- public Point BodyEnd {
- get {
- return bodyEnd;
- }
- set {
- bodyEnd = value;
- }
- }
-
- public PropertyDeclaration(string name, TypeReference typeReference, Modifier modifier, ArrayList attributes)
- {
- this.name = name;
- this.typeReference = typeReference;
- this.modifier = modifier;
- this.attributes = attributes;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// PropertyDeclaration.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Drawing;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class PropertyDeclaration : AbstractNode
+ {
+ string name;
+ Modifier modifier;
+ TypeReference typeReference;
+ ArrayList attributes;
+ ArrayList parameters;
+ Point bodyStart;
+ Point bodyEnd;
+ ImplementsClause implementsClause;
+
+ PropertyGetRegion propertyGetRegion = null;
+ PropertySetRegion propertySetRegion = null;
+
+ public ImplementsClause ImplementsClause {
+ get {
+ return implementsClause;
+ }
+ set {
+ implementsClause = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public Modifier Modifier {
+ get {
+ return modifier;
+ }
+ set {
+ modifier = value;
+ }
+ }
+
+ public TypeReference TypeReference {
+ get {
+ return typeReference;
+ }
+ set {
+ typeReference = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public PropertyGetRegion GetRegion {
+ get {
+ return propertyGetRegion;
+ }
+ set {
+ propertyGetRegion = value;
+ }
+ }
+ public PropertySetRegion SetRegion {
+ get {
+ return propertySetRegion;
+ }
+ set {
+ propertySetRegion = value;
+ }
+ }
+
+ public bool HasGetRegion {
+ get {
+ return propertyGetRegion != null;
+ }
+ }
+
+ public bool HasSetRegion {
+ get {
+ return propertySetRegion != null;
+ }
+ }
+
+ public bool IsReadOnly {
+ get {
+ return HasGetRegion && !HasSetRegion;
+ }
+ }
+
+ public bool IsWriteOnly {
+ get {
+ return !HasGetRegion && HasSetRegion;
+ }
+ }
+
+
+ public Point BodyStart {
+ get {
+ return bodyStart;
+ }
+ set {
+ bodyStart = value;
+ }
+ }
+
+ public Point BodyEnd {
+ get {
+ return bodyEnd;
+ }
+ set {
+ bodyEnd = value;
+ }
+ }
+
+ public PropertyDeclaration(string name, TypeReference typeReference, Modifier modifier, ArrayList attributes)
+ {
+ this.name = name;
+ this.typeReference = typeReference;
+ this.modifier = modifier;
+ this.attributes = attributes;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,58 +1,58 @@
-// PropertyGetRegion.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class PropertyGetRegion : AbstractNode
- {
- BlockStatement block;
- ArrayList attributes;
-
- public BlockStatement Block {
- get {
- return block;
- }
- set {
- block = value;
- }
- }
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public PropertyGetRegion(BlockStatement block, ArrayList attributes)
- {
- this.block = block;
- this.attributes = attributes;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// PropertyGetRegion.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class PropertyGetRegion : AbstractNode
+ {
+ BlockStatement block;
+ ArrayList attributes;
+
+ public BlockStatement Block {
+ get {
+ return block;
+ }
+ set {
+ block = value;
+ }
+ }
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public PropertyGetRegion(BlockStatement block, ArrayList attributes)
+ {
+ this.block = block;
+ this.attributes = attributes;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertyGetRegion.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,69 +1,69 @@
-// PropertySetRegion.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class PropertySetRegion : AbstractNode
- {
- BlockStatement block;
- ArrayList attributes;
- ArrayList parameters;
-
- public BlockStatement Block {
- get {
- return block;
- }
- set {
- block = value;
- }
- }
-
- public ArrayList Parameters {
- get {
- return parameters;
- }
- set {
- parameters = value;
- }
- }
-
- public ArrayList Attributes {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public PropertySetRegion(BlockStatement block, ArrayList attributes)
- {
- this.block = block;
- this.attributes = attributes;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
- }
-}
+// PropertySetRegion.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class PropertySetRegion : AbstractNode
+ {
+ BlockStatement block;
+ ArrayList attributes;
+ ArrayList parameters;
+
+ public BlockStatement Block {
+ get {
+ return block;
+ }
+ set {
+ block = value;
+ }
+ }
+
+ public ArrayList Parameters {
+ get {
+ return parameters;
+ }
+ set {
+ parameters = value;
+ }
+ }
+
+ public ArrayList Attributes {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public PropertySetRegion(BlockStatement block, ArrayList attributes)
+ {
+ this.block = block;
+ this.attributes = attributes;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/PropertySetRegion.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,139 +1,139 @@
-// TypeReference.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-using System.Text;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class TypeReference : AbstractNode
- {
- string type;
- string systemType;
- ArrayList rankSpecifier;
- ArrayList dimension;
- AttributeSection attributes = null;
-
- static Hashtable types = new Hashtable();
- static TypeReference()
- {
- types.Add("boolean", "System.Boolean");
- types.Add("byte", "System.Byte");
- types.Add("date", "System.DateTime");
- types.Add("char", "System.Char");
- types.Add("decimal", "System.Decimal");
- types.Add("double", "System.Double");
- types.Add("single", "System.Single");
- types.Add("integer", "System.Int32");
- types.Add("long", "System.Int64");
- types.Add("object", "System.Object");
- types.Add("short", "System.Int16");
- types.Add("string", "System.String");
- }
-
- public AttributeSection Attributes
- {
- get {
- return attributes;
- }
- set {
- attributes = value;
- }
- }
-
- public static ICollection PrimitiveTypes
- {
- get {
- return types.Keys;
- }
- }
-
- public string Type
- {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- public string SystemType
- {
- get {
- return systemType;
- }
- }
-
- public ArrayList RankSpecifier
- {
- get {
- return rankSpecifier;
- }
- set {
- rankSpecifier = value;
- }
- }
-
- public bool IsArrayType
- {
- get {
- return rankSpecifier != null && rankSpecifier.Count> 0;
- }
- }
-
- public ArrayList Dimension
- {
- get {
- return dimension;
- }
- set {
- dimension = value;
- }
- }
-
- string GetSystemType(string type)
- {
- return (string)types[type.ToLower()];
- }
-
- public TypeReference(string type)
- {
- this.systemType = GetSystemType(type);
- this.type = type;
- }
-
- public TypeReference(string type, ArrayList rankSpecifier)
- {
- this.type = type;
- this.systemType = GetSystemType(type);
- this.rankSpecifier = rankSpecifier;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[TypeReference: Type={0}, RankSpeifier={1}]", type, AbstractNode.GetCollectionString(rankSpecifier));
- }
- }
-}
+// TypeReference.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class TypeReference : AbstractNode
+ {
+ string type;
+ string systemType;
+ ArrayList rankSpecifier;
+ ArrayList dimension;
+ AttributeSection attributes = null;
+
+ static Hashtable types = new Hashtable();
+ static TypeReference()
+ {
+ types.Add("boolean", "System.Boolean");
+ types.Add("byte", "System.Byte");
+ types.Add("date", "System.DateTime");
+ types.Add("char", "System.Char");
+ types.Add("decimal", "System.Decimal");
+ types.Add("double", "System.Double");
+ types.Add("single", "System.Single");
+ types.Add("integer", "System.Int32");
+ types.Add("long", "System.Int64");
+ types.Add("object", "System.Object");
+ types.Add("short", "System.Int16");
+ types.Add("string", "System.String");
+ }
+
+ public AttributeSection Attributes
+ {
+ get {
+ return attributes;
+ }
+ set {
+ attributes = value;
+ }
+ }
+
+ public static ICollection PrimitiveTypes
+ {
+ get {
+ return types.Keys;
+ }
+ }
+
+ public string Type
+ {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+
+ public string SystemType
+ {
+ get {
+ return systemType;
+ }
+ }
+
+ public ArrayList RankSpecifier
+ {
+ get {
+ return rankSpecifier;
+ }
+ set {
+ rankSpecifier = value;
+ }
+ }
+
+ public bool IsArrayType
+ {
+ get {
+ return rankSpecifier != null && rankSpecifier.Count> 0;
+ }
+ }
+
+ public ArrayList Dimension
+ {
+ get {
+ return dimension;
+ }
+ set {
+ dimension = value;
+ }
+ }
+
+ string GetSystemType(string type)
+ {
+ return (string)types[type.ToLower()];
+ }
+
+ public TypeReference(string type)
+ {
+ this.systemType = GetSystemType(type);
+ this.type = type;
+ }
+
+ public TypeReference(string type, ArrayList rankSpecifier)
+ {
+ this.type = type;
+ this.systemType = GetSystemType(type);
+ this.rankSpecifier = rankSpecifier;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[TypeReference: Type={0}, RankSpeifier={1}]", type, AbstractNode.GetCollectionString(rankSpecifier));
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/TypeReference.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,79 +1,79 @@
-// Field.cs
-// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-using System;
-using System.Collections;
-
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.AST.VB
-{
- public class VariableDeclaration : AbstractNode
- {
- string name;
- Expression initializer = null;
- TypeReference type;
-
- public TypeReference Type {
- get {
- return type;
- }
- set {
- type = value;
- }
- }
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public Expression Initializer {
- get {
- return initializer;
- }
- set {
- initializer = value;
- }
- }
-
- public VariableDeclaration(string name)
- {
- this.name = name;
- }
-
- public VariableDeclaration(string name, Expression initializer)
- {
- this.name = name;
- this.initializer = initializer;
- }
-
- public override object AcceptVisitor(IASTVisitor visitor, object data)
- {
- return visitor.Visit(this, data);
- }
-
- public override string ToString()
- {
- return String.Format("[VariableDeclaration: Name={0}, Initializer={1}]", name, initializer);
- }
- }
-}
+// Field.cs
+// Copyright (C) 2003 Mike Krueger (mike at icsharpcode.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+using System;
+using System.Collections;
+
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.AST.VB
+{
+ public class VariableDeclaration : AbstractNode
+ {
+ string name;
+ Expression initializer = null;
+ TypeReference type;
+
+ public TypeReference Type {
+ get {
+ return type;
+ }
+ set {
+ type = value;
+ }
+ }
+
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ public Expression Initializer {
+ get {
+ return initializer;
+ }
+ set {
+ initializer = value;
+ }
+ }
+
+ public VariableDeclaration(string name)
+ {
+ this.name = name;
+ }
+
+ public VariableDeclaration(string name, Expression initializer)
+ {
+ this.name = name;
+ this.initializer = initializer;
+ }
+
+ public override object AcceptVisitor(IASTVisitor visitor, object data)
+ {
+ return visitor.Visit(this, data);
+ }
+
+ public override string ToString()
+ {
+ return String.Format("[VariableDeclaration: Name={0}, Initializer={1}]", name, initializer);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/AST/TypeLevel/VariableDeclaration.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,48 +1,48 @@
-using System;
-using System.Text;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public delegate void ErrorCodeProc(int line, int col, int n);
- public delegate void ErrorMsgProc(int line, int col, string msg);
-
- public class Errors
- {
- public int count = 0; // number of errors detected
- public ErrorCodeProc SynErr;
- public ErrorCodeProc SemErr;
- public ErrorMsgProc Error;
- StringBuilder errorText = new StringBuilder();
-
- public string ErrorOutput {
- get {
- return errorText.ToString();
- }
- }
- public Errors()
- {
- SynErr = new ErrorCodeProc(DefaultCodeError); // syntactic errors
- SemErr = new ErrorCodeProc(DefaultCodeError); // semantic errors
- Error = new ErrorMsgProc(DefaultMsgError); // user defined string based errors
- }
-
- // public void Exception (string s)
- // {
- // Console.WriteLine(s);
- // System.Environment.Exit(0);
- // }
-
- void DefaultCodeError (int line, int col, int n)
- {
- errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
- errorText.Append("\n");
- count++;
- }
-
- void DefaultMsgError (int line, int col, string s) {
- errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
- errorText.Append("\n");
- count++;
- }
- } // Errors
-}
+using System;
+using System.Text;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public delegate void ErrorCodeProc(int line, int col, int n);
+ public delegate void ErrorMsgProc(int line, int col, string msg);
+
+ public class Errors
+ {
+ public int count = 0; // number of errors detected
+ public ErrorCodeProc SynErr;
+ public ErrorCodeProc SemErr;
+ public ErrorMsgProc Error;
+ StringBuilder errorText = new StringBuilder();
+
+ public string ErrorOutput {
+ get {
+ return errorText.ToString();
+ }
+ }
+ public Errors()
+ {
+ SynErr = new ErrorCodeProc(DefaultCodeError); // syntactic errors
+ SemErr = new ErrorCodeProc(DefaultCodeError); // semantic errors
+ Error = new ErrorMsgProc(DefaultMsgError); // user defined string based errors
+ }
+
+ // public void Exception (string s)
+ // {
+ // Console.WriteLine(s);
+ // System.Environment.Exit(0);
+ // }
+
+ void DefaultCodeError (int line, int col, int n)
+ {
+ errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
+ errorText.Append("\n");
+ count++;
+ }
+
+ void DefaultMsgError (int line, int col, string s) {
+ errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
+ errorText.Append("\n");
+ count++;
+ }
+ } // Errors
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Errors.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Makefile
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,51 +1,51 @@
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class Modifiers
- {
- Modifier cur;
- Parser parser;
-
- public Modifier Modifier {
- get {
- return cur;
- }
- }
-
- public Modifiers(Parser parser)
- {
- this.parser = parser;
- cur = Modifier.None;
- }
-
- public bool isNone { get { return cur == Modifier.None; } }
-
- public bool Contains(Modifier m)
- {
- return ((cur & m) != 0);
- }
-
- public void Add(Modifier m)
- {
- if ((cur & m) == 0) {
- cur |= m;
- } else {
- parser.Error("modifier " + m + " already defined");
- }
- }
-
- public void Add(Modifiers m)
- {
- Add(m.cur);
- }
-
- public void Check(Modifier allowed)
- {
- Modifier wrong = cur & (allowed ^ Modifier.All);
- if (wrong != Modifier.None) {
- parser.Error("modifier(s) " + wrong + " not allowed here");
- }
- }
- }
-}
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class Modifiers
+ {
+ Modifier cur;
+ Parser parser;
+
+ public Modifier Modifier {
+ get {
+ return cur;
+ }
+ }
+
+ public Modifiers(Parser parser)
+ {
+ this.parser = parser;
+ cur = Modifier.None;
+ }
+
+ public bool isNone { get { return cur == Modifier.None; } }
+
+ public bool Contains(Modifier m)
+ {
+ return ((cur & m) != 0);
+ }
+
+ public void Add(Modifier m)
+ {
+ if ((cur & m) == 0) {
+ cur |= m;
+ } else {
+ parser.Error("modifier " + m + " already defined");
+ }
+ }
+
+ public void Add(Modifiers m)
+ {
+ Add(m.cur);
+ }
+
+ public void Check(Modifier allowed)
+ {
+ Modifier wrong = cur & (allowed ^ Modifier.All);
+ if (wrong != Modifier.None) {
+ parser.Error("modifier(s) " + wrong + " not allowed here");
+ }
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Modifiers.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,46 +1,46 @@
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class ParamModifiers
- {
- ParamModifier cur;
- Parser parser;
-
- public ParamModifier Modifier {
- get {
- return cur;
- }
- }
-
- public ParamModifiers(Parser parser)
- {
- this.parser = parser;
- cur = ParamModifier.None;
- }
-
- public bool isNone { get { return cur == ParamModifier.None; } }
-
- public void Add(ParamModifier m)
- {
- if ((cur & m) == 0) {
- cur |= m;
- } else {
- parser.Error("param modifier " + m + " already defined");
- }
- }
-
- public void Add(ParamModifiers m)
- {
- Add(m.cur);
- }
-
- public void Check()
- {
- if((cur & ParamModifier.ByVal) != 0 && (cur & ParamModifier.ByRef) != 0) {
- parser.Error("ByRef and ByVal are not allowed at the same time.");
- }
- }
- }
-}
-
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class ParamModifiers
+ {
+ ParamModifier cur;
+ Parser parser;
+
+ public ParamModifier Modifier {
+ get {
+ return cur;
+ }
+ }
+
+ public ParamModifiers(Parser parser)
+ {
+ this.parser = parser;
+ cur = ParamModifier.None;
+ }
+
+ public bool isNone { get { return cur == ParamModifier.None; } }
+
+ public void Add(ParamModifier m)
+ {
+ if ((cur & m) == 0) {
+ cur |= m;
+ } else {
+ parser.Error("param modifier " + m + " already defined");
+ }
+ }
+
+ public void Add(ParamModifiers m)
+ {
+ Add(m.cur);
+ }
+
+ public void Check()
+ {
+ if((cur & ParamModifier.ByVal) != 0 && (cur & ParamModifier.ByRef) != 0) {
+ parser.Error("ByRef and ByVal are not allowed at the same time.");
+ }
+ }
+ }
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/ParamModifiers.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,120 +1,120 @@
-using System;
-using System.Reflection;
-
--->namespace
-
--->tokens
-
-public class Parser
-{
--->constants
- const bool T = true;
- const bool x = false;
- const int minErrDist = 2;
- const string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
- int errDist = minErrDist;
- Errors errors;
- Lexer lexer;
-
- public Errors Errors {
- get {
- return errors;
- }
- }
-
--->declarations
-
-/*
--->pragmas
-*/
- void SynErr(int n)
- {
- if (errDist >= minErrDist) {
- errors.SynErr(lexer.LookAhead.line, lexer.LookAhead.col, n);
- }
- errDist = 0;
- }
-
- public void SemErr(string msg)
- {
- if (errDist >= minErrDist) {
- errors.Error(lexer.Token.line, lexer.Token.col, msg);
- }
- errDist = 0;
- }
-
- void Expect(int n)
- {
- if (lexer.LookAhead.kind == n) {
- lexer.NextToken();
- } else {
- SynErr(n);
- }
- }
-
- bool StartOf(int s)
- {
- return set[s, lexer.LookAhead.kind];
- }
-
- void ExpectWeak(int n, int follow)
- {
- if (lexer.LookAhead.kind == n) {
- lexer.NextToken();
- } else {
- SynErr(n);
- while (!StartOf(follow)) {
- lexer.NextToken();
- }
- }
- }
-
- bool WeakSeparator(int n, int syFol, int repFol)
- {
- bool[] s = new bool[maxT + 1];
-
- if (lexer.LookAhead.kind == n) {
- lexer.NextToken();
- return true;
- } else if (StartOf(repFol)) {
- return false;
- } else {
- for (int i = 0; i <= maxT; i++) {
- s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
- }
- SynErr(n);
- while (!s[lexer.LookAhead.kind]) {
- lexer.NextToken();
- }
- return StartOf(syFol);
- }
- }
-
--->productions
-
- public void Parse(Lexer lexer)
- {
- this.errors = lexer.Errors;
- this.lexer = lexer;
- errors.SynErr = new ErrorCodeProc(SynErr);
- lexer.NextToken();
--->parseRoot
- }
-
- void SynErr(int line, int col, int errorNumber)
- {
- errors.count++;
- string s;
- switch (errorNumber) {
--->errors
- default: s = "error " + errorNumber; break;
- }
- errors.Error(line, col, s);
- }
-
- static bool[,] set = {
--->initialization
- };
-} // end Parser
-
-$$$
+using System;
+using System.Reflection;
+
+-->namespace
+
+-->tokens
+
+public class Parser
+{
+-->constants
+ const bool T = true;
+ const bool x = false;
+ const int minErrDist = 2;
+ const string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
+ int errDist = minErrDist;
+ Errors errors;
+ Lexer lexer;
+
+ public Errors Errors {
+ get {
+ return errors;
+ }
+ }
+
+-->declarations
+
+/*
+-->pragmas
+*/
+ void SynErr(int n)
+ {
+ if (errDist >= minErrDist) {
+ errors.SynErr(lexer.LookAhead.line, lexer.LookAhead.col, n);
+ }
+ errDist = 0;
+ }
+
+ public void SemErr(string msg)
+ {
+ if (errDist >= minErrDist) {
+ errors.Error(lexer.Token.line, lexer.Token.col, msg);
+ }
+ errDist = 0;
+ }
+
+ void Expect(int n)
+ {
+ if (lexer.LookAhead.kind == n) {
+ lexer.NextToken();
+ } else {
+ SynErr(n);
+ }
+ }
+
+ bool StartOf(int s)
+ {
+ return set[s, lexer.LookAhead.kind];
+ }
+
+ void ExpectWeak(int n, int follow)
+ {
+ if (lexer.LookAhead.kind == n) {
+ lexer.NextToken();
+ } else {
+ SynErr(n);
+ while (!StartOf(follow)) {
+ lexer.NextToken();
+ }
+ }
+ }
+
+ bool WeakSeparator(int n, int syFol, int repFol)
+ {
+ bool[] s = new bool[maxT + 1];
+
+ if (lexer.LookAhead.kind == n) {
+ lexer.NextToken();
+ return true;
+ } else if (StartOf(repFol)) {
+ return false;
+ } else {
+ for (int i = 0; i <= maxT; i++) {
+ s[i] = set[syFol, i] || set[repFol, i] || set[0, i];
+ }
+ SynErr(n);
+ while (!s[lexer.LookAhead.kind]) {
+ lexer.NextToken();
+ }
+ return StartOf(syFol);
+ }
+ }
+
+-->productions
+
+ public void Parse(Lexer lexer)
+ {
+ this.errors = lexer.Errors;
+ this.lexer = lexer;
+ errors.SynErr = new ErrorCodeProc(SynErr);
+ lexer.NextToken();
+-->parseRoot
+ }
+
+ void SynErr(int line, int col, int errorNumber)
+ {
+ errors.count++;
+ string s;
+ switch (errorNumber) {
+-->errors
+ default: s = "error " + errorNumber; break;
+ }
+ errors.Error(line, col, s);
+ }
+
+ static bool[,] set = {
+-->initialization
+ };
+} // end Parser
+
+$$$
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Parser.frame
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,222 +1,222 @@
-using System;
-using System.Drawing;
-using System.IO;
-using System.Collections;
-using System.Text;
-
--->namespace
-
-public class Token {
- public int kind; // token kind
- public int pos; // token position in the source text (starting at 0)
- public int col; // token column (starting at 0)
- public int line; // token line (starting at 1)
- public string val; // token value
- public Token next; // AW 2003-03-07 Tokens are kept in linked list
-
- public Point Location {
- get {
- return new Point(line, col);
- }
- }
-
- public Token () { }
- public Token (int kind) { this.kind = kind; }
-}
-
-public class Buffer {
- public const int eof = '\uffff';
-
- static byte[] buf;
- static int bufLen;
- static int pos;
-
- public static void Fill (string fileName) {
- FileStream s = null;
- try {
- s = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
- Fill(s);
- } catch (IOException) {
- Console.WriteLine("--- Cannot open file {0}", fileName);
- System.Environment.Exit(0);
- } finally {
- if (s != null) s.Close();
- }
- }
-
- public static void Fill (Stream s) {
- bufLen = (int) s.Length;
- buf = new byte[bufLen];
- s.Read(buf, 0, bufLen);
- pos = 0;
- }
-
- public static int Read () {
- if (pos < bufLen) return buf[pos++];
- else return 0;
- }
-
- public static int Peek () {
- if (pos < bufLen) return buf[pos];
- else return 0;
- }
-
- /* AW 2003-03-10 moved this from ParserGen.cs */
- public static string GetString (int beg, int end) {
- StringBuilder s = new StringBuilder(64);
- int oldPos = Buffer.Pos;
- Buffer.Pos = beg;
- while (beg < end) { s.Append((char)Buffer.Read()); beg++; }
- Buffer.Pos = oldPos;
- return s.ToString();
- }
-
- public static int Pos {
- get { return pos; }
- set {
- if (value < 0) pos = 0;
- else if (value >= bufLen) pos = bufLen;
- else pos = value;
- }
- }
-}
-
-public class Scanner {
- const char EOF = '\0';
- const char EOL = '\n';
- const char CR = '\n';
-
--->constants
-
--->declarations
-
- static Token t; // current token
- static char ch; // current input character
- static int pos; // column number of current character
- static int line; // line number of current character
- static int lineStart; // start position of current line
- static int oldEols; // EOLs that appeared in a comment;
- static BitArray ignore; // set of characters to be ignored by the scanner
-
- /* ML ----- begin */
- static Token tokens; // the complete input token stream
- static Token pt; // current peek token
-
- static int peekCount = 0;
-
- public static int PeekCount { get { return peekCount; } }
-
- static void Init()
- {
- pos = -1; line = 1; lineStart = 0;
- oldEols = 0;
- NextCh();
--->initialization
-
- /* AW 2003-03-07 fill token list */
- tokens = new Token(); // first token is a dummy
- Token node = tokens;
- do {
- node.next = NextToken();
- node = node.next;
- } while (node.kind != 0); /* AW: 0 => EOF */
- t = pt = tokens;
- }
-
- public static void Init(String fileName) {
- Buffer.Fill(fileName);
- Init();
- }
-
- public static void Init(Stream s) {
- Buffer.Fill(s);
- Init();
- }
-
- static void NextCh() {
- if (oldEols > 0) { ch = EOL; oldEols--; }
- else {
- ch = (char)Buffer.Read(); pos++;
- // replace isolated '\r' by '\n' in order to make
- // eol handling uniform across Windows, Unix and Mac
- if (ch == '\r' && Buffer.Peek() != '\n') ch = EOL;
- else if (ch > '\u007f') ch = '?';
- if (ch == EOL) { line++; lineStart = pos + 1; }
- }
- }
-
--->comment
-
- static void CheckLiteral() {
- switch (t.val) {
--->literals
- }
- }
-
- /* AW Scan() renamed to NextToken() */
- static Token NextToken() {
- while (ignore[ch]) NextCh();
--->scan1
- t = new Token();
- t.pos = pos; t.col = pos - lineStart + 1; t.line = line;
- int state = start[ch];
- StringBuilder buf = new StringBuilder(16);
- buf.Append(ch); NextCh();
-
- switch (state) {
- case 0: { t.kind = noSym; goto done; } // NextCh already done
--->scan2
- }
- done:
- t.val = buf.ToString();
- return t;
- }
-
- /* AW 2003-03-07 get the next token, move on and synch peek token with current */
- public static Token Scan () {
- t = pt = t.next;
- return t;
- }
-
- /* AW 2003-03-07 get the next token, ignore pragmas */
- public static Token Peek () {
- do { // skip pragmas while peeking
- pt = pt.next;
- } while (pt != null && pt.kind > maxT);
- return pt;
- }
-
- /* AW 2003-03-11 to make sure peek start at current scan position */
- public static void StartPeek () { pt = t; }
-} // end Scanner
-
-
-public delegate void ErrorCodeProc (int line, int col, int n);
-public delegate void ErrorMsgProc (int line, int col, string msg);
-
-public class Errors {
- public static int count = 0; // number of errors detected
- public static ErrorCodeProc SynErr = new ErrorCodeProc(DefaultCodeError); // syntactic errors
- public static ErrorCodeProc SemErr = new ErrorCodeProc(DefaultCodeError); // semantic errors
- public static ErrorMsgProc Error = new ErrorMsgProc(DefaultMsgError); // user defined string based errors
- public static StringBuilder errorText = new StringBuilder();
-
- public static void Exception (string s) {
- Console.WriteLine(s);
- System.Environment.Exit(0);
- }
-
- static void DefaultCodeError (int line, int col, int n) {
- errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
- errorText.Append("\n");
- count++;
- }
-
- static void DefaultMsgError (int line, int col, string s) {
- errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
- errorText.Append("\n");
- count++;
- }
-} // Errors
-
-$$$
+using System;
+using System.Drawing;
+using System.IO;
+using System.Collections;
+using System.Text;
+
+-->namespace
+
+public class Token {
+ public int kind; // token kind
+ public int pos; // token position in the source text (starting at 0)
+ public int col; // token column (starting at 0)
+ public int line; // token line (starting at 1)
+ public string val; // token value
+ public Token next; // AW 2003-03-07 Tokens are kept in linked list
+
+ public Point Location {
+ get {
+ return new Point(line, col);
+ }
+ }
+
+ public Token () { }
+ public Token (int kind) { this.kind = kind; }
+}
+
+public class Buffer {
+ public const int eof = '\uffff';
+
+ static byte[] buf;
+ static int bufLen;
+ static int pos;
+
+ public static void Fill (string fileName) {
+ FileStream s = null;
+ try {
+ s = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
+ Fill(s);
+ } catch (IOException) {
+ Console.WriteLine("--- Cannot open file {0}", fileName);
+ System.Environment.Exit(0);
+ } finally {
+ if (s != null) s.Close();
+ }
+ }
+
+ public static void Fill (Stream s) {
+ bufLen = (int) s.Length;
+ buf = new byte[bufLen];
+ s.Read(buf, 0, bufLen);
+ pos = 0;
+ }
+
+ public static int Read () {
+ if (pos < bufLen) return buf[pos++];
+ else return 0;
+ }
+
+ public static int Peek () {
+ if (pos < bufLen) return buf[pos];
+ else return 0;
+ }
+
+ /* AW 2003-03-10 moved this from ParserGen.cs */
+ public static string GetString (int beg, int end) {
+ StringBuilder s = new StringBuilder(64);
+ int oldPos = Buffer.Pos;
+ Buffer.Pos = beg;
+ while (beg < end) { s.Append((char)Buffer.Read()); beg++; }
+ Buffer.Pos = oldPos;
+ return s.ToString();
+ }
+
+ public static int Pos {
+ get { return pos; }
+ set {
+ if (value < 0) pos = 0;
+ else if (value >= bufLen) pos = bufLen;
+ else pos = value;
+ }
+ }
+}
+
+public class Scanner {
+ const char EOF = '\0';
+ const char EOL = '\n';
+ const char CR = '\n';
+
+-->constants
+
+-->declarations
+
+ static Token t; // current token
+ static char ch; // current input character
+ static int pos; // column number of current character
+ static int line; // line number of current character
+ static int lineStart; // start position of current line
+ static int oldEols; // EOLs that appeared in a comment;
+ static BitArray ignore; // set of characters to be ignored by the scanner
+
+ /* ML ----- begin */
+ static Token tokens; // the complete input token stream
+ static Token pt; // current peek token
+
+ static int peekCount = 0;
+
+ public static int PeekCount { get { return peekCount; } }
+
+ static void Init()
+ {
+ pos = -1; line = 1; lineStart = 0;
+ oldEols = 0;
+ NextCh();
+-->initialization
+
+ /* AW 2003-03-07 fill token list */
+ tokens = new Token(); // first token is a dummy
+ Token node = tokens;
+ do {
+ node.next = NextToken();
+ node = node.next;
+ } while (node.kind != 0); /* AW: 0 => EOF */
+ t = pt = tokens;
+ }
+
+ public static void Init(String fileName) {
+ Buffer.Fill(fileName);
+ Init();
+ }
+
+ public static void Init(Stream s) {
+ Buffer.Fill(s);
+ Init();
+ }
+
+ static void NextCh() {
+ if (oldEols > 0) { ch = EOL; oldEols--; }
+ else {
+ ch = (char)Buffer.Read(); pos++;
+ // replace isolated '\r' by '\n' in order to make
+ // eol handling uniform across Windows, Unix and Mac
+ if (ch == '\r' && Buffer.Peek() != '\n') ch = EOL;
+ else if (ch > '\u007f') ch = '?';
+ if (ch == EOL) { line++; lineStart = pos + 1; }
+ }
+ }
+
+-->comment
+
+ static void CheckLiteral() {
+ switch (t.val) {
+-->literals
+ }
+ }
+
+ /* AW Scan() renamed to NextToken() */
+ static Token NextToken() {
+ while (ignore[ch]) NextCh();
+-->scan1
+ t = new Token();
+ t.pos = pos; t.col = pos - lineStart + 1; t.line = line;
+ int state = start[ch];
+ StringBuilder buf = new StringBuilder(16);
+ buf.Append(ch); NextCh();
+
+ switch (state) {
+ case 0: { t.kind = noSym; goto done; } // NextCh already done
+-->scan2
+ }
+ done:
+ t.val = buf.ToString();
+ return t;
+ }
+
+ /* AW 2003-03-07 get the next token, move on and synch peek token with current */
+ public static Token Scan () {
+ t = pt = t.next;
+ return t;
+ }
+
+ /* AW 2003-03-07 get the next token, ignore pragmas */
+ public static Token Peek () {
+ do { // skip pragmas while peeking
+ pt = pt.next;
+ } while (pt != null && pt.kind > maxT);
+ return pt;
+ }
+
+ /* AW 2003-03-11 to make sure peek start at current scan position */
+ public static void StartPeek () { pt = t; }
+} // end Scanner
+
+
+public delegate void ErrorCodeProc (int line, int col, int n);
+public delegate void ErrorMsgProc (int line, int col, string msg);
+
+public class Errors {
+ public static int count = 0; // number of errors detected
+ public static ErrorCodeProc SynErr = new ErrorCodeProc(DefaultCodeError); // syntactic errors
+ public static ErrorCodeProc SemErr = new ErrorCodeProc(DefaultCodeError); // semantic errors
+ public static ErrorMsgProc Error = new ErrorMsgProc(DefaultMsgError); // user defined string based errors
+ public static StringBuilder errorText = new StringBuilder();
+
+ public static void Exception (string s) {
+ Console.WriteLine(s);
+ System.Environment.Exit(0);
+ }
+
+ static void DefaultCodeError (int line, int col, int n) {
+ errorText.Append(String.Format("-- line {0} col {1}: error {2}", line, col, n));
+ errorText.Append("\n");
+ count++;
+ }
+
+ static void DefaultMsgError (int line, int col, string s) {
+ errorText.Append(String.Format("-- line {0} col {1}: {2}", line, col, s));
+ errorText.Append("\n");
+ count++;
+ }
+} // Errors
+
+$$$
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/Scanner.frame
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,2747 +1,2747 @@
-using System.Drawing;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Text;
-using ICSharpCode.SharpRefactory.Parser.AST.VB;
-using ICSharpCode.SharpRefactory.Parser.VB;
-
-COMPILER VBNET
-
-private string assemblyName = null;
-public CompilationUnit compilationUnit;
-private ArrayList importedNamespaces = null;
-private Stack withStatements;
-private bool isLabel = false;
-private LabelStatement labelStatement = null;
-
-public string ContainingAssembly
-{
- set { assemblyName = value; }
-}
-
-Token t
-{
- get {
- return lexer.Token;
- }
-}
-Token la
-{
- get {
- return lexer.LookAhead;
- }
-}
-
-void updateLabelStatement(Statement stmt)
-{
- if(isLabel) {
- labelStatement.EmbeddedStatement = stmt;
- isLabel = false;
- } else {
- compilationUnit.AddChild(stmt);
- }
-}
-
-/* Return the n-th token after the current lookahead token */
-void StartPeek()
-{
- lexer.StartPeek();
-}
-
-Token Peek()
-{
- return lexer.Peek();
-}
-
-Token Peek (int n)
-{
- lexer.StartPeek();
- Token x = la;
- while (n > 0) {
- x = lexer.Peek();
- n--;
- }
- return x;
-}
-
-public void Error(string s)
-{
- if (errDist >= minErrDist) {
- errors.Error(la.line, la.col, s);
- }
- errDist = 0;
-}
-
-public Expression ParseExpression(Lexer lexer)
-{
- this.errors = lexer.Errors;
- this.lexer = lexer;
- errors.SynErr = new ErrorCodeProc(SynErr);
- lexer.NextToken();
- Expression expr;
- Expr(out expr);
- return expr;
-}
-
-bool IsEndStmtAhead()
-{
- int peek = Peek(1).kind;
- return la.kind == Tokens.End && (peek == Tokens.EOL || peek == Tokens.Colon);
-}
-
-bool IsNotClosingParenthesis() {
- return la.kind != Tokens.CloseParenthesis;
-}
-
-/*
- True, if ident is followed by "="
-*/
-bool IdentAndAsgn () {
- if(la.kind == Tokens.Identifier) {
- if(Peek(1).kind == Tokens.Assign) return true;
- if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
- }
- return false;
-}
-
-/*
- True, if ident is followed by "=" or by ":" and "="
-*/
-bool IsNamedAssign() {
-// if(Peek(1).kind == Tokens.Assign) return true; // removed: not in the lang spec
- if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
- return false;
-}
-
-bool IsObjectCreation() {
- return la.kind == Tokens.As && Peek(1).kind == Tokens.New;
-}
-
-/*
- True, if "<" is followed by the ident "assembly" or "module"
-*/
-bool IsGlobalAttrTarget () {
- Token pt = Peek(1);
- return la.kind == Tokens.LessThan && ( pt.val.ToLower() == "assembly" || pt.val.ToLower() == "module");
-}
-
-/*
- True if the next token is a "(" and is followed by "," or ")"
-*/
-bool IsRank()
-{
- int peek = Peek(1).kind;
- return la.kind == Tokens.OpenParenthesis
- && (peek == Tokens.Comma || peek == Tokens.CloseParenthesis);
-}
-
-bool IsDims()
-{
- int peek = Peek(1).kind;
- int peek_n = Peek(2).kind;
- return la.kind == Tokens.OpenParenthesis
- && (peek == Tokens.LiteralInteger && peek_n == Tokens.CloseParenthesis);
-}
-
-bool IsSize()
-{
- return la.kind == Tokens.OpenParenthesis;
-}
-
-/*
- True, if the comma is not a trailing one,
- like the last one in: a, b, c,
-*/
-bool NotFinalComma() {
- int peek = Peek(1).kind;
- return la.kind == Tokens.Comma &&
- peek != Tokens.CloseCurlyBrace && peek != Tokens.CloseSquareBracket;
-}
-
-/*
- True, if the next token is "Else" and this one
- if followed by "If"
-*/
-bool IsElseIf()
-{
- int peek = Peek(1).kind;
- return la.kind == Tokens.Else && peek == Tokens.If;
-}
-
-/*
- True if the next token is goto and this one is
- followed by minus ("-") (this is allowd in in
- error clauses)
-*/
-bool IsNegativeLabelName()
-{
- int peek = Peek(1).kind;
- return la.kind == Tokens.GoTo && peek == Tokens.Minus;
-}
-
-/*
- True if the next statement is a "Resume next" statement
-*/
-bool IsResumeNext()
-{
- int peek = Peek(1).kind;
- return la.kind == Tokens.Resume && peek == Tokens.Next;
-}
-
-/*
- True, if ident/literal integer is followed by ":"
-*/
-bool IsLabel()
-{
- return (la.kind == Tokens.Identifier || la.kind == Tokens.LiteralInteger)
- && Peek(1).kind == Tokens.Colon;
-}
-
-bool IsNotStatementSeparator()
-{
- return la.kind == Tokens.Colon && Peek(1).kind == Tokens.EOL;
-}
-
-bool IsAssignment ()
-{
- return IdentAndAsgn();
-}
-
-bool IsMustOverride(Modifiers m)
-{
- return m.Contains(Modifier.MustOverride);
-}
-
-/*
- True, if lookahead is a local attribute target specifier,
- i.e. one of "event", "return", "field", "method",
- "module", "param", "property", or "type"
-*/
-bool IsLocalAttrTarget() {
- // TODO
- return false;
-}
-
-TOKENS
- /*----- terminal classes -----*/
- /* EOF is 0 */
- EOL
- ident
- LiteralString
- LiteralCharacter
- LiteralInteger
- LiteralDouble
- LiteralSingle
- LiteralDecimal
- LiteralDate
-
- /*----- special character -----*/
- "."
- "="
- ","
- ":"
- "+"
- "-"
- "*"
- "/"
- "\\"
- "&"
- "^"
-
- "{"
- "}"
-
- "["
- "]"
-
- "("
- ")"
-
- ">"
- "<"
-
- "<>"
- ">="
- "<="
-
- "<<"
- ">>"
-
- "+="
- "^="
- "-="
- "*="
- "/="
- "\\="
- "<<="
- ">>="
- "&="
-
- /*----- VB.NET keywords -----*/
- "AddHandler"
- "AddressOf"
- "Alias"
- "And"
- "AndAlso"
- "Ansi"
- "As"
- "Assembly"
- "Auto"
- "Binary"
- "Boolean"
- "ByRef"
- "Byte"
- "ByVal"
- "Call"
- "Case"
- "Catch"
- "CBool"
- "CByte"
- "CChar"
- "CDate"
- "CDbl"
- "CDec"
- "Char"
- "CInt"
- "Class"
- "CLng"
- "CObj"
- "Compare"
- "Const"
- "CShort"
- "CSng"
- "CStr"
- "CType"
- "Date"
- "Decimal"
- "Declare"
- "Default"
- "Delegate"
- "Dim"
- "DirectCast"
- "Do"
- "Double"
- "Each"
- "Else"
- "ElseIf"
- "End"
- "EndIf"
- "Enum"
- "Erase"
- "Error"
- "Event"
- "Exit"
- "Explicit"
- "False"
- "Finally"
- "For"
- "Friend"
- "Function"
- "Get"
- "GetType"
- "GoSub"
- "GoTo"
- "Handles"
- "If"
- "Implements"
- "Imports"
- "In"
- "Inherits"
- "Integer"
- "Interface"
- "Is"
- "Let"
- "Lib"
- "Like"
- "Long"
- "Loop"
- "Me"
- "Mod"
- "Module"
- "MustInherit"
- "MustOverride"
- "MyBase"
- "MyClass"
- "Namespace"
- "New"
- "Next"
- "Not"
- "Nothing"
- "NotInheritable"
- "NotOverridable"
- "Object"
- "Off"
- "On"
- "Option"
- "Optional"
- "Or"
- "OrElse"
- "Overloads"
- "Overridable"
- "Override"
- "Overrides"
- "ParamArray"
- "Preserve"
- "Private"
- "Property"
- "Protected"
- "Public"
- "RaiseEvent"
- "ReadOnly"
- "ReDim"
- "RemoveHandler"
- "Resume"
- "Return"
- "Select"
- "Set"
- "Shadows"
- "Shared"
- "Short"
- "Single"
- "Static"
- "Step"
- "Stop"
- "Strict"
- "String"
- "Structure"
- "Sub"
- "SyncLock"
- "Text"
- "Then"
- "Throw"
- "To"
- "True"
- "Try"
- "TypeOf"
- "Unicode"
- "Until"
- "Variant"
- "Wend"
- "When"
- "While"
- "With"
- "WithEvents"
- "WriteOnly"
- "Xor"
-
-PRODUCTIONS
-
-VBNET
- (.
- compilationUnit = new CompilationUnit();
- withStatements = new Stack();
- .) =
- { EOL }
- { OptionStmt }
- { ImportsStmt}
- { IF (IsGlobalAttrTarget()) GlobalAttributeSection }
- { NamespaceMemberDecl }
- EOF
- .
-
-OptionStmt (. INode node = null; bool val = true; .) =
- "Option" (. Point startPos = t.Location; .)
- (
- "Explicit" [ OptionValue<ref val> ]
- (. node = new OptionExplicitDeclaration(val); .)
- |
- "Strict" [ OptionValue<ref val> ]
- (. node = new OptionStrictDeclaration(val); .)
- |
- "Compare" ( "Binary" (. node = new OptionCompareDeclaration(CompareType.Binary); .)
- | "Text" (. node = new OptionCompareDeclaration(CompareType.Text); .)
- )
- )
- EndOfStmt
- (.
- node.StartLocation = startPos;
- node.EndLocation = t.Location;
- compilationUnit.AddChild(node);
- .)
- .
-
-OptionValue<ref bool val> =
- (
- "On" (. val = true; .)
- |
- "Off" (. val = true; .)
- )
- .
-
-EndOfStmt =
- (
- EOL
- |
- ":"
- )
- .
-
-ImportsStmt
- (.
- ArrayList importClauses = new ArrayList();
- importedNamespaces = new ArrayList();
- object importClause;
- .) =
- "Imports"
- (.
- Point startPos = t.Location;
- ImportsStatement importsStatement = new ImportsStatement(null);
- .)
- ImportClause<out importClause> (. importClauses.Add(importClause); .)
- {
- "," ImportClause<out importClause> (. importClauses.Add(importClause); .)
- }
- EndOfStmt
- (.
- importsStatement.ImportClauses = importClauses;
- importsStatement.StartLocation = startPos;
- importsStatement.EndLocation = t.Location;
- compilationUnit.AddChild(importsStatement);
- .)
- .
-
-ImportClause<out object importClause>
- (.
- string qualident = null;
- string aliasident = null;
- importClause = null;
- .) =
- [ IF (IsAssignment()) Identifier (. aliasident = t.val; .) "=" ]
- Qualident<out qualident>
- (.
- if (qualident != null && qualident.Length > 0) {
- if (aliasident != null) {
- importClause = new ImportsAliasDeclaration(aliasident, qualident);
- } else {
- importedNamespaces.Add(qualident);
- importClause = new ImportsDeclaration(qualident);
- }
- }
- .)
- .
-
-/* 6.4.2 */
-NamespaceMemberDecl
- (.
- Modifiers m = new Modifiers(this);
- AttributeSection section;
- ArrayList attributes = new ArrayList();
- string qualident;
- .) =
- "Namespace"
- (.
- Point startPos = t.Location;
- .)
- Qualident<out qualident>
- (.
- INode node = new NamespaceDeclaration(qualident);
- node.StartLocation = startPos;
- compilationUnit.AddChild(node);
- compilationUnit.BlockStart(node);
- .)
- EOL
- NamespaceBody
- (.
- node.EndLocation = t.Location;
- compilationUnit.BlockEnd();
- .)
- |
- { AttributeSection<out section> (. attributes.Add(section); .) }
- { TypeModifier<m> } NonModuleDeclaration<m, attributes>
- .
-
-/* 6.4.2 */
-NonModuleDeclaration<Modifiers m, ArrayList attributes>
- (.
- string name = String.Empty;
- ArrayList names = null;
- .) =
- (. m.Check(Modifier.Classes); .)
- /* Spec, 7.5 */
- "Class"
- (. TypeDeclaration newType = new TypeDeclaration();
- compilationUnit.AddChild(newType);
- compilationUnit.BlockStart(newType);
- newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- newType.Type = Types.Class;
- newType.Modifier = m.Modifier;
- newType.Attributes = attributes;
- .)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
- EndOfStmt
- [ ClassBaseType<out name> (. newType.BaseType = name; .) ]
- { TypeImplementsClause<out names> (. newType.BaseInterfaces = names; .) }
- ClassBody<newType>
- (.
- compilationUnit.BlockEnd();
- .)
- | "Module"
- (.
- m.Check(Modifier.Modules);
- TypeDeclaration newType = new TypeDeclaration();
- newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- compilationUnit.AddChild(newType);
- compilationUnit.BlockStart(newType);
- newType.StartLocation = t.Location;
- newType.Type = Types.Module;
- newType.Modifier = m.Modifier;
- newType.Attributes = attributes;
- .)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
- EOL
- ModuleBody<newType>
- (.
- newType.EndLocation = t.Location;
- compilationUnit.BlockEnd();
- .)
- | "Structure"
- (.
- m.Check(Modifier.Structures);
- TypeDeclaration newType = new TypeDeclaration();
- compilationUnit.AddChild(newType);
- compilationUnit.BlockStart(newType);
- newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- newType.StartLocation = t.Location;
- newType.Type = Types.Structure;
- newType.Modifier = m.Modifier;
- newType.Attributes = attributes;
- ArrayList baseInterfaces = new ArrayList();
- .)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
- EOL { TypeImplementsClause<out baseInterfaces> }
- StructureBody<newType>
- (.
- newType.EndLocation = t.Location;
- compilationUnit.BlockEnd();
- .)
- | /* 7.4 */
- "Enum"
- (.
- m.Check(Modifier.Enums);
- TypeDeclaration newType = new TypeDeclaration();
- newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- compilationUnit.AddChild(newType);
- compilationUnit.BlockStart(newType);
-
- newType.Type = Types.Enum;
- newType.Modifier = m.Modifier;
- newType.Attributes = attributes;
- .)
- Identifier
- (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
- [ "As" PrimitiveTypeName<out name> (. newType.BaseType = name; .) ]
- EOL
- EnumBody<newType>
- (.
- newType.EndLocation = t.Location;
- compilationUnit.BlockEnd();
- .)
- | /* 7.8 */
- "Interface"
- (.
- m.Check(Modifier.Interfaces);
- TypeDeclaration newType = new TypeDeclaration();
- compilationUnit.AddChild(newType);
- compilationUnit.BlockStart(newType);
- newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
-
- newType.Type = Types.Interface;
- newType.Modifier = m.Modifier;
- newType.Attributes = attributes;
- ArrayList baseInterfaces = new ArrayList();
- .)
- Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
- EndOfStmt { InterfaceBase<out baseInterfaces> (. newType.BaseInterfaces = baseInterfaces; .) }
- InterfaceBody<newType>
- (.
- newType.EndLocation = t.Location;
- compilationUnit.BlockEnd();
- .)
- | /* 7.10 */
- "Delegate"
- (.
- m.Check(Modifier.Delegates);
- DelegateDeclaration delegateDeclr = new DelegateDeclaration();
- ArrayList p = null;
- TypeReference type = null;
- delegateDeclr.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- delegateDeclr.StartLocation = t.Location;
- delegateDeclr.Modifier = m.Modifier;
- delegateDeclr.Attributes = attributes;
- .)
- (
- "Sub" Identifier (. delegateDeclr.Name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" (. delegateDeclr.Parameters = p; .) ]
- |
- "Function" Identifier (. delegateDeclr.Name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" (. delegateDeclr.Parameters = p; .) ]
- [ "As" TypeName<out type> (. delegateDeclr.ReturnType = type; .)]
- )
- (. delegateDeclr.EndLocation = t.EndLocation; .)
- EOL
- (.
- compilationUnit.AddChild(delegateDeclr);
- .)
- .
-
-NamespaceBody =
- { NamespaceMemberDecl }
- "End" "Namespace"
- EOL
- .
-
-ClassBody<TypeDeclaration newType>
- (. AttributeSection section; .) =
- {
- (.
- ArrayList attributes = new ArrayList();
- Modifiers m = new Modifiers(this);
- .)
- { AttributeSection<out section> (. attributes.Add(section); .) }
- { MemberModifier<m> }
- ClassMemberDecl<m, attributes>
- }
- "End" "Class" (. newType.EndLocation = t.EndLocation; .)
- EOL
- .
-
-StructureBody<TypeDeclaration newType>
- (. AttributeSection section; .) =
- {
- (.
- ArrayList attributes = new ArrayList();
- Modifiers m = new Modifiers(this);
- .)
- { AttributeSection<out section> (. attributes.Add(section); .) }
- { MemberModifier<m> }
- StructureMemberDecl<m, attributes>
- }
- "End" "Structure" (. newType.EndLocation = t.EndLocation; .)
- EOL
- .
-
-/* 7.7.1 */
-ModuleBody<TypeDeclaration newType>
- (. AttributeSection section; .) =
- {
- (.
- ArrayList attributes = new ArrayList();
- Modifiers m = new Modifiers(this);
- .)
- { AttributeSection<out section> (. attributes.Add(section); .) }
- { MemberModifier<m> }
- ClassMemberDecl<m, attributes>
- }
- "End" "Module" (. newType.EndLocation = t.EndLocation; .)
- EOL
- .
-
-EnumBody<TypeDeclaration newType>
- (. FieldDeclaration f; .) =
- {
- EnumMemberDecl<out f> (. compilationUnit.AddChild(f); .)
- }
- "End" "Enum" (. newType.EndLocation = t.EndLocation; .)
- EOL
- .
-
-InterfaceBody<TypeDeclaration newType> =
- { InterfaceMemberDecl }
- "End" "Interface" (. newType.EndLocation = t.EndLocation; .)
- EOL
- .
-
-/*
- The information provided in the spec about
- interface declarations is wrong
-*/
-InterfaceMemberDecl
- (.
- TypeReference type =null;
- ArrayList p = null;
- AttributeSection section;
- Modifiers mod = new Modifiers(this);
- ArrayList attributes = new ArrayList();
- /*ArrayList parameters = new ArrayList();*/
- string name;
- .) =
- { AttributeSection<out section> (. attributes.Add(section); .) }
- /* this is different to c#: not only the Shadows modifier is allowed,
- also member modifiers like overloads etc.
- */
- { MemberModifier<mod> }
- (
- "Event"
- (. mod.Check(Modifier.InterfaceEvents); .)
- Identifier (. name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- [ "As" TypeName<out type> ]
- EOL
- (.
- EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null);
- ed.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- compilationUnit.AddChild(ed);
- ed.EndLocation = t.EndLocation;
- .)
- |
- "Sub"
- (.
- mod.Check(Modifier.InterfaceMethods);
- ArrayList comments = lexer.SpecialTracker.RetreiveComments();
- .)
- Identifier (. name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- EOL
- (.
- MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes);
- md.Specials["before"] = comments;
- md.EndLocation = t.EndLocation;
- compilationUnit.AddChild(md);
- .)
- |
- "Function"
- (.
- mod.Check(Modifier.InterfaceMethods);
- AttributeSection attributeSection = null;
- .)
- Identifier (. name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- [ "As" [AttributeSection<out attributeSection> ] TypeName<out type> ]
- (.
- if(type == null) {
- type = new TypeReference("System.Object");
- }
- type.Attributes = attributeSection;
- MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, type, p, attributes);
- md.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- md.EndLocation = t.EndLocation;
- compilationUnit.AddChild(md);
- .)
- EOL
- |
- "Property"
- (.
- mod.Check(Modifier.InterfaceProperties);
- ArrayList comments = lexer.SpecialTracker.RetreiveComments();
- .)
- Identifier (. name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- [ "As" TypeName<out type> ]
- (.
- if(type == null) {
- type = new TypeReference("System.Object");
- }
- .)
- EOL
- (.
- PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes);
- pd.Parameters = p;
- pd.Specials["before"] = comments;
- pd.EndLocation = t.EndLocation;
- compilationUnit.AddChild(pd);
- .)
- )
- | /* inner type declarations */
- NonModuleDeclaration<mod, attributes>
- .
-
-/* 7.4.1 */
-EnumMemberDecl<out FieldDeclaration f>
- (.
- Expression expr = null;
- ArrayList attributes = new ArrayList();
- AttributeSection section = null;
- VariableDeclaration varDecl = null;
- .) =
- { AttributeSection<out section> (. attributes.Add(section); .) }
- Identifier
- (.
- f = new FieldDeclaration(attributes);
- varDecl = new VariableDeclaration(t.val);
- varDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- f.Fields.Add(varDecl);
- f.StartLocation = t.Location;
- .)
- [ "=" Expr<out expr> (. varDecl.Initializer = expr; .) ]
- EOL
- .
-
-ClassMemberDecl<Modifiers m, ArrayList attributes> =
- StructureMemberDecl<m, attributes>
- .
-
-ClassBaseType<out string name>
- (.
- TypeReference type;
- name = String.Empty;
- .) =
- "Inherits"
- TypeName<out type> (. name = type.Type; .)
- EndOfStmt
- .
-
-/* 7.6.1 */
-StructureMemberDecl<Modifiers m, ArrayList attributes>
- (.
- TypeReference type = null;
- ArrayList p = null;
- Statement stmt = null;
- ArrayList variableDeclarators = new ArrayList();
- .)=
- NonModuleDeclaration<m, attributes>
- | /* 9.2.1 */
- "Sub"
- (.
- Point startPos = t.Location;
- ArrayList comments = lexer.SpecialTracker.RetreiveComments();
- .)
- (
- (.
- string name = String.Empty;
- MethodDeclaration methodDeclaration;
- HandlesClause handlesClause = null;
- ImplementsClause implementsClause = null;
- .)
- Identifier
- (.
- name = t.val;
- m.Check(Modifier.Methods);
- .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- [
- (
- ImplementsClause<out implementsClause>
- |
- HandlesClause<out handlesClause>
- )
- ]
- (. Point endLocation = t.EndLocation; .)
- EOL
- (
- /* abstract methods without a body */
- IF(IsMustOverride(m))
- (.
- methodDeclaration = new MethodDeclaration(name, m.Modifier, null, p, attributes);
- methodDeclaration.Specials["before"] = comments;
- methodDeclaration.StartLocation = startPos;
- methodDeclaration.EndLocation = endLocation;
-
- methodDeclaration.HandlesClause = handlesClause;
- methodDeclaration.ImplementsClause = implementsClause;
-
- compilationUnit.AddChild(methodDeclaration);
- .)
- |
- (.
- methodDeclaration = new MethodDeclaration(name, m.Modifier, null, p, attributes);
- methodDeclaration.Specials["before"] = comments;
- methodDeclaration.StartLocation = startPos;
- methodDeclaration.EndLocation = endLocation;
-
- methodDeclaration.HandlesClause = handlesClause;
- methodDeclaration.ImplementsClause = implementsClause;
-
- compilationUnit.AddChild(methodDeclaration);
- compilationUnit.BlockStart(methodDeclaration);
- .)
- Block<out stmt>
- (.
- compilationUnit.BlockEnd();
- methodDeclaration.Body = (BlockStatement)stmt;
- .)
- "End" "Sub" (. methodDeclaration.Body.EndLocation = t.EndLocation; .) EOL
- )
- /* 9.3 */
- | "New" [ "(" [ FormalParameterList<out p> ] ")" ]
- (. m.Check(Modifier.Constructors); .)
- (. Point constructorEndLocation = t.EndLocation; .)
- EOL
- Block<out stmt>
- "End" "Sub" (. Point endLocation = t.EndLocation; .) EOL
- (.
- ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes);
- cd.StartLocation = startPos;
- cd.Specials["before"] = comments;
- cd.EndLocation = constructorEndLocation;
- cd.Body = (BlockStatement)stmt;
- cd.Body.EndLocation = endLocation;
- compilationUnit.AddChild(cd);
- .)
- )
- |
- /* 9.2.1 */
- "Function"
- (.
- m.Check(Modifier.Methods);
- string name = String.Empty;
- Point startPos = t.Location;
- MethodDeclaration methodDeclaration;
- HandlesClause handlesClause = null;
- ImplementsClause implementsClause = null;
- AttributeSection attributeSection = null;
- .)
- Identifier (. name = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- ["As" [AttributeSection<out attributeSection>] TypeName<out type> ]
- (.
- if(type == null) {
- type = new TypeReference("System.Object");
- }
- type.Attributes = attributeSection;
- .)
- [
- (
- ImplementsClause<out implementsClause>
- |
- HandlesClause<out handlesClause>
- )
- ]
- EOL
- (
- /* abstract methods without a body */
- IF(IsMustOverride(m))
- (.
- methodDeclaration = new MethodDeclaration(name, m.Modifier, type, p, attributes);
- methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- methodDeclaration.StartLocation = startPos;
- methodDeclaration.EndLocation = t.EndLocation;
- methodDeclaration.HandlesClause = handlesClause;
- methodDeclaration.ImplementsClause = implementsClause;
- compilationUnit.AddChild(methodDeclaration);
- .)
- |
- (.
- methodDeclaration = new MethodDeclaration(name, m.Modifier, type, p, attributes);
- methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- methodDeclaration.StartLocation = startPos;
- methodDeclaration.EndLocation = t.EndLocation;
-
- methodDeclaration.HandlesClause = handlesClause;
- methodDeclaration.ImplementsClause = implementsClause;
-
- compilationUnit.AddChild(methodDeclaration);
- compilationUnit.BlockStart(methodDeclaration);
- .)
- Block<out stmt>
- (.
- compilationUnit.BlockEnd();
- methodDeclaration.Body = (BlockStatement)stmt;
- .)
- "End" "Function"
- (.
- methodDeclaration.Body.StartLocation = methodDeclaration.EndLocation;
- methodDeclaration.Body.EndLocation = t.EndLocation;
- .)
- EOL
- )
- |
- /* 9.2.2. */
- "Declare"
- (.
- m.Check(Modifier.ExternalMethods);
- Point startPos = t.Location;
- CharsetModifier charsetModifer = CharsetModifier.None;
- string library = String.Empty;
- string alias = null;
- string name = String.Empty;
- .)
- [Charset<out charsetModifer> ]
- (
- "Sub"
- Identifier (. name = t.val; .)
- "Lib" LiteralString (. library = t.val; .)
- ["Alias" LiteralString (. alias = t.val; .)]
- [ "(" [ FormalParameterList<out p> ] ")" ]
- EOL
- (.
- DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer);
- declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- declareDeclaration.StartLocation = startPos;
- declareDeclaration.EndLocation = t.EndLocation;
- compilationUnit.AddChild(declareDeclaration);
- .)
- |
- "Function"
- Identifier (. name = t.val; .)
- "Lib" LiteralString (. library = t.val; .)
- ["Alias" LiteralString (. alias = t.val; .)]
- [ "(" [ FormalParameterList<out p> ] ")" ]
- ["As" TypeName<out type> ]
- EOL
- (.
- DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer);
- declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- declareDeclaration.StartLocation = startPos;
- declareDeclaration.EndLocation = t.EndLocation;
- compilationUnit.AddChild(declareDeclaration);
- .)
- )
- |
- /* 9. 4 */
- "Event"
- (.
- m.Check(Modifier.Events);
- Point startPos = t.Location;
- EventDeclaration eventDeclaration;
- string name = String.Empty;
- ImplementsClause implementsClause = null;
- .)
- Identifier (. name= t.val; .)
- (
- "As" TypeName<out type>
- |
- [ "(" [ FormalParameterList<out p> ] ")" ]
- )
- [ ImplementsClause<out implementsClause> ]
- (.
- eventDeclaration = new EventDeclaration(type, m.Modifier, p, attributes, name, implementsClause);
- eventDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- eventDeclaration.StartLocation = startPos;
- eventDeclaration.EndLocation = t.EndLocation;
- compilationUnit.AddChild(eventDeclaration);
- .)
- EOL
- | /* 9.6 */
- (. Point startPos = t.Location; .)
- (.
- m.Check(Modifier.Fields);
- FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
- ArrayList comments = lexer.SpecialTracker.RetreiveComments();
- fd.StartLocation = startPos;
- .)
- VariableDeclarator<variableDeclarators>
- (.
- ((INode)variableDeclarators[0]).Specials["before"] = comments;
- .)
- { "," VariableDeclarator<variableDeclarators> }
- EOL
- (.
- fd.EndLocation = t.EndLocation;
- fd.Fields = variableDeclarators;
- compilationUnit.AddChild(fd);
- .)
- | /* 9.4 */
- (. m.Check(Modifier.Fields); .)
- "Const" (. m.Add(Modifier.Constant); .)
- (.
- FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
- fd.StartLocation = t.Location;
- ArrayList comments = lexer.SpecialTracker.RetreiveComments();
- ArrayList constantDeclarators = new ArrayList();
- .)
- ConstantDeclarator<constantDeclarators>
- (.
- ((INode)constantDeclarators[0]).Specials["before"] = comments;
- .)
- { "," ConstantDeclarator<constantDeclarators> }
- (.
- fd.Fields = constantDeclarators;
- fd.EndLocation = t.Location;
- .)
- EOL
- (.
- fd.EndLocation = t.EndLocation;
- compilationUnit.AddChild(fd);
- .)
- | /* 9.7 */
- "Property"
- (.
- m.Check(Modifier.Properties);
- Point startPos = t.Location;
- ImplementsClause implementsClause = null;
- .)
- Identifier (. string propertyName = t.val; .)
- [ "(" [ FormalParameterList<out p> ] ")" ]
- [ "As" TypeName<out type> ]
- (.
- if(type == null) {
- type = new TypeReference("System.Object");
- }
- .)
- [ ImplementsClause<out implementsClause> ]
- EOL
- (
- /* abstract properties without a body */
- IF(IsMustOverride(m))
- (.
- PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
- pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- pDecl.StartLocation = startPos;
- pDecl.EndLocation = t.Location;
- pDecl.TypeReference = type;
- pDecl.ImplementsClause = implementsClause;
- pDecl.Parameters = p;
- compilationUnit.AddChild(pDecl);
- .)
- |
- (.
- PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
- pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
- pDecl.StartLocation = startPos;
- pDecl.EndLocation = t.Location;
- pDecl.BodyStart = t.Location;
- pDecl.TypeReference = type;
- pDecl.ImplementsClause = implementsClause;
- pDecl.Parameters = p;
- PropertyGetRegion getRegion;
- PropertySetRegion setRegion;
- .)
- AccessorDecls<out getRegion, out setRegion>
- "End" "Property"
- EOL
- (.
- pDecl.GetRegion = getRegion;
- pDecl.SetRegion = setRegion;
- pDecl.BodyEnd = t.EndLocation;
- compilationUnit.AddChild(pDecl);
- .)
- )
- .
-
-/* 9.7 */
-AccessorDecls<out PropertyGetRegion getBlock, out PropertySetRegion setBlock>
- (.
- ArrayList attributes = new ArrayList();
- AttributeSection section;
- getBlock = null;
- setBlock = null;
- .) =
- { AttributeSection<out section> (. attributes.Add(section); .) }
- (
- GetAccessorDecl<out getBlock, attributes>
- [
- (. attributes = new ArrayList(); .)
- { AttributeSection<out section> (. attributes.Add(section); .) }
- SetAccessorDecl<out setBlock, attributes>
- ]
- |
- SetAccessorDecl<out setBlock, attributes>
- [
- (. attributes = new ArrayList(); .)
- { AttributeSection<out section> (. attributes.Add(section); .) }
- GetAccessorDecl<out getBlock, attributes>
- ]
- )
- .
-
-/* 9.7.1 */
-GetAccessorDecl<out PropertyGetRegion getBlock, ArrayList attributes>
- (. Statement stmt = null; .) =
- "Get"
- EOL
- Block<out stmt>
- (.
- getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
- .)
- "End" "Get"
- EOL
- .
-
-/* 9.7.2 */
-SetAccessorDecl<out PropertySetRegion setBlock, ArrayList attributes>
- (.
- Statement stmt = null;
- ArrayList p = null;
- .) =
- "Set"
- [ "(" [ FormalParameterList<out p> ] ")" ]
- EOL
- Block<out stmt>
- (.
- setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
- setBlock.Parameters = p;
- .)
- "End" "Set"
- EOL
- .
-
-/* 9.5 */
-ConstantDeclarator<ArrayList constantDeclaration>
- (.
- Expression expr = null;
- TypeReference type = null;
- string name = String.Empty;
- .) =
- Identifier (. name = t.val; .)
- ["As" TypeName<out type> ]
- "=" Expr<out expr>
- (.
- VariableDeclaration f = new VariableDeclaration(name, expr);
- f.Type = type;
- constantDeclaration.Add(f);
- .)
- .
-
-/* 9.6 */
-VariableDeclarator<ArrayList fieldDeclaration>
- (.
- Expression expr = null;
- TypeReference type = null;
- ObjectCreateExpression oce = null;
- ArrayCreateExpression ace = null;
- ArrayList rank = null;
- ArrayList dimension = null;
- .) =
- Identifier
- (.
- VariableDeclaration f = new VariableDeclaration(t.val);
- .)
- [ IF(IsRank()) ArrayTypeModifiers<out rank> ]
- [ IF(IsSize()) ArrayInitializationModifier<out dimension> ]
- (
- IF(IsObjectCreation()) "As" ObjectCreateExpression<out expr>
- (.
- if(expr is ArrayCreateExpression) {
- ace = expr as ArrayCreateExpression;
- f.Initializer = ace.ArrayInitializer;
-
- } else {
- oce = expr as ObjectCreateExpression;
- f.Initializer = oce;
- if(oce.CreateType != null) {
- f.Type = oce.CreateType;
- }
- }
- .)
- |
- [ "As" TypeName<out type> ]
- (.
- if(type != null) {
- type.Dimension = dimension;
- }
- f.Type = type;
- if (type != null && rank != null) {
- if(type.RankSpecifier != null) {
- Error("array rank only allowed one time");
- } else {
- type.RankSpecifier = rank;
- }
- }
- .)
- [ "=" VariableInitializer<out expr> (. f.Initializer = expr; .) ]
- )
- (. fieldDeclaration.Add(f); .)
- .
-
-/* 6.8 */
-ArrayInitializationModifier<out ArrayList arrayModifiers>
- (.
- arrayModifiers = null;
- .) =
- "(" InitializationRankList<out arrayModifiers> ")"
- .
-
-/* 7.5.4.3 */
-InitializationRankList<out ArrayList rank>
- (.
- rank = null;
- Expression expr = null;
- .) =
- Expr<out expr> (. rank = new ArrayList(); rank.Add(expr); .)
- {
- "," Expr<out expr> (. rank.Add(expr); .)
- }
- .
-
-/* 9.6.3 */
-VariableInitializer<out Expression initializerExpression>
- (.
- initializerExpression = null;
- .) =
- Expr<out initializerExpression>
- | ArrayInitializer<out initializerExpression>
- .
-
-/* 9.6.3.4 */
-ArrayInitializer<out Expression outExpr>
- (.
- Expression expr = null;
- ArrayInitializerExpression initializer = new ArrayInitializerExpression();
- .) =
- "{"
- [
- VariableInitializer<out expr>
- (.
- initializer.CreateExpressions.Add(expr);
- .)
- {
- IF (NotFinalComma()) "," VariableInitializer<out expr>
- (. initializer.CreateExpressions.Add(expr); .)
- }
- ]
- "}" (. outExpr = initializer; .)
- .
-
-Charset<out CharsetModifier charsetModifier>
- (. charsetModifier = CharsetModifier.None; .) =
- | "Ansi" (. charsetModifier = CharsetModifier.ANSI; .)
- | "Auto" (. charsetModifier = CharsetModifier.Auto; .)
- | "Unicode" (. charsetModifier = CharsetModifier.Unicode; .)
- .
-
-/* 9.2.6 */
-HandlesClause<out HandlesClause handlesClause>
- (.
- handlesClause = new HandlesClause();
- string name;
- .) =
- "Handles" EventMemberSpecifier<out name> (. handlesClause.EventNames.Add(name); .)
- { "," EventMemberSpecifier<out name> (. handlesClause.EventNames.Add(name); .) }
- .
-
-/* 7.8. */
-InterfaceBase <out ArrayList bases>
- (.
- TypeReference type;
- bases = new ArrayList();
- .) =
- "Inherits"
- TypeName<out type> (. bases.Add(type); .)
- {
- ","
- TypeName<out type> (. bases.Add(type); .)
- }
- EOL
- .
-
-/* 7.2 */
-TypeImplementsClause<out ArrayList baseInterfaces>
- (.
- baseInterfaces = new ArrayList();
- TypeReference type = null;
- .) =
- "Implements" TypeName<out type>
- (.
- baseInterfaces.Add(type);
- .)
- {
- "," TypeName<out type>
- (. baseInterfaces.Add(type); .)
- }
- EndOfStmt
- .
-
-/* 9.1 */
-ImplementsClause<out ImplementsClause clause>
- (.
- clause = new ImplementsClause();
- string typename = String.Empty;
- string first;
- .) =
- "Implements" Identifier (. first = t.val; .) "." Qualident<out typename> (. ((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); .)
- { "," Identifier (. first = t.val; .) "." Qualident<out typename> (. ((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); .) }
- .
-
-EventMemberSpecifier<out string name>
- (. string type; name = String.Empty; .) =
- Identifier (. type = t.val; .)
- "."
- Identifier (. name = type + "." + t.val; .)
- | "MyBase" "."
- (
- Identifier (. name = "MyBase." + t.val; .)
- | "Error" (. name = "MyBase.Error"; .)
- )
- .
-
-Expr<out Expression expr>
- (. expr = new Expression(); .) =
- ConditionalOrExpr<out expr>
- {
- /*ConditionalOrExpr<out expr> |*/
- (. AssignmentOperatorType op; Expression val; .)
- AssignmentOperator<out op> Expr<out val> (. expr = new AssignmentExpression(expr, op, val); .)
- }
- .
-
-UnaryExpr<out Expression uExpr>
- (.
- Expression expr;
- UnaryOperatorType uop = UnaryOperatorType.None;
- bool isUOp = false;
- .) =
- { "+" (. uop = UnaryOperatorType.Plus; isUOp = true; .)
- | "-" (. uop = UnaryOperatorType.Minus; isUOp = true; .)
-/* | "Not" (. uop = UnaryOperatorType.Not; isUOp = true;.) */
- | "*" (. uop = UnaryOperatorType.Star; isUOp = true;.)
- }
- SimpleExpr<out expr>
- (.
- if (isUOp) {
- uExpr = new UnaryOperatorExpression(expr, uop);
- } else {
- uExpr = expr;
- }
- .)
- .
-
-AssignmentOperator<out AssignmentOperatorType op>
- (. op = AssignmentOperatorType.None; .) =
- "=" (. op = AssignmentOperatorType.Assign; .)
- | "&=" (. op = AssignmentOperatorType.ConcatString; .)
- | "+=" (. op = AssignmentOperatorType.Add; .)
- | "-=" (. op = AssignmentOperatorType.Subtract; .)
- | "*=" (. op = AssignmentOperatorType.Multiply; .)
- | "/=" (. op = AssignmentOperatorType.Divide; .)
- | "\\=" (. op = AssignmentOperatorType.DivideInteger; .)
- | "^=" (. op = AssignmentOperatorType.Power; .)
- | "<<=" (. op = AssignmentOperatorType.ShiftLeft; .)
- | ">>=" (. op = AssignmentOperatorType.ShiftRight; .)
- .
-
-/* 11.4 */
-SimpleExpr<out Expression pexpr>
- (.
- Expression expr;
- TypeReference type = null;
- string name = String.Empty;
- pexpr = null;
- .) =
- (
- (
- /* 11.4.1 */
- LiteralString (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- | LiteralCharacter (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- | LiteralSingle (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- | LiteralDouble (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- | LiteralInteger (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- | LiteralDate (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- | LiteralDecimal (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
- /* True, False and Nothing are handled as literals in the spec */
- | "True" (.pexpr = new PrimitiveExpression(true, "true"); .)
- | "False" (.pexpr = new PrimitiveExpression(false, "false"); .)
- | "Nothing" (.pexpr = new PrimitiveExpression(null, "null"); .)
- | /* 11.4.2 */ "(" Expr<out expr> ")" (. pexpr = new ParenthesizedExpression(expr); .)
- | /* 11.4.4 */ Identifier (. pexpr = new IdentifierExpression(t.val); .)
- | (. string val = String.Empty; .) PrimitiveTypeName<out val>
- "." Identifier (. pexpr = new FieldReferenceOrInvocationExpression(new TypeReferenceExpression(val), t.val); .)
- | "Me" (. pexpr = new ThisReferenceExpression(); .)
- | (. Expression retExpr = null; .)
- ( "MyBase" (. retExpr = new BaseReferenceExpression(); .)
- | "MyClass" (. retExpr = new ClassReferenceExpression(); .)
- )
- "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(retExpr, name); .)
- | ObjectCreateExpression<out expr> (. pexpr = expr; .)
- | /* 11.11 */ ( "DirectCast" | "CType" ) "(" Expr<out expr> "," TypeName<out type> ")" (. pexpr = new CastExpression(type, expr); .)
- | /* 11.11 */ CastTarget<out type> "(" Expr<out expr> ")" (. pexpr = new CastExpression(type, expr, true); .)
- | /* 11.4.5 */ "AddressOf" Expr<out expr> (. pexpr = new AddressOfExpression(expr); .)
- | /* 11.5.1 */ "GetType" "(" TypeName<out type> ")" (. pexpr = new GetTypeExpression(type); .)
- | /* 11.5.2 */ "TypeOf" SimpleExpr<out expr> "Is" TypeName<out type> (. pexpr = new TypeOfExpression(expr, type); .)
- )
- {
- "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); .)
- | "(" (. ArrayList parameters = new ArrayList(); .)
- [
- (. expr = null; .) [ Argument<out expr>] (. parameters.Add(expr); .)
- {
- "," (. expr = null; .)
- [ Argument<out expr> ] (. parameters.Add(expr); .)
- }
- ]
- ")" (. pexpr = new InvocationExpression(pexpr, parameters); .)
- }
- |
- /* this form only occurs in with statements*/
- "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name);.)
- {
- "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); .)
- | "(" (. ArrayList parameters = new ArrayList(); .)
- [
- (. expr = null; .) [ Argument<out expr>] (. parameters.Add(expr); .)
- {
- "," (. expr = null; .)
- [ Argument<out expr> ] (. parameters.Add(expr); .)
- }
- ]
- ")" (. pexpr = new InvocationExpression(pexpr, parameters); .)
- }
- )
- .
-
-/* 11.11 */
-
-CastTarget<out TypeReference type>
- (.
- type = null;
- .) =
- "CBool" (. type = new TypeReference("System.Boolean"); .)
- | "CByte" (. type = new TypeReference("System.Byte"); .)
- | "CChar" (. type = new TypeReference("System.Char"); .)
- | "CDate" (. type = new TypeReference("System.DateTime"); .)
- | "CDec" (. type = new TypeReference("System.Decimal"); .)
- | "CDbl" (. type = new TypeReference("System.Double"); .)
- | "CInt" (. type = new TypeReference("System.Int32"); .)
- | "CLng" (. type = new TypeReference("System.Int64"); .)
- | "CObj" (. type = new TypeReference("System.Object"); .)
- | "CShort" (. type = new TypeReference("System.Int16"); .)
- | "CSng" (. type = new TypeReference("System.Single"); .)
- | "CStr" (. type = new TypeReference("System.String"); .)
- .
-
-ConditionalOrExpr<out Expression outExpr>
- (. Expression expr; .) =
- ConditionalAndExpr<out outExpr> { "OrElse" ConditionalAndExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanOr, expr); .) }
- .
-
-ConditionalAndExpr<out Expression outExpr>
- (. Expression expr; .) =
- InclusiveOrExpr<out outExpr> { "AndAlso" InclusiveOrExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanAnd, expr); .) }
- .
-
-InclusiveOrExpr<out Expression outExpr>
- (. Expression expr; .) =
- ExclusiveOrExpr<out outExpr> { "Xor" ExclusiveOrExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr); .) }
- .
-
-ExclusiveOrExpr<out Expression outExpr>
- (. Expression expr; .) =
- AndExpr<out outExpr> { "Or" AndExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr); .) }
- .
-
-AndExpr<out Expression outExpr>
- (. Expression expr; .) =
- NotExpr<out outExpr> { "And" NotExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr); .) }
- .
-
-NotExpr<out Expression outExpr>
- (. UnaryOperatorType uop = UnaryOperatorType.None; .) =
- { "Not" (. uop = UnaryOperatorType.Not; .) }
- EqualityExpr<out outExpr>
- (. if (uop != UnaryOperatorType.None)
- outExpr = new UnaryOperatorExpression(outExpr, uop);
- .)
- .
-
-EqualityExpr<out Expression outExpr>
- (.
- Expression expr;
- BinaryOperatorType op = BinaryOperatorType.None;
- .) =
- RelationalExpr<out outExpr>
- {
- (
- "<>" (. op = BinaryOperatorType.InEquality; .)
- | "=" (. op = BinaryOperatorType.Equality; .)
- | "Like" (. op = BinaryOperatorType.Like; .)
- )
- RelationalExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
- }
- .
-
-RelationalExpr<out Expression outExpr>
- (.
- Expression expr;
- BinaryOperatorType op = BinaryOperatorType.None;
- .) =
- ShiftExpr<out outExpr>
- {
- (
- "<" (. op = BinaryOperatorType.LessThan; .)
- | ">" (. op = BinaryOperatorType.GreaterThan; .)
- | "<=" (. op = BinaryOperatorType.LessThanOrEqual; .)
- | ">=" (. op = BinaryOperatorType.GreaterThanOrEqual; .)
- )
- ShiftExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
- |
- /* 11.5.3 */
- "Is" (. op = BinaryOperatorType.IS; .)
- Expr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
- }
- .
-
-ShiftExpr<out Expression outExpr>
- (.
- Expression expr;
- BinaryOperatorType op = BinaryOperatorType.None;
- .) =
- AdditiveExpr<out outExpr>
- {
- (
- "<<" (. op = BinaryOperatorType.ShiftLeft; .)
- | ">>" (. op = BinaryOperatorType.ShiftRight; .)
- )
- AdditiveExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
- }
- .
-
-AdditiveExpr<out Expression outExpr>
- (.
- Expression expr;
- BinaryOperatorType op = BinaryOperatorType.None;
- .) =
- MultiplicativeExpr<out outExpr>
- {
- (
- "+" (. op = BinaryOperatorType.Add; .)
- | "-" (. op = BinaryOperatorType.Subtract; .)
- | "&" (. op = BinaryOperatorType.Concat; .)
- )
- MultiplicativeExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
- }
- .
-
-MultiplicativeExpr<out Expression outExpr>
- (.
- Expression expr;
- BinaryOperatorType op = BinaryOperatorType.None;
- .) =
- UnaryExpr<out outExpr>
- {
- (
- "*" (. op = BinaryOperatorType.Multiply; .)
- | "/" (. op = BinaryOperatorType.Divide; .)
- | "\\" (. op = BinaryOperatorType.DivideInteger; .)
- | "Mod" (. op = BinaryOperatorType.Modulus; .)
- | "^" (. op = BinaryOperatorType.Power; .)
- )
- UnaryExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
- }
- .
-
-ObjectCreateExpression<out Expression oce>
- (.
- TypeReference type = null;
- Expression initializer = null;
- ArrayList arguments = null;
- oce = null;
- .) =
- "New" ArrayTypeName<out type>
- ["("
- [ ArgumentList<out arguments> ]
- ")"
- ]
- [
- ArrayInitializer<out initializer>
- ]
- (.
- if(initializer == null) {
- oce = new ObjectCreateExpression(type, arguments);
- } else {
- ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer as ArrayInitializerExpression);
- ace.Parameters = arguments;
- oce = ace;
- }
- .)
- .
-
-/* 9.3.2 */
-ArgumentList<out ArrayList arguments>
- (.
- arguments = new ArrayList();
- Expression expr = null;
- .) =
- [
- Argument<out expr> (. arguments.Add(expr); .)
- {
- ","
- Argument<out expr> (. arguments.Add(expr); .)
- }
- ]
- .
-
-/* Spec, 11.8 */
-Argument<out Expression argumentexpr>
- (.
- Expression expr;
- argumentexpr = null;
- string name;
- .) =
- IF(IsNamedAssign()) Identifier (. name = t.val; .) ":" "=" Expr<out expr>
- (.
- argumentexpr = new NamedArgumentExpression(name, expr);
- .)
- |
- Expr<out argumentexpr>
- .
-
-/* 7.1. */
-TypeName<out TypeReference typeref>
- (.
- ArrayList rank = null;
- .) =
- NonArrayTypeName<out typeref>
- ArrayTypeModifiers<out rank>
- (.
- typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
- .)
- .
-
-
-ArrayTypeName<out TypeReference typeref>
- (.
- ArrayList rank = null;
- .) =
- NonArrayTypeName<out typeref>
- ArrayInitializationModifiers<out rank>
- (.
- typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
- .)
- .
-
-/* 7.1 */
-NonArrayTypeName<out TypeReference typeref>
- (.
- string name;
- typeref = null;
- .) =
- Qualident<out name> (. typeref = new TypeReference(name); .)
- | "Object" (. typeref = new TypeReference("System.Object"); .)
- | PrimitiveTypeName<out name> (. typeref = new TypeReference(name); .)
- .
-
-ArrayInitializationModifiers<out ArrayList arrayModifiers>
- (.
- arrayModifiers = new ArrayList();
- ArrayList dim = new ArrayList();
- .) =
- {
- IF (IsDims()) "("
- [ InitializationRankList <out dim>]
- (.
- arrayModifiers.Add(dim);
- .)
- ")"
- }
- (.
- if(arrayModifiers.Count == 0) {
- arrayModifiers = null;
- }
- .)
- .
-
-/* 7.9 */
-ArrayTypeModifiers<out ArrayList arrayModifiers>
- (.
- arrayModifiers = new ArrayList();
- int i = 0;
- .) =
- { IF (IsRank())
- "("
- [ RankList <out i>]
- (.
- arrayModifiers.Add(i);
- .)
- ")"
- }
- (.
- if(arrayModifiers.Count == 0) {
- arrayModifiers = null;
- }
- .)
- .
-
-/* 7.9 */
-RankList<out int i>
- (. i = 0; .) =
- { "," (. ++i; .) }
- .
-
-GlobalAttributeSection =
- (. Point startPos = t.Location; .)
- "<" ("Assembly" | "Module")
- (.
- string attributeTarget = t.val.ToLower();
- ArrayList attributes = new ArrayList();
- ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
- .)
- ":" Attribute<out attribute> (. attributes.Add(attribute); .)
- { IF (NotFinalComma()) "," Attribute<out attribute> (. attributes.Add(attribute); .)}
- [ "," ]
- ">"
- EndOfStmt
- (.
- AttributeSection section = new AttributeSection(attributeTarget, attributes);
- section.StartLocation = startPos;
- section.EndLocation = t.EndLocation;
- compilationUnit.AddChild(section);
- .)
- .
-
-/* Spec, 5. */
-Attribute<out ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute>
- (. string qualident; .) =
- Qualident<out qualident>
- (.
- ArrayList positional = new ArrayList();
- ArrayList named = new ArrayList();
- string name = qualident;
- .)
- [ AttributeArguments<ref positional, ref named> ]
- (.
- attribute = new ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute(name, positional, named);
- .)
- .
-
-/* Spec, 5.2.2 */
-AttributeArguments<ref ArrayList positional, ref ArrayList named>
- (.
- bool nameFound = false;
- string name = "";
- Expression expr;
- .) =
- "("
- [
- IF (IsNotClosingParenthesis()) (
- [
- IF (IsNamedAssign()) (. nameFound = true; .)
- IdentifierOrKeyword<out name>
- [":"] "="
- ] Expr<out expr>
- (.
- if(name == "") positional.Add(expr);
- else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
- .)
- {
- ","
- (
- IF (IsNamedAssign()) (. nameFound = true; .)
- IdentifierOrKeyword<out name>
- [ ":" ] "="
- | (. if (nameFound) Error("no positional argument after named argument"); .)
- ) Expr<out expr> (. if(name == "") positional.Add(expr);
- else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
- .)
- }
- )
- ]
- ")"
- .
-
-/* Spec, 5. */
-AttributeSection<out AttributeSection section>
- (.
- string attributeTarget = "";
- ArrayList attributes = new ArrayList();
- ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
-
- .) =
- "<" (. Point startPos = t.Location; .)
- [ IF (IsLocalAttrTarget())
- ( "Event" (. attributeTarget = "event";.)
- | "Return" (. attributeTarget = "return";.)
- | Identifier
- (.
- string val = t.val.ToLower();
- if (val != "field" || val != "method" ||
- val != "module" || val != "param" ||
- val != "property" || val != "type")
- Error("attribute target specifier (event, return, field," +
- "method, module, param, property, or type) expected");
- attributeTarget = t.val;
- .)
- ) ":"
- ]
- Attribute<out attribute> (. attributes.Add(attribute); .)
- { IF (NotFinalComma()) "," Attribute<out attribute> (. attributes.Add(attribute); .) }
- [ "," ]
- ">"
- (.
- section = new AttributeSection(attributeTarget, attributes);
- section.StartLocation = startPos;
- section.EndLocation = t.EndLocation;
- .)
- .
-
-/* 9.2.5 */
-FormalParameterList<out ArrayList parameter>
- (.
- parameter = new ArrayList();
- ParameterDeclarationExpression p;
- AttributeSection section;
- ArrayList attributes = new ArrayList();
- .) =
- { AttributeSection<out section> (.attributes.Add(section); .) }
- (
- FormalParameter<out p>
- (.
- bool paramsFound = false;
- p.Attributes = attributes;
- parameter.Add(p);
- .)
- {
- "," (. attributes = new ArrayList(); if (paramsFound) Error("params array must be at end of parameter list"); .)
- { AttributeSection<out section> (.attributes.Add(section); .) }
- (
- FormalParameter <out p> (. p.Attributes = attributes; parameter.Add(p); .)
- )
- }
- )
- .
-/* 9.2.5 */
-FormalParameter<out ParameterDeclarationExpression p>
- (.
- TypeReference type = null;
- ParamModifiers mod = new ParamModifiers(this);
- Expression expr = null;
- p = null;
- ArrayList arrayModifiers = null;
- .) =
- { ParameterModifier<mod> }
- Identifier (. string parameterName = t.val; .)
- [ IF(IsRank()) ArrayTypeModifiers<out arrayModifiers> ]
- [ "As" TypeName<out type> ]
- (.
- if(type != null) {
- if (arrayModifiers != null) {
- if (type.RankSpecifier != null) {
- Error("array rank only allowed one time");
- } else {
- type.RankSpecifier = arrayModifiers;
- }
- }
- } else {
- type = new TypeReference("System.Object", arrayModifiers);
- }
- .)
- [ "=" Expr<out expr> ]
- (.
- mod.Check();
- p = new ParameterDeclarationExpression(type, parameterName, mod, expr);
- .)
- .
-
-/* 10.1 */
-Block<out Statement stmt>
- =
- (.
- BlockStatement blockStmt = new BlockStatement();
- blockStmt.StartLocation = t.Location;
- compilationUnit.BlockStart(blockStmt);
- .)
- { Statement EndOfStmt |
- IF (IsEndStmtAhead()) "End" EndOfStmt (. compilationUnit.AddChild(new EndStatement()); .)
- }
- (.
- stmt = blockStmt;
- blockStmt.EndLocation = t.EndLocation;
- compilationUnit.BlockEnd();
- .)
- .
-
-Statement
- (.
- Statement stmt;
- string label = String.Empty;
-
- .) =
- IF (IsLabel()) LabelName<out label>
- (.
- labelStatement = new LabelStatement(t.val);
- compilationUnit.AddChild(labelStatement);
- .)
- ":" [ (. isLabel = true; .) Statement ]
- | EmbeddedStatement<out stmt> (. updateLabelStatement(stmt); .)
- | LocalDeclarationStatement<out stmt> (. updateLabelStatement(stmt); .)
- .
-
-/* 10.2 */
-LocalDeclarationStatement<out Statement statement>
- (.
- Modifiers m = new Modifiers(this);
- ArrayList vars = new ArrayList();
- LocalVariableDeclaration localVariableDeclaration;
- bool dimfound = false;
- .) =
- /* this differs from the spec: dim static x compiles with vbc. */
- {
- "Const" (. m.Add(Modifier.Constant); .)
- | "Static" (. m.Add(Modifier.Static); .)
- | "Dim" (. dimfound = true; .)
- }
- (.
- if(dimfound && (m.Modifier & Modifier.Constant) != 0) {
- Error("Dim is not allowed on constants.");
- }
-
- if(m.isNone && dimfound == false) {
- Error("Const, Dim or Static expected");
- }
-
- localVariableDeclaration = new LocalVariableDeclaration(m.Modifier);
- localVariableDeclaration.StartLocation = t.Location;
- .)
- VariableDeclarator<vars>
- { "," VariableDeclarator<vars> }
- (.
- localVariableDeclaration.Variables = vars;
- statement = localVariableDeclaration;
- .)
- .
-
-EmbeddedStatement<out Statement statement>
- (.
- Statement embeddedStatement = null;
- statement = null;
- Expression expr = null;
- string name = String.Empty;
- ArrayList p = null;
- .) =
- "Exit" (. ExitType exitType = ExitType.None; .)
- (
- "Sub" (. exitType = ExitType.Sub; .)
- |
- "Function" (. exitType = ExitType.Function; .)
- |
- "Property" (. exitType = ExitType.Property; .)
- |
- "Do" (. exitType = ExitType.Do; .)
- |
- "For" (. exitType = ExitType.For; .)
- |
- "Try" (. exitType = ExitType.Try; .)
- |
- "While" (. exitType = ExitType.While; .)
- |
- "Select" (. exitType = ExitType.Select; .)
- )
- (. statement = new ExitStatement(exitType); .)
- | TryStatement<out statement>
- | /* 10.10.1.3 */
- "Throw" [ Expr<out expr> ] (. statement = new ThrowStatement(expr); .)
- | /* 10.11 */
- "Return" [ Expr<out expr> ] (. statement = new ReturnStatement(expr); .)
- | /* 10.4 */
- "SyncLock" Expr<out expr> EndOfStmt Block<out embeddedStatement>
- "End" "SyncLock" (. statement = new LockStatement(expr, embeddedStatement); .)
- | /* 10.5.1 */
- "RaiseEvent" Identifier (. name = t.val; .)
- [ "(" [ ArgumentList<out p> ] ")" ]
- (. statement = new RaiseEventStatement(name, p); .)
- | /* 10.3 */
- WithStatement<out statement>
- | /* 10.5.2 */
- "AddHandler" (. Expression handlerExpr = null; .)
- Expr<out expr> "," Expr<out handlerExpr>
- (.
- statement = new AddHandlerStatement(expr, handlerExpr);
- .)
- | /* 10.5.2 */
- "RemoveHandler" (. Expression handlerExpr = null; .)
- Expr<out expr> "," Expr<out handlerExpr>
- (.
- statement = new RemoveHandlerStatement(expr, handlerExpr);
- .)
- | /* 10.9.1 */
- "While" Expr<out expr> EndOfStmt
- Block<out embeddedStatement> "End" "While"
- (.
- statement = new WhileStatement(expr, embeddedStatement);
- .)
- | /* 10.9.1 */
- "Do"
- (.
- ConditionType conditionType = ConditionType.None;
- .)
- (
- WhileOrUntil<out conditionType> Expr<out expr> EndOfStmt
- Block<out embeddedStatement>
- "Loop"
- (.
- statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.Start);
- .)
- |
- EndOfStmt
- Block<out embeddedStatement>
- "Loop" [WhileOrUntil<out conditionType> Expr<out expr>]
- (.
- statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End);
- .)
- )
- | "For"
- (.
- Expression group = null;
- LoopControlVariableExpression loopControlExpr = null;
- .)
- (
- /* 10.9.3 */
- "Each" LoopControlVariable<out loopControlExpr>
- "In" Expr<out group> EndOfStmt
- Block<out embeddedStatement>
- "Next" [ Expr<out expr> ]
- (.
- statement = new ForeachStatement(loopControlExpr, group, embeddedStatement, expr);
- .)
- | /* 10.9.2 */
- (.
- Expression start = null;
- Expression end = null;
- Expression step = null;
- Expression nextExpr = null;
- ArrayList nextExpressions = null;
- .)
- LoopControlVariable<out loopControlExpr>
- "=" Expr<out start> "To" Expr<out end> [ "Step" Expr<out step> ]
- EndOfStmt Block<out embeddedStatement>
- "Next"
- [
- Expr<out nextExpr> (. nextExpressions = new ArrayList(); nextExpressions.Add(nextExpr); .)
- { "," Expr<out nextExpr> (. nextExpressions.Add(nextExpr); .) }
- ]
- (.
- statement = new ForStatement(loopControlExpr, start, end, step, embeddedStatement, nextExpressions);
- .)
- )
- | /* 10.10.2.1 */
- "Error" Expr<out expr> (. statement = new ErrorStatement(expr); .)
- | /* 10.12.1 */
- "ReDim" (. Expression clause = null; .) [ "Preserve" ]
- Expr<out clause>
- (.
- ArrayList clauses = new ArrayList();
- clauses.Add(clause);
- /*ReDimStatement reDimStatement = new ReDimStatement(clauses);*/
- .)
- { "," Expr<out clause> (. clauses.Add(clause); .) }
- | /* 10.12.2 */
- "Erase"
- Expr<out expr>
- (.
- ArrayList arrays = new ArrayList();
- arrays.Add(expr);
- EraseStatement eraseStatement = new EraseStatement(arrays);
-
- .)
- { "," Expr<out expr> (. arrays.Add(expr); .) }
- (. statement = eraseStatement; .)
- | /* 10.11 */
- "Stop" (. statement = new StopStatement(); .)
- | /* 10.8.1 */
- "If" Expr<out expr> [ "Then" ]
- (
- IF (IsEndStmtAhead()) "End" (. statement = new IfStatement(expr, new EndStatement()); .)
- |
- /* multiline if statement */
- EndOfStmt Block<out embeddedStatement>
- (.
- ArrayList elseIfSections = new ArrayList();
- IfStatement ifStatement = new IfStatement(expr, embeddedStatement);
- .)
- {
- (
- IF(IsElseIf()) "Else" "If"
- | "ElseIf"
- )
- (. Expression condition = null; Statement block = null; .)
- Expr<out condition> [ "Then"] EndOfStmt
- Block<out block>
- (.
- ElseIfSection elseIfSection = new ElseIfSection(condition, block);
- elseIfSections.Add(elseIfSection);
- .)
- }
- [
- "Else" EndOfStmt
- Block<out embeddedStatement>
- (.
- ifStatement.EmbeddedElseStatement = embeddedStatement;
- .)
- ] "End" "If"
- (.
- ifStatement.ElseIfStatements = elseIfSections;
- statement = ifStatement;
- .)
- | /* singleline if statement */
- EmbeddedStatement<out embeddedStatement>
- (.
- SimpleIfStatement ifStatement = new SimpleIfStatement(expr);
- ArrayList statements = new ArrayList();
- statements.Add(embeddedStatement);
- ifStatement.Statements = statements;
- .)
- { ":" EmbeddedStatement<out embeddedStatement> (. statements.Add(embeddedStatement); .) }
- [
- "Else" [ EmbeddedStatement<out embeddedStatement> ]
- (.
- ArrayList elseStatements = new ArrayList();
- elseStatements.Add(embeddedStatement);
- ifStatement.ElseStatements = elseStatements;
- .)
- {
- ":" EmbeddedStatement<out embeddedStatement>
- (. elseStatements.Add(embeddedStatement); .)
- }
- ]
- (. statement = ifStatement; .)
- )
- | /* 10.8.2 */
- "Select" [ "Case" ] Expr<out expr> EndOfStmt
- (.
- ArrayList selectSections = new ArrayList();
- Statement block = null;
- .)
- {
- (. ArrayList caseClauses = null; .)
- "Case" CaseClauses<out caseClauses> [ IF(IsNotStatementSeparator()) ":" ] EndOfStmt
- (.
- SelectSection selectSection = new SelectSection();
- selectSection.CaseClauses = caseClauses;
- compilationUnit.BlockStart(selectSection);
- .)
- Block<out block>
- (.
- selectSection.EmbeddedStatement = block;
- compilationUnit.BlockEnd();
- selectSections.Add(selectSection);
- .)
- }
- (. statement = new SelectStatement(expr, selectSections); .)
- "End" "Select"
- | (. OnErrorStatement onErrorStatement = null; .)
- OnErrorStatement<out onErrorStatement> (. statement = onErrorStatement; .)
- | (. GoToStatement goToStatement = null; .)
- GoToStatement<out goToStatement> (. statement = goToStatement; .)
- | (. ResumeStatement resumeStatement = null; .)
- ResumeStatement<out resumeStatement> (. statement = resumeStatement; .)
- |/* Statement expression (invocation and assignment) 10.6.1, 10.6.2, 10.6.3 */
- (.
- Expression val = null;
- AssignmentOperatorType op;
-
- bool mustBeAssignment = la.kind == Tokens.Plus || la.kind == Tokens.Minus ||
- la.kind == Tokens.Not || la.kind == Tokens.Times;
- .)
- UnaryExpr<out expr>
- (
- AssignmentOperator<out op> Expr<out val> (. expr = new AssignmentExpression(expr, op, val); .)
- | (. if (mustBeAssignment) Error("error in assignment."); .)
- )
- (.
- // a field reference expression that stands alone is a
- // invocation expression without parantheses and arguments
- if(expr is FieldReferenceOrInvocationExpression) {
- expr = new InvocationExpression(expr, new ArrayList());
- }
- statement = new StatementExpression(expr);
- .)
- | "Call" UnaryExpr<out expr> (. statement = new StatementExpression(expr); .)
- .
-
-/* 10.9.2 */
-LoopControlVariable<out LoopControlVariableExpression loopExpr>
- (.
- loopExpr = null;
- //Expression expr = null;
- TypeReference type = null;
- ArrayList arrayModifiers = null;
- string name;
- .) =
- Qualident<out name>
- [ IF(IsRank()) ArrayTypeModifiers<out arrayModifiers> ]
- [ "As" TypeName<out type> (. if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } .) ]
- (.
- if(type != null) {
- if(type.RankSpecifier != null && arrayModifiers != null) {
- Error("array rank only allowed one time");
- } else {
- type.RankSpecifier = arrayModifiers;
- }
- } else {
- type = new TypeReference("Integer", arrayModifiers);
- }
- loopExpr = new LoopControlVariableExpression(name, type);
- .)
- .
-
-/* 10.2.2 */
-OnErrorStatement<out OnErrorStatement stmt>
- (.
- stmt = null;
- GoToStatement goToStatement = null;
- .)
- =
- "On" "Error"
- (
- IF(IsNegativeLabelName())"GoTo" "-" LiteralInteger
- (.
- long intLabel = Int64.Parse(t.val);
- if(intLabel != 1) {
- Error("invalid label in on error statement.");
- }
- stmt = new OnErrorStatement(new GoToStatement((intLabel * -1).ToString()));
- .)
- | GoToStatement<out goToStatement>
- (.
- string val = goToStatement.LabelName;
-
- // if value is numeric, make sure that is 0
- try {
- long intLabel = Int64.Parse(val);
- if(intLabel != 0) {
- Error("invalid label in on error statement.");
- }
- } catch {
- }
- stmt = new OnErrorStatement(goToStatement);
- .)
- | "Resume" "Next"
- (.
- stmt = new OnErrorStatement(new ResumeStatement(true));
- .)
- )
- .
-
-/* 10.11 */
-GoToStatement<out GoToStatement goToStatement>
- (.
- string label = String.Empty;
- .)
- =
- "GoTo" LabelName<out label>
- (.
- goToStatement = new GoToStatement(label);
- .)
- .
-
-/* 10.1 */
-LabelName<out string name>
- (.
- name = String.Empty;
- .) =
- Identifier (. name = t.val; .)
- | LiteralInteger (. name = t.val; .)
- .
-
-/* 10.10.2.3 */
-ResumeStatement<out ResumeStatement resumeStatement>
- (.
- resumeStatement = null;
- string label = String.Empty;
- .) =
- IF(IsResumeNext())
- "Resume" "Next" (. resumeStatement = new ResumeStatement(true); .)
- | "Resume" [ LabelName<out label> ] (. resumeStatement = new ResumeStatement(label); .)
- .
-
-/* 18.8.2 */
-CaseClauses<out ArrayList caseClauses>
- (.
- caseClauses = null;
- CaseClause caseClause = null;
- .) =
- CaseClause<out caseClause>
- (.
- caseClauses = new ArrayList();
- caseClauses.Add(caseClause);
- .)
- { "," CaseClause<out caseClause> (. caseClauses.Add(caseClause); .) }
- .
-
-/* 19.8.2 */
-CaseClause<out CaseClause caseClause>
- (.
- Expression expr = null;
- Expression sexpr = null;
- BinaryOperatorType op = BinaryOperatorType.None;
- caseClause = null;
- .) =
- "Else"
- (. caseClause = new CaseClause(true); .)
- |
- [ "Is" ]
- (
- "<" (. op = BinaryOperatorType.LessThan; .)
- | ">" (. op = BinaryOperatorType.GreaterThan; .)
- | "<=" (. op = BinaryOperatorType.LessThanOrEqual; .)
- | ">=" (. op = BinaryOperatorType.GreaterThanOrEqual; .)
- | "=" (. op = BinaryOperatorType.Equality; .)
- | "<>" (. op = BinaryOperatorType.InEquality; .)
- )
- Expr<out expr>
- (.
- caseClause = new CaseClause(op, expr);
- .)
- | Expr<out expr> [ "To" Expr<out sexpr> ]
- (.
- caseClause = new CaseClause(expr, sexpr);
- .)
- .
-
-/* 10.9.1 */
-WhileOrUntil<out ConditionType conditionType>
- (. conditionType = ConditionType.None; .) =
- "While" (. conditionType = ConditionType.While; .)
- | "Until" (. conditionType = ConditionType.Until; .)
- .
-
-/* 10.3 */
-WithStatement<out Statement withStatement>
- (.
- Statement blockStmt = null;
- Expression expr = null;
- .) =
- "With" (. Point start = t.Location; .)
- Expr<out expr> EndOfStmt
- (.
- withStatement = new WithStatement(expr);
- withStatement.StartLocation = start;
- withStatements.Push(withStatement);
- .)
- Block<out blockStmt>
- (.
- ((WithStatement)withStatement).Body = (BlockStatement)blockStmt;
- withStatements.Pop();
- .)
- "End" "With"
- (. withStatement.EndLocation = t.Location; .)
- .
-
-/* 10.10.1 */
-TryStatement<out Statement tryStatement>
- (.
- Statement blockStmt = null, finallyStmt = null;
- ArrayList catchClauses = null;
- .) =
- "Try" EndOfStmt
- Block<out blockStmt>
- (
- CatchClauses<out catchClauses>
- [ "Finally" EndOfStmt Block<out finallyStmt> ]
- | "Finally" EndOfStmt Block<out finallyStmt>
- )
- "End" "Try"
- (.
- tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
- .)
- .
-
-/* 10.10.1.2 */
-CatchClauses<out ArrayList catchClauses>
- (.
- catchClauses = new ArrayList();
- TypeReference type = null;
- Statement blockStmt = null;
- Expression expr = null;
- string name = String.Empty;
- .) =
- {
- "Catch"
- [ Identifier (. name = t.val; .) ["As" TypeName<out type>] ]
- [ "When" Expr<out expr> ]
- EndOfStmt
- Block<out blockStmt>
- (. catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); .)
- }
- .
-
-/* 4.7 */
-Qualident<out string qualident>
- (. string name = String.Empty; .) =
- Identifier (. StringBuilder qualidentBuilder = new StringBuilder(t.val); .)
- {
- "." IdentifierOrKeyword<out name> (. qualidentBuilder.Append('.');
- qualidentBuilder.Append(name);
- .)
- }
- (. qualident = qualidentBuilder.ToString(); .)
- .
-
-/* This production handles pseudo keywords that are needed in the grammar */
-Identifier =
- ident
- | "Text"
- | "Binary"
- | "Compare"
- .
-
-/* 2.2 */
-IdentifierOrKeyword<out string name>
- (.
- name = String.Empty;
- .) =
- Identifier (. name = t.val; .)
- | "AddHandler" (. name = t.val; .)
- | "AddressOf" (. name = t.val; .)
- | "Alias" (. name = t.val; .)
- | "And" (. name = t.val; .)
- | "AndAlso" (. name = t.val; .)
- | "Ansi" (. name = t.val; .)
- | "As" (. name = t.val; .)
- | "Assembly" (. name = t.val; .)
- | "Auto" (. name = t.val; .)
- | "Boolean" (. name = t.val; .)
- | "ByRef" (. name = t.val; .)
- | "Byte" (. name = t.val; .)
- | "ByVal" (. name = t.val; .)
- | "Call" (. name = t.val; .)
- | "Case" (. name = t.val; .)
- | "Catch" (. name = t.val; .)
- | "CBool" (. name = t.val; .)
- | "CByte" (. name = t.val; .)
- | "CChar" (. name = t.val; .)
- | "CDate" (. name = t.val; .)
- | "CDbl" (. name = t.val; .)
- | "CDec" (. name = t.val; .)
- | "Char" (. name = t.val; .)
- | "CInt" (. name = t.val; .)
- | "Class" (. name = t.val; .)
- | "CLng" (. name = t.val; .)
- | "CObj" (. name = t.val; .)
- | "Const" (. name = t.val; .)
- | "CShort" (. name = t.val; .)
- | "CSng" (. name = t.val; .)
- | "CStr" (. name = t.val; .)
- | "CType" (. name = t.val; .)
- | "Date" (. name = t.val; .)
- | "Decimal" (. name = t.val; .)
- | "Declare" (. name = t.val; .)
- | "Default" (. name = t.val; .)
- | "Delegate" (. name = t.val; .)
- | "Dim" (. name = t.val; .)
- | "DirectCast" (. name = t.val; .)
- | "Do" (. name = t.val; .)
- | "Double" (. name = t.val; .)
- | "Each" (. name = t.val; .)
- | "Else" (. name = t.val; .)
- | "ElseIf" (. name = t.val; .)
- | "End" (. name = t.val; .)
- | "EndIf" (. name = t.val; .)
- | "Enum" (. name = t.val; .)
- | "Erase" (. name = t.val; .)
- | "Error" (. name = t.val; .)
- | "Event" (. name = t.val; .)
- | "Exit" (. name = t.val; .)
- | "False" (. name = t.val; .)
- | "Finally" (. name = t.val; .)
- | "For" (. name = t.val; .)
- | "Friend" (. name = t.val; .)
- | "Function" (. name = t.val; .)
- | "Get" (. name = t.val; .)
- | "GetType" (. name = t.val; .)
- | "GoSub" (. name = t.val; .)
- | "GoTo" (. name = t.val; .)
- | "Handles" (. name = t.val; .)
- | "If" (. name = t.val; .)
- | "Implements" (. name = t.val; .)
- | "Imports" (. name = t.val; .)
- | "In" (. name = t.val; .)
- | "Inherits" (. name = t.val; .)
- | "Integer" (. name = t.val; .)
- | "Interface" (. name = t.val; .)
- | "Is" (. name = t.val; .)
- | "Let" (. name = t.val; .)
- | "Lib" (. name = t.val; .)
- | "Like" (. name = t.val; .)
- | "Long" (. name = t.val; .)
- | "Loop" (. name = t.val; .)
- | "Me" (. name = t.val; .)
- | "Mod" (. name = t.val; .)
- | "Module" (. name = t.val; .)
- | "MustInherit" (. name = t.val; .)
- | "MustOverride" (. name = t.val; .)
- | "MyBase" (. name = t.val; .)
- | "MyClass" (. name = t.val; .)
- | "Namespace" (. name = t.val; .)
- | "New" (. name = t.val; .)
- | "Next" (. name = t.val; .)
- | "Not" (. name = t.val; .)
- | "Nothing" (. name = t.val; .)
- | "NotInheritable" (. name = t.val; .)
- | "NotOverridable" (. name = t.val; .)
- | "Object" (. name = t.val; .)
- | "On" (. name = t.val; .)
- | "Option" (. name = t.val; .)
- | "Optional" (. name = t.val; .)
- | "Or" (. name = t.val; .)
- | "OrElse" (. name = t.val; .)
- | "Overloads" (. name = t.val; .)
- | "Overridable" (. name = t.val; .)
- | "Overrides" (. name = t.val; .)
- | "ParamArray" (. name = t.val; .)
- | "Preserve" (. name = t.val; .)
- | "Private" (. name = t.val; .)
- | "Property" (. name = t.val; .)
- | "Protected" (. name = t.val; .)
- | "Public" (. name = t.val; .)
- | "RaiseEvent" (. name = t.val; .)
- | "ReadOnly" (. name = t.val; .)
- | "ReDim" (. name = t.val; .)
- | "RemoveHandler" (. name = t.val; .)
- | "Resume" (. name = t.val; .)
- | "Return" (. name = t.val; .)
- | "Select" (. name = t.val; .)
- | "Set" (. name = t.val; .)
- | "Shadows" (. name = t.val; .)
- | "Shared" (. name = t.val; .)
- | "Short" (. name = t.val; .)
- | "Single" (. name = t.val; .)
- | "Static" (. name = t.val; .)
- | "Step" (. name = t.val; .)
- | "Stop" (. name = t.val; .)
- | "String" (. name = t.val; .)
- | "Structure" (. name = t.val; .)
- | "Sub" (. name = t.val; .)
- | "SyncLock" (. name = t.val; .)
- | "Then" (. name = t.val; .)
- | "Throw" (. name = t.val; .)
- | "To" (. name = t.val; .)
- | "True" (. name = t.val; .)
- | "Try" (. name = t.val; .)
- | "TypeOf" (. name = t.val; .)
- | "Unicode" (. name = t.val; .)
- | "Until" (. name = t.val; .)
- | "Variant" (. name = t.val; .)
- | "Wend" (. name = t.val; .)
- | "When" (. name = t.val; .)
- | "While" (. name = t.val; .)
- | "With" (. name = t.val; .)
- | "WithEvents" (. name = t.val; .)
- | "WriteOnly" (. name = t.val; .)
- | "Xor" (. name = t.val; .)
- .
-
-/* 7.3 */
-PrimitiveTypeName<out string type>
- (. type = String.Empty; .) =
- "Boolean" (. type = "Boolean"; .)
- | "Date" (. type = "Date"; .)
- | "Char" (. type = "Char"; .)
- | "String" (. type = "String"; .)
- | "Decimal" (. type = "Decimal"; .)
- | "Byte" (. type = "Byte"; .)
- | "Short" (. type = "Short"; .)
- | "Integer" (. type = "Integer"; .)
- | "Long" (. type = "Long"; .)
- | "Single" (. type = "Single"; .)
- | "Double" (. type = "Double"; .)
- .
-
-ParameterModifier<ParamModifiers m>
- = "ByVal" (. m.Add(ParamModifier.ByVal); .)
- | "ByRef" (. m.Add(ParamModifier.ByRef); .)
- | "Optional" (. m.Add(ParamModifier.Optional); .)
- | "ParamArray" (. m.Add(ParamModifier.ParamArray); .)
- .
-
-TypeModifier<Modifiers m>
- = "Public" (. m.Add(Modifier.Public); .)
- | "Protected" (. m.Add(Modifier.Protected); .)
- | "Friend" (. m.Add(Modifier.Friend); .)
- | "Private" (. m.Add(Modifier.Private); .)
- | "Shared" (. m.Add(Modifier.Shared); .)
- | "Shadows" (. m.Add(Modifier.Shadows); .)
- | "MustInherit" (. m.Add(Modifier.MustInherit); .)
- | "NotInheritable" (. m.Add(Modifier.NotInheritable); .)
- .
-
-MemberModifier<Modifiers m> =
- "MustInherit" (.m.Add(Modifier.MustInherit);.)
- |"Default" (.m.Add(Modifier.Default);.)
- |"Friend" (.m.Add(Modifier.Friend);.)
- |"Shadows" (.m.Add(Modifier.Shadows);.)
- |"Overrides" (.m.Add(Modifier.Overrides);.)
- |"MustOverride" (.m.Add(Modifier.MustOverride);.)
- |"Private" (.m.Add(Modifier.Private);.)
- |"Protected" (.m.Add(Modifier.Protected);.)
- |"Public" (.m.Add(Modifier.Public);.)
- |"NotInheritable" (.m.Add(Modifier.NotInheritable);.)
- |"NotOverridable" (.m.Add(Modifier.NotOverridable);.)
- |"Shared" (.m.Add(Modifier.Shared);.)
- |"Overridable" (.m.Add(Modifier.Overridable);.)
- |"Overloads" (.m.Add(Modifier.Overloads);.)
- | "ReadOnly" (.m.Add(Modifier.ReadOnly);.)
- | "WriteOnly" (.m.Add(Modifier.WriteOnly);.)
- | "WithEvents" (.m.Add(Modifier.WithEvents);.)
- | "Dim" (.m.Add(Modifier.Dim);.)
- .
-
-END VBNET.
+using System.Drawing;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Text;
+using ICSharpCode.SharpRefactory.Parser.AST.VB;
+using ICSharpCode.SharpRefactory.Parser.VB;
+
+COMPILER VBNET
+
+private string assemblyName = null;
+public CompilationUnit compilationUnit;
+private ArrayList importedNamespaces = null;
+private Stack withStatements;
+private bool isLabel = false;
+private LabelStatement labelStatement = null;
+
+public string ContainingAssembly
+{
+ set { assemblyName = value; }
+}
+
+Token t
+{
+ get {
+ return lexer.Token;
+ }
+}
+Token la
+{
+ get {
+ return lexer.LookAhead;
+ }
+}
+
+void updateLabelStatement(Statement stmt)
+{
+ if(isLabel) {
+ labelStatement.EmbeddedStatement = stmt;
+ isLabel = false;
+ } else {
+ compilationUnit.AddChild(stmt);
+ }
+}
+
+/* Return the n-th token after the current lookahead token */
+void StartPeek()
+{
+ lexer.StartPeek();
+}
+
+Token Peek()
+{
+ return lexer.Peek();
+}
+
+Token Peek (int n)
+{
+ lexer.StartPeek();
+ Token x = la;
+ while (n > 0) {
+ x = lexer.Peek();
+ n--;
+ }
+ return x;
+}
+
+public void Error(string s)
+{
+ if (errDist >= minErrDist) {
+ errors.Error(la.line, la.col, s);
+ }
+ errDist = 0;
+}
+
+public Expression ParseExpression(Lexer lexer)
+{
+ this.errors = lexer.Errors;
+ this.lexer = lexer;
+ errors.SynErr = new ErrorCodeProc(SynErr);
+ lexer.NextToken();
+ Expression expr;
+ Expr(out expr);
+ return expr;
+}
+
+bool IsEndStmtAhead()
+{
+ int peek = Peek(1).kind;
+ return la.kind == Tokens.End && (peek == Tokens.EOL || peek == Tokens.Colon);
+}
+
+bool IsNotClosingParenthesis() {
+ return la.kind != Tokens.CloseParenthesis;
+}
+
+/*
+ True, if ident is followed by "="
+*/
+bool IdentAndAsgn () {
+ if(la.kind == Tokens.Identifier) {
+ if(Peek(1).kind == Tokens.Assign) return true;
+ if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
+ }
+ return false;
+}
+
+/*
+ True, if ident is followed by "=" or by ":" and "="
+*/
+bool IsNamedAssign() {
+// if(Peek(1).kind == Tokens.Assign) return true; // removed: not in the lang spec
+ if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
+ return false;
+}
+
+bool IsObjectCreation() {
+ return la.kind == Tokens.As && Peek(1).kind == Tokens.New;
+}
+
+/*
+ True, if "<" is followed by the ident "assembly" or "module"
+*/
+bool IsGlobalAttrTarget () {
+ Token pt = Peek(1);
+ return la.kind == Tokens.LessThan && ( pt.val.ToLower() == "assembly" || pt.val.ToLower() == "module");
+}
+
+/*
+ True if the next token is a "(" and is followed by "," or ")"
+*/
+bool IsRank()
+{
+ int peek = Peek(1).kind;
+ return la.kind == Tokens.OpenParenthesis
+ && (peek == Tokens.Comma || peek == Tokens.CloseParenthesis);
+}
+
+bool IsDims()
+{
+ int peek = Peek(1).kind;
+ int peek_n = Peek(2).kind;
+ return la.kind == Tokens.OpenParenthesis
+ && (peek == Tokens.LiteralInteger && peek_n == Tokens.CloseParenthesis);
+}
+
+bool IsSize()
+{
+ return la.kind == Tokens.OpenParenthesis;
+}
+
+/*
+ True, if the comma is not a trailing one,
+ like the last one in: a, b, c,
+*/
+bool NotFinalComma() {
+ int peek = Peek(1).kind;
+ return la.kind == Tokens.Comma &&
+ peek != Tokens.CloseCurlyBrace && peek != Tokens.CloseSquareBracket;
+}
+
+/*
+ True, if the next token is "Else" and this one
+ if followed by "If"
+*/
+bool IsElseIf()
+{
+ int peek = Peek(1).kind;
+ return la.kind == Tokens.Else && peek == Tokens.If;
+}
+
+/*
+ True if the next token is goto and this one is
+ followed by minus ("-") (this is allowd in in
+ error clauses)
+*/
+bool IsNegativeLabelName()
+{
+ int peek = Peek(1).kind;
+ return la.kind == Tokens.GoTo && peek == Tokens.Minus;
+}
+
+/*
+ True if the next statement is a "Resume next" statement
+*/
+bool IsResumeNext()
+{
+ int peek = Peek(1).kind;
+ return la.kind == Tokens.Resume && peek == Tokens.Next;
+}
+
+/*
+ True, if ident/literal integer is followed by ":"
+*/
+bool IsLabel()
+{
+ return (la.kind == Tokens.Identifier || la.kind == Tokens.LiteralInteger)
+ && Peek(1).kind == Tokens.Colon;
+}
+
+bool IsNotStatementSeparator()
+{
+ return la.kind == Tokens.Colon && Peek(1).kind == Tokens.EOL;
+}
+
+bool IsAssignment ()
+{
+ return IdentAndAsgn();
+}
+
+bool IsMustOverride(Modifiers m)
+{
+ return m.Contains(Modifier.MustOverride);
+}
+
+/*
+ True, if lookahead is a local attribute target specifier,
+ i.e. one of "event", "return", "field", "method",
+ "module", "param", "property", or "type"
+*/
+bool IsLocalAttrTarget() {
+ // TODO
+ return false;
+}
+
+TOKENS
+ /*----- terminal classes -----*/
+ /* EOF is 0 */
+ EOL
+ ident
+ LiteralString
+ LiteralCharacter
+ LiteralInteger
+ LiteralDouble
+ LiteralSingle
+ LiteralDecimal
+ LiteralDate
+
+ /*----- special character -----*/
+ "."
+ "="
+ ","
+ ":"
+ "+"
+ "-"
+ "*"
+ "/"
+ "\\"
+ "&"
+ "^"
+
+ "{"
+ "}"
+
+ "["
+ "]"
+
+ "("
+ ")"
+
+ ">"
+ "<"
+
+ "<>"
+ ">="
+ "<="
+
+ "<<"
+ ">>"
+
+ "+="
+ "^="
+ "-="
+ "*="
+ "/="
+ "\\="
+ "<<="
+ ">>="
+ "&="
+
+ /*----- VB.NET keywords -----*/
+ "AddHandler"
+ "AddressOf"
+ "Alias"
+ "And"
+ "AndAlso"
+ "Ansi"
+ "As"
+ "Assembly"
+ "Auto"
+ "Binary"
+ "Boolean"
+ "ByRef"
+ "Byte"
+ "ByVal"
+ "Call"
+ "Case"
+ "Catch"
+ "CBool"
+ "CByte"
+ "CChar"
+ "CDate"
+ "CDbl"
+ "CDec"
+ "Char"
+ "CInt"
+ "Class"
+ "CLng"
+ "CObj"
+ "Compare"
+ "Const"
+ "CShort"
+ "CSng"
+ "CStr"
+ "CType"
+ "Date"
+ "Decimal"
+ "Declare"
+ "Default"
+ "Delegate"
+ "Dim"
+ "DirectCast"
+ "Do"
+ "Double"
+ "Each"
+ "Else"
+ "ElseIf"
+ "End"
+ "EndIf"
+ "Enum"
+ "Erase"
+ "Error"
+ "Event"
+ "Exit"
+ "Explicit"
+ "False"
+ "Finally"
+ "For"
+ "Friend"
+ "Function"
+ "Get"
+ "GetType"
+ "GoSub"
+ "GoTo"
+ "Handles"
+ "If"
+ "Implements"
+ "Imports"
+ "In"
+ "Inherits"
+ "Integer"
+ "Interface"
+ "Is"
+ "Let"
+ "Lib"
+ "Like"
+ "Long"
+ "Loop"
+ "Me"
+ "Mod"
+ "Module"
+ "MustInherit"
+ "MustOverride"
+ "MyBase"
+ "MyClass"
+ "Namespace"
+ "New"
+ "Next"
+ "Not"
+ "Nothing"
+ "NotInheritable"
+ "NotOverridable"
+ "Object"
+ "Off"
+ "On"
+ "Option"
+ "Optional"
+ "Or"
+ "OrElse"
+ "Overloads"
+ "Overridable"
+ "Override"
+ "Overrides"
+ "ParamArray"
+ "Preserve"
+ "Private"
+ "Property"
+ "Protected"
+ "Public"
+ "RaiseEvent"
+ "ReadOnly"
+ "ReDim"
+ "RemoveHandler"
+ "Resume"
+ "Return"
+ "Select"
+ "Set"
+ "Shadows"
+ "Shared"
+ "Short"
+ "Single"
+ "Static"
+ "Step"
+ "Stop"
+ "Strict"
+ "String"
+ "Structure"
+ "Sub"
+ "SyncLock"
+ "Text"
+ "Then"
+ "Throw"
+ "To"
+ "True"
+ "Try"
+ "TypeOf"
+ "Unicode"
+ "Until"
+ "Variant"
+ "Wend"
+ "When"
+ "While"
+ "With"
+ "WithEvents"
+ "WriteOnly"
+ "Xor"
+
+PRODUCTIONS
+
+VBNET
+ (.
+ compilationUnit = new CompilationUnit();
+ withStatements = new Stack();
+ .) =
+ { EOL }
+ { OptionStmt }
+ { ImportsStmt}
+ { IF (IsGlobalAttrTarget()) GlobalAttributeSection }
+ { NamespaceMemberDecl }
+ EOF
+ .
+
+OptionStmt (. INode node = null; bool val = true; .) =
+ "Option" (. Point startPos = t.Location; .)
+ (
+ "Explicit" [ OptionValue<ref val> ]
+ (. node = new OptionExplicitDeclaration(val); .)
+ |
+ "Strict" [ OptionValue<ref val> ]
+ (. node = new OptionStrictDeclaration(val); .)
+ |
+ "Compare" ( "Binary" (. node = new OptionCompareDeclaration(CompareType.Binary); .)
+ | "Text" (. node = new OptionCompareDeclaration(CompareType.Text); .)
+ )
+ )
+ EndOfStmt
+ (.
+ node.StartLocation = startPos;
+ node.EndLocation = t.Location;
+ compilationUnit.AddChild(node);
+ .)
+ .
+
+OptionValue<ref bool val> =
+ (
+ "On" (. val = true; .)
+ |
+ "Off" (. val = true; .)
+ )
+ .
+
+EndOfStmt =
+ (
+ EOL
+ |
+ ":"
+ )
+ .
+
+ImportsStmt
+ (.
+ ArrayList importClauses = new ArrayList();
+ importedNamespaces = new ArrayList();
+ object importClause;
+ .) =
+ "Imports"
+ (.
+ Point startPos = t.Location;
+ ImportsStatement importsStatement = new ImportsStatement(null);
+ .)
+ ImportClause<out importClause> (. importClauses.Add(importClause); .)
+ {
+ "," ImportClause<out importClause> (. importClauses.Add(importClause); .)
+ }
+ EndOfStmt
+ (.
+ importsStatement.ImportClauses = importClauses;
+ importsStatement.StartLocation = startPos;
+ importsStatement.EndLocation = t.Location;
+ compilationUnit.AddChild(importsStatement);
+ .)
+ .
+
+ImportClause<out object importClause>
+ (.
+ string qualident = null;
+ string aliasident = null;
+ importClause = null;
+ .) =
+ [ IF (IsAssignment()) Identifier (. aliasident = t.val; .) "=" ]
+ Qualident<out qualident>
+ (.
+ if (qualident != null && qualident.Length > 0) {
+ if (aliasident != null) {
+ importClause = new ImportsAliasDeclaration(aliasident, qualident);
+ } else {
+ importedNamespaces.Add(qualident);
+ importClause = new ImportsDeclaration(qualident);
+ }
+ }
+ .)
+ .
+
+/* 6.4.2 */
+NamespaceMemberDecl
+ (.
+ Modifiers m = new Modifiers(this);
+ AttributeSection section;
+ ArrayList attributes = new ArrayList();
+ string qualident;
+ .) =
+ "Namespace"
+ (.
+ Point startPos = t.Location;
+ .)
+ Qualident<out qualident>
+ (.
+ INode node = new NamespaceDeclaration(qualident);
+ node.StartLocation = startPos;
+ compilationUnit.AddChild(node);
+ compilationUnit.BlockStart(node);
+ .)
+ EOL
+ NamespaceBody
+ (.
+ node.EndLocation = t.Location;
+ compilationUnit.BlockEnd();
+ .)
+ |
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ { TypeModifier<m> } NonModuleDeclaration<m, attributes>
+ .
+
+/* 6.4.2 */
+NonModuleDeclaration<Modifiers m, ArrayList attributes>
+ (.
+ string name = String.Empty;
+ ArrayList names = null;
+ .) =
+ (. m.Check(Modifier.Classes); .)
+ /* Spec, 7.5 */
+ "Class"
+ (. TypeDeclaration newType = new TypeDeclaration();
+ compilationUnit.AddChild(newType);
+ compilationUnit.BlockStart(newType);
+ newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ newType.Type = Types.Class;
+ newType.Modifier = m.Modifier;
+ newType.Attributes = attributes;
+ .)
+ Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ EndOfStmt
+ [ ClassBaseType<out name> (. newType.BaseType = name; .) ]
+ { TypeImplementsClause<out names> (. newType.BaseInterfaces = names; .) }
+ ClassBody<newType>
+ (.
+ compilationUnit.BlockEnd();
+ .)
+ | "Module"
+ (.
+ m.Check(Modifier.Modules);
+ TypeDeclaration newType = new TypeDeclaration();
+ newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ compilationUnit.AddChild(newType);
+ compilationUnit.BlockStart(newType);
+ newType.StartLocation = t.Location;
+ newType.Type = Types.Module;
+ newType.Modifier = m.Modifier;
+ newType.Attributes = attributes;
+ .)
+ Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ EOL
+ ModuleBody<newType>
+ (.
+ newType.EndLocation = t.Location;
+ compilationUnit.BlockEnd();
+ .)
+ | "Structure"
+ (.
+ m.Check(Modifier.Structures);
+ TypeDeclaration newType = new TypeDeclaration();
+ compilationUnit.AddChild(newType);
+ compilationUnit.BlockStart(newType);
+ newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ newType.StartLocation = t.Location;
+ newType.Type = Types.Structure;
+ newType.Modifier = m.Modifier;
+ newType.Attributes = attributes;
+ ArrayList baseInterfaces = new ArrayList();
+ .)
+ Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ EOL { TypeImplementsClause<out baseInterfaces> }
+ StructureBody<newType>
+ (.
+ newType.EndLocation = t.Location;
+ compilationUnit.BlockEnd();
+ .)
+ | /* 7.4 */
+ "Enum"
+ (.
+ m.Check(Modifier.Enums);
+ TypeDeclaration newType = new TypeDeclaration();
+ newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ compilationUnit.AddChild(newType);
+ compilationUnit.BlockStart(newType);
+
+ newType.Type = Types.Enum;
+ newType.Modifier = m.Modifier;
+ newType.Attributes = attributes;
+ .)
+ Identifier
+ (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ [ "As" PrimitiveTypeName<out name> (. newType.BaseType = name; .) ]
+ EOL
+ EnumBody<newType>
+ (.
+ newType.EndLocation = t.Location;
+ compilationUnit.BlockEnd();
+ .)
+ | /* 7.8 */
+ "Interface"
+ (.
+ m.Check(Modifier.Interfaces);
+ TypeDeclaration newType = new TypeDeclaration();
+ compilationUnit.AddChild(newType);
+ compilationUnit.BlockStart(newType);
+ newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+
+ newType.Type = Types.Interface;
+ newType.Modifier = m.Modifier;
+ newType.Attributes = attributes;
+ ArrayList baseInterfaces = new ArrayList();
+ .)
+ Identifier (. newType.Name = t.val; newType.StartLocation = t.EndLocation; .)
+ EndOfStmt { InterfaceBase<out baseInterfaces> (. newType.BaseInterfaces = baseInterfaces; .) }
+ InterfaceBody<newType>
+ (.
+ newType.EndLocation = t.Location;
+ compilationUnit.BlockEnd();
+ .)
+ | /* 7.10 */
+ "Delegate"
+ (.
+ m.Check(Modifier.Delegates);
+ DelegateDeclaration delegateDeclr = new DelegateDeclaration();
+ ArrayList p = null;
+ TypeReference type = null;
+ delegateDeclr.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ delegateDeclr.StartLocation = t.Location;
+ delegateDeclr.Modifier = m.Modifier;
+ delegateDeclr.Attributes = attributes;
+ .)
+ (
+ "Sub" Identifier (. delegateDeclr.Name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" (. delegateDeclr.Parameters = p; .) ]
+ |
+ "Function" Identifier (. delegateDeclr.Name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" (. delegateDeclr.Parameters = p; .) ]
+ [ "As" TypeName<out type> (. delegateDeclr.ReturnType = type; .)]
+ )
+ (. delegateDeclr.EndLocation = t.EndLocation; .)
+ EOL
+ (.
+ compilationUnit.AddChild(delegateDeclr);
+ .)
+ .
+
+NamespaceBody =
+ { NamespaceMemberDecl }
+ "End" "Namespace"
+ EOL
+ .
+
+ClassBody<TypeDeclaration newType>
+ (. AttributeSection section; .) =
+ {
+ (.
+ ArrayList attributes = new ArrayList();
+ Modifiers m = new Modifiers(this);
+ .)
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ { MemberModifier<m> }
+ ClassMemberDecl<m, attributes>
+ }
+ "End" "Class" (. newType.EndLocation = t.EndLocation; .)
+ EOL
+ .
+
+StructureBody<TypeDeclaration newType>
+ (. AttributeSection section; .) =
+ {
+ (.
+ ArrayList attributes = new ArrayList();
+ Modifiers m = new Modifiers(this);
+ .)
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ { MemberModifier<m> }
+ StructureMemberDecl<m, attributes>
+ }
+ "End" "Structure" (. newType.EndLocation = t.EndLocation; .)
+ EOL
+ .
+
+/* 7.7.1 */
+ModuleBody<TypeDeclaration newType>
+ (. AttributeSection section; .) =
+ {
+ (.
+ ArrayList attributes = new ArrayList();
+ Modifiers m = new Modifiers(this);
+ .)
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ { MemberModifier<m> }
+ ClassMemberDecl<m, attributes>
+ }
+ "End" "Module" (. newType.EndLocation = t.EndLocation; .)
+ EOL
+ .
+
+EnumBody<TypeDeclaration newType>
+ (. FieldDeclaration f; .) =
+ {
+ EnumMemberDecl<out f> (. compilationUnit.AddChild(f); .)
+ }
+ "End" "Enum" (. newType.EndLocation = t.EndLocation; .)
+ EOL
+ .
+
+InterfaceBody<TypeDeclaration newType> =
+ { InterfaceMemberDecl }
+ "End" "Interface" (. newType.EndLocation = t.EndLocation; .)
+ EOL
+ .
+
+/*
+ The information provided in the spec about
+ interface declarations is wrong
+*/
+InterfaceMemberDecl
+ (.
+ TypeReference type =null;
+ ArrayList p = null;
+ AttributeSection section;
+ Modifiers mod = new Modifiers(this);
+ ArrayList attributes = new ArrayList();
+ /*ArrayList parameters = new ArrayList();*/
+ string name;
+ .) =
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ /* this is different to c#: not only the Shadows modifier is allowed,
+ also member modifiers like overloads etc.
+ */
+ { MemberModifier<mod> }
+ (
+ "Event"
+ (. mod.Check(Modifier.InterfaceEvents); .)
+ Identifier (. name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ [ "As" TypeName<out type> ]
+ EOL
+ (.
+ EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null);
+ ed.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ compilationUnit.AddChild(ed);
+ ed.EndLocation = t.EndLocation;
+ .)
+ |
+ "Sub"
+ (.
+ mod.Check(Modifier.InterfaceMethods);
+ ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+ .)
+ Identifier (. name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ EOL
+ (.
+ MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes);
+ md.Specials["before"] = comments;
+ md.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(md);
+ .)
+ |
+ "Function"
+ (.
+ mod.Check(Modifier.InterfaceMethods);
+ AttributeSection attributeSection = null;
+ .)
+ Identifier (. name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ [ "As" [AttributeSection<out attributeSection> ] TypeName<out type> ]
+ (.
+ if(type == null) {
+ type = new TypeReference("System.Object");
+ }
+ type.Attributes = attributeSection;
+ MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, type, p, attributes);
+ md.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ md.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(md);
+ .)
+ EOL
+ |
+ "Property"
+ (.
+ mod.Check(Modifier.InterfaceProperties);
+ ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+ .)
+ Identifier (. name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ [ "As" TypeName<out type> ]
+ (.
+ if(type == null) {
+ type = new TypeReference("System.Object");
+ }
+ .)
+ EOL
+ (.
+ PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes);
+ pd.Parameters = p;
+ pd.Specials["before"] = comments;
+ pd.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(pd);
+ .)
+ )
+ | /* inner type declarations */
+ NonModuleDeclaration<mod, attributes>
+ .
+
+/* 7.4.1 */
+EnumMemberDecl<out FieldDeclaration f>
+ (.
+ Expression expr = null;
+ ArrayList attributes = new ArrayList();
+ AttributeSection section = null;
+ VariableDeclaration varDecl = null;
+ .) =
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ Identifier
+ (.
+ f = new FieldDeclaration(attributes);
+ varDecl = new VariableDeclaration(t.val);
+ varDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ f.Fields.Add(varDecl);
+ f.StartLocation = t.Location;
+ .)
+ [ "=" Expr<out expr> (. varDecl.Initializer = expr; .) ]
+ EOL
+ .
+
+ClassMemberDecl<Modifiers m, ArrayList attributes> =
+ StructureMemberDecl<m, attributes>
+ .
+
+ClassBaseType<out string name>
+ (.
+ TypeReference type;
+ name = String.Empty;
+ .) =
+ "Inherits"
+ TypeName<out type> (. name = type.Type; .)
+ EndOfStmt
+ .
+
+/* 7.6.1 */
+StructureMemberDecl<Modifiers m, ArrayList attributes>
+ (.
+ TypeReference type = null;
+ ArrayList p = null;
+ Statement stmt = null;
+ ArrayList variableDeclarators = new ArrayList();
+ .)=
+ NonModuleDeclaration<m, attributes>
+ | /* 9.2.1 */
+ "Sub"
+ (.
+ Point startPos = t.Location;
+ ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+ .)
+ (
+ (.
+ string name = String.Empty;
+ MethodDeclaration methodDeclaration;
+ HandlesClause handlesClause = null;
+ ImplementsClause implementsClause = null;
+ .)
+ Identifier
+ (.
+ name = t.val;
+ m.Check(Modifier.Methods);
+ .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ [
+ (
+ ImplementsClause<out implementsClause>
+ |
+ HandlesClause<out handlesClause>
+ )
+ ]
+ (. Point endLocation = t.EndLocation; .)
+ EOL
+ (
+ /* abstract methods without a body */
+ IF(IsMustOverride(m))
+ (.
+ methodDeclaration = new MethodDeclaration(name, m.Modifier, null, p, attributes);
+ methodDeclaration.Specials["before"] = comments;
+ methodDeclaration.StartLocation = startPos;
+ methodDeclaration.EndLocation = endLocation;
+
+ methodDeclaration.HandlesClause = handlesClause;
+ methodDeclaration.ImplementsClause = implementsClause;
+
+ compilationUnit.AddChild(methodDeclaration);
+ .)
+ |
+ (.
+ methodDeclaration = new MethodDeclaration(name, m.Modifier, null, p, attributes);
+ methodDeclaration.Specials["before"] = comments;
+ methodDeclaration.StartLocation = startPos;
+ methodDeclaration.EndLocation = endLocation;
+
+ methodDeclaration.HandlesClause = handlesClause;
+ methodDeclaration.ImplementsClause = implementsClause;
+
+ compilationUnit.AddChild(methodDeclaration);
+ compilationUnit.BlockStart(methodDeclaration);
+ .)
+ Block<out stmt>
+ (.
+ compilationUnit.BlockEnd();
+ methodDeclaration.Body = (BlockStatement)stmt;
+ .)
+ "End" "Sub" (. methodDeclaration.Body.EndLocation = t.EndLocation; .) EOL
+ )
+ /* 9.3 */
+ | "New" [ "(" [ FormalParameterList<out p> ] ")" ]
+ (. m.Check(Modifier.Constructors); .)
+ (. Point constructorEndLocation = t.EndLocation; .)
+ EOL
+ Block<out stmt>
+ "End" "Sub" (. Point endLocation = t.EndLocation; .) EOL
+ (.
+ ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes);
+ cd.StartLocation = startPos;
+ cd.Specials["before"] = comments;
+ cd.EndLocation = constructorEndLocation;
+ cd.Body = (BlockStatement)stmt;
+ cd.Body.EndLocation = endLocation;
+ compilationUnit.AddChild(cd);
+ .)
+ )
+ |
+ /* 9.2.1 */
+ "Function"
+ (.
+ m.Check(Modifier.Methods);
+ string name = String.Empty;
+ Point startPos = t.Location;
+ MethodDeclaration methodDeclaration;
+ HandlesClause handlesClause = null;
+ ImplementsClause implementsClause = null;
+ AttributeSection attributeSection = null;
+ .)
+ Identifier (. name = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ ["As" [AttributeSection<out attributeSection>] TypeName<out type> ]
+ (.
+ if(type == null) {
+ type = new TypeReference("System.Object");
+ }
+ type.Attributes = attributeSection;
+ .)
+ [
+ (
+ ImplementsClause<out implementsClause>
+ |
+ HandlesClause<out handlesClause>
+ )
+ ]
+ EOL
+ (
+ /* abstract methods without a body */
+ IF(IsMustOverride(m))
+ (.
+ methodDeclaration = new MethodDeclaration(name, m.Modifier, type, p, attributes);
+ methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ methodDeclaration.StartLocation = startPos;
+ methodDeclaration.EndLocation = t.EndLocation;
+ methodDeclaration.HandlesClause = handlesClause;
+ methodDeclaration.ImplementsClause = implementsClause;
+ compilationUnit.AddChild(methodDeclaration);
+ .)
+ |
+ (.
+ methodDeclaration = new MethodDeclaration(name, m.Modifier, type, p, attributes);
+ methodDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ methodDeclaration.StartLocation = startPos;
+ methodDeclaration.EndLocation = t.EndLocation;
+
+ methodDeclaration.HandlesClause = handlesClause;
+ methodDeclaration.ImplementsClause = implementsClause;
+
+ compilationUnit.AddChild(methodDeclaration);
+ compilationUnit.BlockStart(methodDeclaration);
+ .)
+ Block<out stmt>
+ (.
+ compilationUnit.BlockEnd();
+ methodDeclaration.Body = (BlockStatement)stmt;
+ .)
+ "End" "Function"
+ (.
+ methodDeclaration.Body.StartLocation = methodDeclaration.EndLocation;
+ methodDeclaration.Body.EndLocation = t.EndLocation;
+ .)
+ EOL
+ )
+ |
+ /* 9.2.2. */
+ "Declare"
+ (.
+ m.Check(Modifier.ExternalMethods);
+ Point startPos = t.Location;
+ CharsetModifier charsetModifer = CharsetModifier.None;
+ string library = String.Empty;
+ string alias = null;
+ string name = String.Empty;
+ .)
+ [Charset<out charsetModifer> ]
+ (
+ "Sub"
+ Identifier (. name = t.val; .)
+ "Lib" LiteralString (. library = t.val; .)
+ ["Alias" LiteralString (. alias = t.val; .)]
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ EOL
+ (.
+ DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer);
+ declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ declareDeclaration.StartLocation = startPos;
+ declareDeclaration.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(declareDeclaration);
+ .)
+ |
+ "Function"
+ Identifier (. name = t.val; .)
+ "Lib" LiteralString (. library = t.val; .)
+ ["Alias" LiteralString (. alias = t.val; .)]
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ ["As" TypeName<out type> ]
+ EOL
+ (.
+ DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer);
+ declareDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ declareDeclaration.StartLocation = startPos;
+ declareDeclaration.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(declareDeclaration);
+ .)
+ )
+ |
+ /* 9. 4 */
+ "Event"
+ (.
+ m.Check(Modifier.Events);
+ Point startPos = t.Location;
+ EventDeclaration eventDeclaration;
+ string name = String.Empty;
+ ImplementsClause implementsClause = null;
+ .)
+ Identifier (. name= t.val; .)
+ (
+ "As" TypeName<out type>
+ |
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ )
+ [ ImplementsClause<out implementsClause> ]
+ (.
+ eventDeclaration = new EventDeclaration(type, m.Modifier, p, attributes, name, implementsClause);
+ eventDeclaration.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ eventDeclaration.StartLocation = startPos;
+ eventDeclaration.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(eventDeclaration);
+ .)
+ EOL
+ | /* 9.6 */
+ (. Point startPos = t.Location; .)
+ (.
+ m.Check(Modifier.Fields);
+ FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
+ ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+ fd.StartLocation = startPos;
+ .)
+ VariableDeclarator<variableDeclarators>
+ (.
+ ((INode)variableDeclarators[0]).Specials["before"] = comments;
+ .)
+ { "," VariableDeclarator<variableDeclarators> }
+ EOL
+ (.
+ fd.EndLocation = t.EndLocation;
+ fd.Fields = variableDeclarators;
+ compilationUnit.AddChild(fd);
+ .)
+ | /* 9.4 */
+ (. m.Check(Modifier.Fields); .)
+ "Const" (. m.Add(Modifier.Constant); .)
+ (.
+ FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
+ fd.StartLocation = t.Location;
+ ArrayList comments = lexer.SpecialTracker.RetreiveComments();
+ ArrayList constantDeclarators = new ArrayList();
+ .)
+ ConstantDeclarator<constantDeclarators>
+ (.
+ ((INode)constantDeclarators[0]).Specials["before"] = comments;
+ .)
+ { "," ConstantDeclarator<constantDeclarators> }
+ (.
+ fd.Fields = constantDeclarators;
+ fd.EndLocation = t.Location;
+ .)
+ EOL
+ (.
+ fd.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(fd);
+ .)
+ | /* 9.7 */
+ "Property"
+ (.
+ m.Check(Modifier.Properties);
+ Point startPos = t.Location;
+ ImplementsClause implementsClause = null;
+ .)
+ Identifier (. string propertyName = t.val; .)
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ [ "As" TypeName<out type> ]
+ (.
+ if(type == null) {
+ type = new TypeReference("System.Object");
+ }
+ .)
+ [ ImplementsClause<out implementsClause> ]
+ EOL
+ (
+ /* abstract properties without a body */
+ IF(IsMustOverride(m))
+ (.
+ PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
+ pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ pDecl.StartLocation = startPos;
+ pDecl.EndLocation = t.Location;
+ pDecl.TypeReference = type;
+ pDecl.ImplementsClause = implementsClause;
+ pDecl.Parameters = p;
+ compilationUnit.AddChild(pDecl);
+ .)
+ |
+ (.
+ PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes);
+ pDecl.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
+ pDecl.StartLocation = startPos;
+ pDecl.EndLocation = t.Location;
+ pDecl.BodyStart = t.Location;
+ pDecl.TypeReference = type;
+ pDecl.ImplementsClause = implementsClause;
+ pDecl.Parameters = p;
+ PropertyGetRegion getRegion;
+ PropertySetRegion setRegion;
+ .)
+ AccessorDecls<out getRegion, out setRegion>
+ "End" "Property"
+ EOL
+ (.
+ pDecl.GetRegion = getRegion;
+ pDecl.SetRegion = setRegion;
+ pDecl.BodyEnd = t.EndLocation;
+ compilationUnit.AddChild(pDecl);
+ .)
+ )
+ .
+
+/* 9.7 */
+AccessorDecls<out PropertyGetRegion getBlock, out PropertySetRegion setBlock>
+ (.
+ ArrayList attributes = new ArrayList();
+ AttributeSection section;
+ getBlock = null;
+ setBlock = null;
+ .) =
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ (
+ GetAccessorDecl<out getBlock, attributes>
+ [
+ (. attributes = new ArrayList(); .)
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ SetAccessorDecl<out setBlock, attributes>
+ ]
+ |
+ SetAccessorDecl<out setBlock, attributes>
+ [
+ (. attributes = new ArrayList(); .)
+ { AttributeSection<out section> (. attributes.Add(section); .) }
+ GetAccessorDecl<out getBlock, attributes>
+ ]
+ )
+ .
+
+/* 9.7.1 */
+GetAccessorDecl<out PropertyGetRegion getBlock, ArrayList attributes>
+ (. Statement stmt = null; .) =
+ "Get"
+ EOL
+ Block<out stmt>
+ (.
+ getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
+ .)
+ "End" "Get"
+ EOL
+ .
+
+/* 9.7.2 */
+SetAccessorDecl<out PropertySetRegion setBlock, ArrayList attributes>
+ (.
+ Statement stmt = null;
+ ArrayList p = null;
+ .) =
+ "Set"
+ [ "(" [ FormalParameterList<out p> ] ")" ]
+ EOL
+ Block<out stmt>
+ (.
+ setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
+ setBlock.Parameters = p;
+ .)
+ "End" "Set"
+ EOL
+ .
+
+/* 9.5 */
+ConstantDeclarator<ArrayList constantDeclaration>
+ (.
+ Expression expr = null;
+ TypeReference type = null;
+ string name = String.Empty;
+ .) =
+ Identifier (. name = t.val; .)
+ ["As" TypeName<out type> ]
+ "=" Expr<out expr>
+ (.
+ VariableDeclaration f = new VariableDeclaration(name, expr);
+ f.Type = type;
+ constantDeclaration.Add(f);
+ .)
+ .
+
+/* 9.6 */
+VariableDeclarator<ArrayList fieldDeclaration>
+ (.
+ Expression expr = null;
+ TypeReference type = null;
+ ObjectCreateExpression oce = null;
+ ArrayCreateExpression ace = null;
+ ArrayList rank = null;
+ ArrayList dimension = null;
+ .) =
+ Identifier
+ (.
+ VariableDeclaration f = new VariableDeclaration(t.val);
+ .)
+ [ IF(IsRank()) ArrayTypeModifiers<out rank> ]
+ [ IF(IsSize()) ArrayInitializationModifier<out dimension> ]
+ (
+ IF(IsObjectCreation()) "As" ObjectCreateExpression<out expr>
+ (.
+ if(expr is ArrayCreateExpression) {
+ ace = expr as ArrayCreateExpression;
+ f.Initializer = ace.ArrayInitializer;
+
+ } else {
+ oce = expr as ObjectCreateExpression;
+ f.Initializer = oce;
+ if(oce.CreateType != null) {
+ f.Type = oce.CreateType;
+ }
+ }
+ .)
+ |
+ [ "As" TypeName<out type> ]
+ (.
+ if(type != null) {
+ type.Dimension = dimension;
+ }
+ f.Type = type;
+ if (type != null && rank != null) {
+ if(type.RankSpecifier != null) {
+ Error("array rank only allowed one time");
+ } else {
+ type.RankSpecifier = rank;
+ }
+ }
+ .)
+ [ "=" VariableInitializer<out expr> (. f.Initializer = expr; .) ]
+ )
+ (. fieldDeclaration.Add(f); .)
+ .
+
+/* 6.8 */
+ArrayInitializationModifier<out ArrayList arrayModifiers>
+ (.
+ arrayModifiers = null;
+ .) =
+ "(" InitializationRankList<out arrayModifiers> ")"
+ .
+
+/* 7.5.4.3 */
+InitializationRankList<out ArrayList rank>
+ (.
+ rank = null;
+ Expression expr = null;
+ .) =
+ Expr<out expr> (. rank = new ArrayList(); rank.Add(expr); .)
+ {
+ "," Expr<out expr> (. rank.Add(expr); .)
+ }
+ .
+
+/* 9.6.3 */
+VariableInitializer<out Expression initializerExpression>
+ (.
+ initializerExpression = null;
+ .) =
+ Expr<out initializerExpression>
+ | ArrayInitializer<out initializerExpression>
+ .
+
+/* 9.6.3.4 */
+ArrayInitializer<out Expression outExpr>
+ (.
+ Expression expr = null;
+ ArrayInitializerExpression initializer = new ArrayInitializerExpression();
+ .) =
+ "{"
+ [
+ VariableInitializer<out expr>
+ (.
+ initializer.CreateExpressions.Add(expr);
+ .)
+ {
+ IF (NotFinalComma()) "," VariableInitializer<out expr>
+ (. initializer.CreateExpressions.Add(expr); .)
+ }
+ ]
+ "}" (. outExpr = initializer; .)
+ .
+
+Charset<out CharsetModifier charsetModifier>
+ (. charsetModifier = CharsetModifier.None; .) =
+ | "Ansi" (. charsetModifier = CharsetModifier.ANSI; .)
+ | "Auto" (. charsetModifier = CharsetModifier.Auto; .)
+ | "Unicode" (. charsetModifier = CharsetModifier.Unicode; .)
+ .
+
+/* 9.2.6 */
+HandlesClause<out HandlesClause handlesClause>
+ (.
+ handlesClause = new HandlesClause();
+ string name;
+ .) =
+ "Handles" EventMemberSpecifier<out name> (. handlesClause.EventNames.Add(name); .)
+ { "," EventMemberSpecifier<out name> (. handlesClause.EventNames.Add(name); .) }
+ .
+
+/* 7.8. */
+InterfaceBase <out ArrayList bases>
+ (.
+ TypeReference type;
+ bases = new ArrayList();
+ .) =
+ "Inherits"
+ TypeName<out type> (. bases.Add(type); .)
+ {
+ ","
+ TypeName<out type> (. bases.Add(type); .)
+ }
+ EOL
+ .
+
+/* 7.2 */
+TypeImplementsClause<out ArrayList baseInterfaces>
+ (.
+ baseInterfaces = new ArrayList();
+ TypeReference type = null;
+ .) =
+ "Implements" TypeName<out type>
+ (.
+ baseInterfaces.Add(type);
+ .)
+ {
+ "," TypeName<out type>
+ (. baseInterfaces.Add(type); .)
+ }
+ EndOfStmt
+ .
+
+/* 9.1 */
+ImplementsClause<out ImplementsClause clause>
+ (.
+ clause = new ImplementsClause();
+ string typename = String.Empty;
+ string first;
+ .) =
+ "Implements" Identifier (. first = t.val; .) "." Qualident<out typename> (. ((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); .)
+ { "," Identifier (. first = t.val; .) "." Qualident<out typename> (. ((ImplementsClause)clause).BaseMembers.Add(first + "." + typename); .) }
+ .
+
+EventMemberSpecifier<out string name>
+ (. string type; name = String.Empty; .) =
+ Identifier (. type = t.val; .)
+ "."
+ Identifier (. name = type + "." + t.val; .)
+ | "MyBase" "."
+ (
+ Identifier (. name = "MyBase." + t.val; .)
+ | "Error" (. name = "MyBase.Error"; .)
+ )
+ .
+
+Expr<out Expression expr>
+ (. expr = new Expression(); .) =
+ ConditionalOrExpr<out expr>
+ {
+ /*ConditionalOrExpr<out expr> |*/
+ (. AssignmentOperatorType op; Expression val; .)
+ AssignmentOperator<out op> Expr<out val> (. expr = new AssignmentExpression(expr, op, val); .)
+ }
+ .
+
+UnaryExpr<out Expression uExpr>
+ (.
+ Expression expr;
+ UnaryOperatorType uop = UnaryOperatorType.None;
+ bool isUOp = false;
+ .) =
+ { "+" (. uop = UnaryOperatorType.Plus; isUOp = true; .)
+ | "-" (. uop = UnaryOperatorType.Minus; isUOp = true; .)
+/* | "Not" (. uop = UnaryOperatorType.Not; isUOp = true;.) */
+ | "*" (. uop = UnaryOperatorType.Star; isUOp = true;.)
+ }
+ SimpleExpr<out expr>
+ (.
+ if (isUOp) {
+ uExpr = new UnaryOperatorExpression(expr, uop);
+ } else {
+ uExpr = expr;
+ }
+ .)
+ .
+
+AssignmentOperator<out AssignmentOperatorType op>
+ (. op = AssignmentOperatorType.None; .) =
+ "=" (. op = AssignmentOperatorType.Assign; .)
+ | "&=" (. op = AssignmentOperatorType.ConcatString; .)
+ | "+=" (. op = AssignmentOperatorType.Add; .)
+ | "-=" (. op = AssignmentOperatorType.Subtract; .)
+ | "*=" (. op = AssignmentOperatorType.Multiply; .)
+ | "/=" (. op = AssignmentOperatorType.Divide; .)
+ | "\\=" (. op = AssignmentOperatorType.DivideInteger; .)
+ | "^=" (. op = AssignmentOperatorType.Power; .)
+ | "<<=" (. op = AssignmentOperatorType.ShiftLeft; .)
+ | ">>=" (. op = AssignmentOperatorType.ShiftRight; .)
+ .
+
+/* 11.4 */
+SimpleExpr<out Expression pexpr>
+ (.
+ Expression expr;
+ TypeReference type = null;
+ string name = String.Empty;
+ pexpr = null;
+ .) =
+ (
+ (
+ /* 11.4.1 */
+ LiteralString (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ | LiteralCharacter (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ | LiteralSingle (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ | LiteralDouble (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ | LiteralInteger (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ | LiteralDate (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ | LiteralDecimal (.pexpr = new PrimitiveExpression(t.literalValue, t.val); .)
+ /* True, False and Nothing are handled as literals in the spec */
+ | "True" (.pexpr = new PrimitiveExpression(true, "true"); .)
+ | "False" (.pexpr = new PrimitiveExpression(false, "false"); .)
+ | "Nothing" (.pexpr = new PrimitiveExpression(null, "null"); .)
+ | /* 11.4.2 */ "(" Expr<out expr> ")" (. pexpr = new ParenthesizedExpression(expr); .)
+ | /* 11.4.4 */ Identifier (. pexpr = new IdentifierExpression(t.val); .)
+ | (. string val = String.Empty; .) PrimitiveTypeName<out val>
+ "." Identifier (. pexpr = new FieldReferenceOrInvocationExpression(new TypeReferenceExpression(val), t.val); .)
+ | "Me" (. pexpr = new ThisReferenceExpression(); .)
+ | (. Expression retExpr = null; .)
+ ( "MyBase" (. retExpr = new BaseReferenceExpression(); .)
+ | "MyClass" (. retExpr = new ClassReferenceExpression(); .)
+ )
+ "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(retExpr, name); .)
+ | ObjectCreateExpression<out expr> (. pexpr = expr; .)
+ | /* 11.11 */ ( "DirectCast" | "CType" ) "(" Expr<out expr> "," TypeName<out type> ")" (. pexpr = new CastExpression(type, expr); .)
+ | /* 11.11 */ CastTarget<out type> "(" Expr<out expr> ")" (. pexpr = new CastExpression(type, expr, true); .)
+ | /* 11.4.5 */ "AddressOf" Expr<out expr> (. pexpr = new AddressOfExpression(expr); .)
+ | /* 11.5.1 */ "GetType" "(" TypeName<out type> ")" (. pexpr = new GetTypeExpression(type); .)
+ | /* 11.5.2 */ "TypeOf" SimpleExpr<out expr> "Is" TypeName<out type> (. pexpr = new TypeOfExpression(expr, type); .)
+ )
+ {
+ "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); .)
+ | "(" (. ArrayList parameters = new ArrayList(); .)
+ [
+ (. expr = null; .) [ Argument<out expr>] (. parameters.Add(expr); .)
+ {
+ "," (. expr = null; .)
+ [ Argument<out expr> ] (. parameters.Add(expr); .)
+ }
+ ]
+ ")" (. pexpr = new InvocationExpression(pexpr, parameters); .)
+ }
+ |
+ /* this form only occurs in with statements*/
+ "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name);.)
+ {
+ "." IdentifierOrKeyword<out name> (. pexpr = new FieldReferenceOrInvocationExpression(pexpr, name); .)
+ | "(" (. ArrayList parameters = new ArrayList(); .)
+ [
+ (. expr = null; .) [ Argument<out expr>] (. parameters.Add(expr); .)
+ {
+ "," (. expr = null; .)
+ [ Argument<out expr> ] (. parameters.Add(expr); .)
+ }
+ ]
+ ")" (. pexpr = new InvocationExpression(pexpr, parameters); .)
+ }
+ )
+ .
+
+/* 11.11 */
+
+CastTarget<out TypeReference type>
+ (.
+ type = null;
+ .) =
+ "CBool" (. type = new TypeReference("System.Boolean"); .)
+ | "CByte" (. type = new TypeReference("System.Byte"); .)
+ | "CChar" (. type = new TypeReference("System.Char"); .)
+ | "CDate" (. type = new TypeReference("System.DateTime"); .)
+ | "CDec" (. type = new TypeReference("System.Decimal"); .)
+ | "CDbl" (. type = new TypeReference("System.Double"); .)
+ | "CInt" (. type = new TypeReference("System.Int32"); .)
+ | "CLng" (. type = new TypeReference("System.Int64"); .)
+ | "CObj" (. type = new TypeReference("System.Object"); .)
+ | "CShort" (. type = new TypeReference("System.Int16"); .)
+ | "CSng" (. type = new TypeReference("System.Single"); .)
+ | "CStr" (. type = new TypeReference("System.String"); .)
+ .
+
+ConditionalOrExpr<out Expression outExpr>
+ (. Expression expr; .) =
+ ConditionalAndExpr<out outExpr> { "OrElse" ConditionalAndExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanOr, expr); .) }
+ .
+
+ConditionalAndExpr<out Expression outExpr>
+ (. Expression expr; .) =
+ InclusiveOrExpr<out outExpr> { "AndAlso" InclusiveOrExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BooleanAnd, expr); .) }
+ .
+
+InclusiveOrExpr<out Expression outExpr>
+ (. Expression expr; .) =
+ ExclusiveOrExpr<out outExpr> { "Xor" ExclusiveOrExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr); .) }
+ .
+
+ExclusiveOrExpr<out Expression outExpr>
+ (. Expression expr; .) =
+ AndExpr<out outExpr> { "Or" AndExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr); .) }
+ .
+
+AndExpr<out Expression outExpr>
+ (. Expression expr; .) =
+ NotExpr<out outExpr> { "And" NotExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr); .) }
+ .
+
+NotExpr<out Expression outExpr>
+ (. UnaryOperatorType uop = UnaryOperatorType.None; .) =
+ { "Not" (. uop = UnaryOperatorType.Not; .) }
+ EqualityExpr<out outExpr>
+ (. if (uop != UnaryOperatorType.None)
+ outExpr = new UnaryOperatorExpression(outExpr, uop);
+ .)
+ .
+
+EqualityExpr<out Expression outExpr>
+ (.
+ Expression expr;
+ BinaryOperatorType op = BinaryOperatorType.None;
+ .) =
+ RelationalExpr<out outExpr>
+ {
+ (
+ "<>" (. op = BinaryOperatorType.InEquality; .)
+ | "=" (. op = BinaryOperatorType.Equality; .)
+ | "Like" (. op = BinaryOperatorType.Like; .)
+ )
+ RelationalExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+ }
+ .
+
+RelationalExpr<out Expression outExpr>
+ (.
+ Expression expr;
+ BinaryOperatorType op = BinaryOperatorType.None;
+ .) =
+ ShiftExpr<out outExpr>
+ {
+ (
+ "<" (. op = BinaryOperatorType.LessThan; .)
+ | ">" (. op = BinaryOperatorType.GreaterThan; .)
+ | "<=" (. op = BinaryOperatorType.LessThanOrEqual; .)
+ | ">=" (. op = BinaryOperatorType.GreaterThanOrEqual; .)
+ )
+ ShiftExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+ |
+ /* 11.5.3 */
+ "Is" (. op = BinaryOperatorType.IS; .)
+ Expr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+ }
+ .
+
+ShiftExpr<out Expression outExpr>
+ (.
+ Expression expr;
+ BinaryOperatorType op = BinaryOperatorType.None;
+ .) =
+ AdditiveExpr<out outExpr>
+ {
+ (
+ "<<" (. op = BinaryOperatorType.ShiftLeft; .)
+ | ">>" (. op = BinaryOperatorType.ShiftRight; .)
+ )
+ AdditiveExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+ }
+ .
+
+AdditiveExpr<out Expression outExpr>
+ (.
+ Expression expr;
+ BinaryOperatorType op = BinaryOperatorType.None;
+ .) =
+ MultiplicativeExpr<out outExpr>
+ {
+ (
+ "+" (. op = BinaryOperatorType.Add; .)
+ | "-" (. op = BinaryOperatorType.Subtract; .)
+ | "&" (. op = BinaryOperatorType.Concat; .)
+ )
+ MultiplicativeExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+ }
+ .
+
+MultiplicativeExpr<out Expression outExpr>
+ (.
+ Expression expr;
+ BinaryOperatorType op = BinaryOperatorType.None;
+ .) =
+ UnaryExpr<out outExpr>
+ {
+ (
+ "*" (. op = BinaryOperatorType.Multiply; .)
+ | "/" (. op = BinaryOperatorType.Divide; .)
+ | "\\" (. op = BinaryOperatorType.DivideInteger; .)
+ | "Mod" (. op = BinaryOperatorType.Modulus; .)
+ | "^" (. op = BinaryOperatorType.Power; .)
+ )
+ UnaryExpr<out expr> (. outExpr = new BinaryOperatorExpression(outExpr, op, expr); .)
+ }
+ .
+
+ObjectCreateExpression<out Expression oce>
+ (.
+ TypeReference type = null;
+ Expression initializer = null;
+ ArrayList arguments = null;
+ oce = null;
+ .) =
+ "New" ArrayTypeName<out type>
+ ["("
+ [ ArgumentList<out arguments> ]
+ ")"
+ ]
+ [
+ ArrayInitializer<out initializer>
+ ]
+ (.
+ if(initializer == null) {
+ oce = new ObjectCreateExpression(type, arguments);
+ } else {
+ ArrayCreateExpression ace = new ArrayCreateExpression(type, initializer as ArrayInitializerExpression);
+ ace.Parameters = arguments;
+ oce = ace;
+ }
+ .)
+ .
+
+/* 9.3.2 */
+ArgumentList<out ArrayList arguments>
+ (.
+ arguments = new ArrayList();
+ Expression expr = null;
+ .) =
+ [
+ Argument<out expr> (. arguments.Add(expr); .)
+ {
+ ","
+ Argument<out expr> (. arguments.Add(expr); .)
+ }
+ ]
+ .
+
+/* Spec, 11.8 */
+Argument<out Expression argumentexpr>
+ (.
+ Expression expr;
+ argumentexpr = null;
+ string name;
+ .) =
+ IF(IsNamedAssign()) Identifier (. name = t.val; .) ":" "=" Expr<out expr>
+ (.
+ argumentexpr = new NamedArgumentExpression(name, expr);
+ .)
+ |
+ Expr<out argumentexpr>
+ .
+
+/* 7.1. */
+TypeName<out TypeReference typeref>
+ (.
+ ArrayList rank = null;
+ .) =
+ NonArrayTypeName<out typeref>
+ ArrayTypeModifiers<out rank>
+ (.
+ typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
+ .)
+ .
+
+
+ArrayTypeName<out TypeReference typeref>
+ (.
+ ArrayList rank = null;
+ .) =
+ NonArrayTypeName<out typeref>
+ ArrayInitializationModifiers<out rank>
+ (.
+ typeref = new TypeReference(typeref == null ? "UNKNOWN" : typeref.Type, rank);
+ .)
+ .
+
+/* 7.1 */
+NonArrayTypeName<out TypeReference typeref>
+ (.
+ string name;
+ typeref = null;
+ .) =
+ Qualident<out name> (. typeref = new TypeReference(name); .)
+ | "Object" (. typeref = new TypeReference("System.Object"); .)
+ | PrimitiveTypeName<out name> (. typeref = new TypeReference(name); .)
+ .
+
+ArrayInitializationModifiers<out ArrayList arrayModifiers>
+ (.
+ arrayModifiers = new ArrayList();
+ ArrayList dim = new ArrayList();
+ .) =
+ {
+ IF (IsDims()) "("
+ [ InitializationRankList <out dim>]
+ (.
+ arrayModifiers.Add(dim);
+ .)
+ ")"
+ }
+ (.
+ if(arrayModifiers.Count == 0) {
+ arrayModifiers = null;
+ }
+ .)
+ .
+
+/* 7.9 */
+ArrayTypeModifiers<out ArrayList arrayModifiers>
+ (.
+ arrayModifiers = new ArrayList();
+ int i = 0;
+ .) =
+ { IF (IsRank())
+ "("
+ [ RankList <out i>]
+ (.
+ arrayModifiers.Add(i);
+ .)
+ ")"
+ }
+ (.
+ if(arrayModifiers.Count == 0) {
+ arrayModifiers = null;
+ }
+ .)
+ .
+
+/* 7.9 */
+RankList<out int i>
+ (. i = 0; .) =
+ { "," (. ++i; .) }
+ .
+
+GlobalAttributeSection =
+ (. Point startPos = t.Location; .)
+ "<" ("Assembly" | "Module")
+ (.
+ string attributeTarget = t.val.ToLower();
+ ArrayList attributes = new ArrayList();
+ ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
+ .)
+ ":" Attribute<out attribute> (. attributes.Add(attribute); .)
+ { IF (NotFinalComma()) "," Attribute<out attribute> (. attributes.Add(attribute); .)}
+ [ "," ]
+ ">"
+ EndOfStmt
+ (.
+ AttributeSection section = new AttributeSection(attributeTarget, attributes);
+ section.StartLocation = startPos;
+ section.EndLocation = t.EndLocation;
+ compilationUnit.AddChild(section);
+ .)
+ .
+
+/* Spec, 5. */
+Attribute<out ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute>
+ (. string qualident; .) =
+ Qualident<out qualident>
+ (.
+ ArrayList positional = new ArrayList();
+ ArrayList named = new ArrayList();
+ string name = qualident;
+ .)
+ [ AttributeArguments<ref positional, ref named> ]
+ (.
+ attribute = new ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute(name, positional, named);
+ .)
+ .
+
+/* Spec, 5.2.2 */
+AttributeArguments<ref ArrayList positional, ref ArrayList named>
+ (.
+ bool nameFound = false;
+ string name = "";
+ Expression expr;
+ .) =
+ "("
+ [
+ IF (IsNotClosingParenthesis()) (
+ [
+ IF (IsNamedAssign()) (. nameFound = true; .)
+ IdentifierOrKeyword<out name>
+ [":"] "="
+ ] Expr<out expr>
+ (.
+ if(name == "") positional.Add(expr);
+ else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
+ .)
+ {
+ ","
+ (
+ IF (IsNamedAssign()) (. nameFound = true; .)
+ IdentifierOrKeyword<out name>
+ [ ":" ] "="
+ | (. if (nameFound) Error("no positional argument after named argument"); .)
+ ) Expr<out expr> (. if(name == "") positional.Add(expr);
+ else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
+ .)
+ }
+ )
+ ]
+ ")"
+ .
+
+/* Spec, 5. */
+AttributeSection<out AttributeSection section>
+ (.
+ string attributeTarget = "";
+ ArrayList attributes = new ArrayList();
+ ICSharpCode.SharpRefactory.Parser.AST.VB.Attribute attribute;
+
+ .) =
+ "<" (. Point startPos = t.Location; .)
+ [ IF (IsLocalAttrTarget())
+ ( "Event" (. attributeTarget = "event";.)
+ | "Return" (. attributeTarget = "return";.)
+ | Identifier
+ (.
+ string val = t.val.ToLower();
+ if (val != "field" || val != "method" ||
+ val != "module" || val != "param" ||
+ val != "property" || val != "type")
+ Error("attribute target specifier (event, return, field," +
+ "method, module, param, property, or type) expected");
+ attributeTarget = t.val;
+ .)
+ ) ":"
+ ]
+ Attribute<out attribute> (. attributes.Add(attribute); .)
+ { IF (NotFinalComma()) "," Attribute<out attribute> (. attributes.Add(attribute); .) }
+ [ "," ]
+ ">"
+ (.
+ section = new AttributeSection(attributeTarget, attributes);
+ section.StartLocation = startPos;
+ section.EndLocation = t.EndLocation;
+ .)
+ .
+
+/* 9.2.5 */
+FormalParameterList<out ArrayList parameter>
+ (.
+ parameter = new ArrayList();
+ ParameterDeclarationExpression p;
+ AttributeSection section;
+ ArrayList attributes = new ArrayList();
+ .) =
+ { AttributeSection<out section> (.attributes.Add(section); .) }
+ (
+ FormalParameter<out p>
+ (.
+ bool paramsFound = false;
+ p.Attributes = attributes;
+ parameter.Add(p);
+ .)
+ {
+ "," (. attributes = new ArrayList(); if (paramsFound) Error("params array must be at end of parameter list"); .)
+ { AttributeSection<out section> (.attributes.Add(section); .) }
+ (
+ FormalParameter <out p> (. p.Attributes = attributes; parameter.Add(p); .)
+ )
+ }
+ )
+ .
+/* 9.2.5 */
+FormalParameter<out ParameterDeclarationExpression p>
+ (.
+ TypeReference type = null;
+ ParamModifiers mod = new ParamModifiers(this);
+ Expression expr = null;
+ p = null;
+ ArrayList arrayModifiers = null;
+ .) =
+ { ParameterModifier<mod> }
+ Identifier (. string parameterName = t.val; .)
+ [ IF(IsRank()) ArrayTypeModifiers<out arrayModifiers> ]
+ [ "As" TypeName<out type> ]
+ (.
+ if(type != null) {
+ if (arrayModifiers != null) {
+ if (type.RankSpecifier != null) {
+ Error("array rank only allowed one time");
+ } else {
+ type.RankSpecifier = arrayModifiers;
+ }
+ }
+ } else {
+ type = new TypeReference("System.Object", arrayModifiers);
+ }
+ .)
+ [ "=" Expr<out expr> ]
+ (.
+ mod.Check();
+ p = new ParameterDeclarationExpression(type, parameterName, mod, expr);
+ .)
+ .
+
+/* 10.1 */
+Block<out Statement stmt>
+ =
+ (.
+ BlockStatement blockStmt = new BlockStatement();
+ blockStmt.StartLocation = t.Location;
+ compilationUnit.BlockStart(blockStmt);
+ .)
+ { Statement EndOfStmt |
+ IF (IsEndStmtAhead()) "End" EndOfStmt (. compilationUnit.AddChild(new EndStatement()); .)
+ }
+ (.
+ stmt = blockStmt;
+ blockStmt.EndLocation = t.EndLocation;
+ compilationUnit.BlockEnd();
+ .)
+ .
+
+Statement
+ (.
+ Statement stmt;
+ string label = String.Empty;
+
+ .) =
+ IF (IsLabel()) LabelName<out label>
+ (.
+ labelStatement = new LabelStatement(t.val);
+ compilationUnit.AddChild(labelStatement);
+ .)
+ ":" [ (. isLabel = true; .) Statement ]
+ | EmbeddedStatement<out stmt> (. updateLabelStatement(stmt); .)
+ | LocalDeclarationStatement<out stmt> (. updateLabelStatement(stmt); .)
+ .
+
+/* 10.2 */
+LocalDeclarationStatement<out Statement statement>
+ (.
+ Modifiers m = new Modifiers(this);
+ ArrayList vars = new ArrayList();
+ LocalVariableDeclaration localVariableDeclaration;
+ bool dimfound = false;
+ .) =
+ /* this differs from the spec: dim static x compiles with vbc. */
+ {
+ "Const" (. m.Add(Modifier.Constant); .)
+ | "Static" (. m.Add(Modifier.Static); .)
+ | "Dim" (. dimfound = true; .)
+ }
+ (.
+ if(dimfound && (m.Modifier & Modifier.Constant) != 0) {
+ Error("Dim is not allowed on constants.");
+ }
+
+ if(m.isNone && dimfound == false) {
+ Error("Const, Dim or Static expected");
+ }
+
+ localVariableDeclaration = new LocalVariableDeclaration(m.Modifier);
+ localVariableDeclaration.StartLocation = t.Location;
+ .)
+ VariableDeclarator<vars>
+ { "," VariableDeclarator<vars> }
+ (.
+ localVariableDeclaration.Variables = vars;
+ statement = localVariableDeclaration;
+ .)
+ .
+
+EmbeddedStatement<out Statement statement>
+ (.
+ Statement embeddedStatement = null;
+ statement = null;
+ Expression expr = null;
+ string name = String.Empty;
+ ArrayList p = null;
+ .) =
+ "Exit" (. ExitType exitType = ExitType.None; .)
+ (
+ "Sub" (. exitType = ExitType.Sub; .)
+ |
+ "Function" (. exitType = ExitType.Function; .)
+ |
+ "Property" (. exitType = ExitType.Property; .)
+ |
+ "Do" (. exitType = ExitType.Do; .)
+ |
+ "For" (. exitType = ExitType.For; .)
+ |
+ "Try" (. exitType = ExitType.Try; .)
+ |
+ "While" (. exitType = ExitType.While; .)
+ |
+ "Select" (. exitType = ExitType.Select; .)
+ )
+ (. statement = new ExitStatement(exitType); .)
+ | TryStatement<out statement>
+ | /* 10.10.1.3 */
+ "Throw" [ Expr<out expr> ] (. statement = new ThrowStatement(expr); .)
+ | /* 10.11 */
+ "Return" [ Expr<out expr> ] (. statement = new ReturnStatement(expr); .)
+ | /* 10.4 */
+ "SyncLock" Expr<out expr> EndOfStmt Block<out embeddedStatement>
+ "End" "SyncLock" (. statement = new LockStatement(expr, embeddedStatement); .)
+ | /* 10.5.1 */
+ "RaiseEvent" Identifier (. name = t.val; .)
+ [ "(" [ ArgumentList<out p> ] ")" ]
+ (. statement = new RaiseEventStatement(name, p); .)
+ | /* 10.3 */
+ WithStatement<out statement>
+ | /* 10.5.2 */
+ "AddHandler" (. Expression handlerExpr = null; .)
+ Expr<out expr> "," Expr<out handlerExpr>
+ (.
+ statement = new AddHandlerStatement(expr, handlerExpr);
+ .)
+ | /* 10.5.2 */
+ "RemoveHandler" (. Expression handlerExpr = null; .)
+ Expr<out expr> "," Expr<out handlerExpr>
+ (.
+ statement = new RemoveHandlerStatement(expr, handlerExpr);
+ .)
+ | /* 10.9.1 */
+ "While" Expr<out expr> EndOfStmt
+ Block<out embeddedStatement> "End" "While"
+ (.
+ statement = new WhileStatement(expr, embeddedStatement);
+ .)
+ | /* 10.9.1 */
+ "Do"
+ (.
+ ConditionType conditionType = ConditionType.None;
+ .)
+ (
+ WhileOrUntil<out conditionType> Expr<out expr> EndOfStmt
+ Block<out embeddedStatement>
+ "Loop"
+ (.
+ statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.Start);
+ .)
+ |
+ EndOfStmt
+ Block<out embeddedStatement>
+ "Loop" [WhileOrUntil<out conditionType> Expr<out expr>]
+ (.
+ statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End);
+ .)
+ )
+ | "For"
+ (.
+ Expression group = null;
+ LoopControlVariableExpression loopControlExpr = null;
+ .)
+ (
+ /* 10.9.3 */
+ "Each" LoopControlVariable<out loopControlExpr>
+ "In" Expr<out group> EndOfStmt
+ Block<out embeddedStatement>
+ "Next" [ Expr<out expr> ]
+ (.
+ statement = new ForeachStatement(loopControlExpr, group, embeddedStatement, expr);
+ .)
+ | /* 10.9.2 */
+ (.
+ Expression start = null;
+ Expression end = null;
+ Expression step = null;
+ Expression nextExpr = null;
+ ArrayList nextExpressions = null;
+ .)
+ LoopControlVariable<out loopControlExpr>
+ "=" Expr<out start> "To" Expr<out end> [ "Step" Expr<out step> ]
+ EndOfStmt Block<out embeddedStatement>
+ "Next"
+ [
+ Expr<out nextExpr> (. nextExpressions = new ArrayList(); nextExpressions.Add(nextExpr); .)
+ { "," Expr<out nextExpr> (. nextExpressions.Add(nextExpr); .) }
+ ]
+ (.
+ statement = new ForStatement(loopControlExpr, start, end, step, embeddedStatement, nextExpressions);
+ .)
+ )
+ | /* 10.10.2.1 */
+ "Error" Expr<out expr> (. statement = new ErrorStatement(expr); .)
+ | /* 10.12.1 */
+ "ReDim" (. Expression clause = null; .) [ "Preserve" ]
+ Expr<out clause>
+ (.
+ ArrayList clauses = new ArrayList();
+ clauses.Add(clause);
+ /*ReDimStatement reDimStatement = new ReDimStatement(clauses);*/
+ .)
+ { "," Expr<out clause> (. clauses.Add(clause); .) }
+ | /* 10.12.2 */
+ "Erase"
+ Expr<out expr>
+ (.
+ ArrayList arrays = new ArrayList();
+ arrays.Add(expr);
+ EraseStatement eraseStatement = new EraseStatement(arrays);
+
+ .)
+ { "," Expr<out expr> (. arrays.Add(expr); .) }
+ (. statement = eraseStatement; .)
+ | /* 10.11 */
+ "Stop" (. statement = new StopStatement(); .)
+ | /* 10.8.1 */
+ "If" Expr<out expr> [ "Then" ]
+ (
+ IF (IsEndStmtAhead()) "End" (. statement = new IfStatement(expr, new EndStatement()); .)
+ |
+ /* multiline if statement */
+ EndOfStmt Block<out embeddedStatement>
+ (.
+ ArrayList elseIfSections = new ArrayList();
+ IfStatement ifStatement = new IfStatement(expr, embeddedStatement);
+ .)
+ {
+ (
+ IF(IsElseIf()) "Else" "If"
+ | "ElseIf"
+ )
+ (. Expression condition = null; Statement block = null; .)
+ Expr<out condition> [ "Then"] EndOfStmt
+ Block<out block>
+ (.
+ ElseIfSection elseIfSection = new ElseIfSection(condition, block);
+ elseIfSections.Add(elseIfSection);
+ .)
+ }
+ [
+ "Else" EndOfStmt
+ Block<out embeddedStatement>
+ (.
+ ifStatement.EmbeddedElseStatement = embeddedStatement;
+ .)
+ ] "End" "If"
+ (.
+ ifStatement.ElseIfStatements = elseIfSections;
+ statement = ifStatement;
+ .)
+ | /* singleline if statement */
+ EmbeddedStatement<out embeddedStatement>
+ (.
+ SimpleIfStatement ifStatement = new SimpleIfStatement(expr);
+ ArrayList statements = new ArrayList();
+ statements.Add(embeddedStatement);
+ ifStatement.Statements = statements;
+ .)
+ { ":" EmbeddedStatement<out embeddedStatement> (. statements.Add(embeddedStatement); .) }
+ [
+ "Else" [ EmbeddedStatement<out embeddedStatement> ]
+ (.
+ ArrayList elseStatements = new ArrayList();
+ elseStatements.Add(embeddedStatement);
+ ifStatement.ElseStatements = elseStatements;
+ .)
+ {
+ ":" EmbeddedStatement<out embeddedStatement>
+ (. elseStatements.Add(embeddedStatement); .)
+ }
+ ]
+ (. statement = ifStatement; .)
+ )
+ | /* 10.8.2 */
+ "Select" [ "Case" ] Expr<out expr> EndOfStmt
+ (.
+ ArrayList selectSections = new ArrayList();
+ Statement block = null;
+ .)
+ {
+ (. ArrayList caseClauses = null; .)
+ "Case" CaseClauses<out caseClauses> [ IF(IsNotStatementSeparator()) ":" ] EndOfStmt
+ (.
+ SelectSection selectSection = new SelectSection();
+ selectSection.CaseClauses = caseClauses;
+ compilationUnit.BlockStart(selectSection);
+ .)
+ Block<out block>
+ (.
+ selectSection.EmbeddedStatement = block;
+ compilationUnit.BlockEnd();
+ selectSections.Add(selectSection);
+ .)
+ }
+ (. statement = new SelectStatement(expr, selectSections); .)
+ "End" "Select"
+ | (. OnErrorStatement onErrorStatement = null; .)
+ OnErrorStatement<out onErrorStatement> (. statement = onErrorStatement; .)
+ | (. GoToStatement goToStatement = null; .)
+ GoToStatement<out goToStatement> (. statement = goToStatement; .)
+ | (. ResumeStatement resumeStatement = null; .)
+ ResumeStatement<out resumeStatement> (. statement = resumeStatement; .)
+ |/* Statement expression (invocation and assignment) 10.6.1, 10.6.2, 10.6.3 */
+ (.
+ Expression val = null;
+ AssignmentOperatorType op;
+
+ bool mustBeAssignment = la.kind == Tokens.Plus || la.kind == Tokens.Minus ||
+ la.kind == Tokens.Not || la.kind == Tokens.Times;
+ .)
+ UnaryExpr<out expr>
+ (
+ AssignmentOperator<out op> Expr<out val> (. expr = new AssignmentExpression(expr, op, val); .)
+ | (. if (mustBeAssignment) Error("error in assignment."); .)
+ )
+ (.
+ // a field reference expression that stands alone is a
+ // invocation expression without parantheses and arguments
+ if(expr is FieldReferenceOrInvocationExpression) {
+ expr = new InvocationExpression(expr, new ArrayList());
+ }
+ statement = new StatementExpression(expr);
+ .)
+ | "Call" UnaryExpr<out expr> (. statement = new StatementExpression(expr); .)
+ .
+
+/* 10.9.2 */
+LoopControlVariable<out LoopControlVariableExpression loopExpr>
+ (.
+ loopExpr = null;
+ //Expression expr = null;
+ TypeReference type = null;
+ ArrayList arrayModifiers = null;
+ string name;
+ .) =
+ Qualident<out name>
+ [ IF(IsRank()) ArrayTypeModifiers<out arrayModifiers> ]
+ [ "As" TypeName<out type> (. if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } .) ]
+ (.
+ if(type != null) {
+ if(type.RankSpecifier != null && arrayModifiers != null) {
+ Error("array rank only allowed one time");
+ } else {
+ type.RankSpecifier = arrayModifiers;
+ }
+ } else {
+ type = new TypeReference("Integer", arrayModifiers);
+ }
+ loopExpr = new LoopControlVariableExpression(name, type);
+ .)
+ .
+
+/* 10.2.2 */
+OnErrorStatement<out OnErrorStatement stmt>
+ (.
+ stmt = null;
+ GoToStatement goToStatement = null;
+ .)
+ =
+ "On" "Error"
+ (
+ IF(IsNegativeLabelName())"GoTo" "-" LiteralInteger
+ (.
+ long intLabel = Int64.Parse(t.val);
+ if(intLabel != 1) {
+ Error("invalid label in on error statement.");
+ }
+ stmt = new OnErrorStatement(new GoToStatement((intLabel * -1).ToString()));
+ .)
+ | GoToStatement<out goToStatement>
+ (.
+ string val = goToStatement.LabelName;
+
+ // if value is numeric, make sure that is 0
+ try {
+ long intLabel = Int64.Parse(val);
+ if(intLabel != 0) {
+ Error("invalid label in on error statement.");
+ }
+ } catch {
+ }
+ stmt = new OnErrorStatement(goToStatement);
+ .)
+ | "Resume" "Next"
+ (.
+ stmt = new OnErrorStatement(new ResumeStatement(true));
+ .)
+ )
+ .
+
+/* 10.11 */
+GoToStatement<out GoToStatement goToStatement>
+ (.
+ string label = String.Empty;
+ .)
+ =
+ "GoTo" LabelName<out label>
+ (.
+ goToStatement = new GoToStatement(label);
+ .)
+ .
+
+/* 10.1 */
+LabelName<out string name>
+ (.
+ name = String.Empty;
+ .) =
+ Identifier (. name = t.val; .)
+ | LiteralInteger (. name = t.val; .)
+ .
+
+/* 10.10.2.3 */
+ResumeStatement<out ResumeStatement resumeStatement>
+ (.
+ resumeStatement = null;
+ string label = String.Empty;
+ .) =
+ IF(IsResumeNext())
+ "Resume" "Next" (. resumeStatement = new ResumeStatement(true); .)
+ | "Resume" [ LabelName<out label> ] (. resumeStatement = new ResumeStatement(label); .)
+ .
+
+/* 18.8.2 */
+CaseClauses<out ArrayList caseClauses>
+ (.
+ caseClauses = null;
+ CaseClause caseClause = null;
+ .) =
+ CaseClause<out caseClause>
+ (.
+ caseClauses = new ArrayList();
+ caseClauses.Add(caseClause);
+ .)
+ { "," CaseClause<out caseClause> (. caseClauses.Add(caseClause); .) }
+ .
+
+/* 19.8.2 */
+CaseClause<out CaseClause caseClause>
+ (.
+ Expression expr = null;
+ Expression sexpr = null;
+ BinaryOperatorType op = BinaryOperatorType.None;
+ caseClause = null;
+ .) =
+ "Else"
+ (. caseClause = new CaseClause(true); .)
+ |
+ [ "Is" ]
+ (
+ "<" (. op = BinaryOperatorType.LessThan; .)
+ | ">" (. op = BinaryOperatorType.GreaterThan; .)
+ | "<=" (. op = BinaryOperatorType.LessThanOrEqual; .)
+ | ">=" (. op = BinaryOperatorType.GreaterThanOrEqual; .)
+ | "=" (. op = BinaryOperatorType.Equality; .)
+ | "<>" (. op = BinaryOperatorType.InEquality; .)
+ )
+ Expr<out expr>
+ (.
+ caseClause = new CaseClause(op, expr);
+ .)
+ | Expr<out expr> [ "To" Expr<out sexpr> ]
+ (.
+ caseClause = new CaseClause(expr, sexpr);
+ .)
+ .
+
+/* 10.9.1 */
+WhileOrUntil<out ConditionType conditionType>
+ (. conditionType = ConditionType.None; .) =
+ "While" (. conditionType = ConditionType.While; .)
+ | "Until" (. conditionType = ConditionType.Until; .)
+ .
+
+/* 10.3 */
+WithStatement<out Statement withStatement>
+ (.
+ Statement blockStmt = null;
+ Expression expr = null;
+ .) =
+ "With" (. Point start = t.Location; .)
+ Expr<out expr> EndOfStmt
+ (.
+ withStatement = new WithStatement(expr);
+ withStatement.StartLocation = start;
+ withStatements.Push(withStatement);
+ .)
+ Block<out blockStmt>
+ (.
+ ((WithStatement)withStatement).Body = (BlockStatement)blockStmt;
+ withStatements.Pop();
+ .)
+ "End" "With"
+ (. withStatement.EndLocation = t.Location; .)
+ .
+
+/* 10.10.1 */
+TryStatement<out Statement tryStatement>
+ (.
+ Statement blockStmt = null, finallyStmt = null;
+ ArrayList catchClauses = null;
+ .) =
+ "Try" EndOfStmt
+ Block<out blockStmt>
+ (
+ CatchClauses<out catchClauses>
+ [ "Finally" EndOfStmt Block<out finallyStmt> ]
+ | "Finally" EndOfStmt Block<out finallyStmt>
+ )
+ "End" "Try"
+ (.
+ tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
+ .)
+ .
+
+/* 10.10.1.2 */
+CatchClauses<out ArrayList catchClauses>
+ (.
+ catchClauses = new ArrayList();
+ TypeReference type = null;
+ Statement blockStmt = null;
+ Expression expr = null;
+ string name = String.Empty;
+ .) =
+ {
+ "Catch"
+ [ Identifier (. name = t.val; .) ["As" TypeName<out type>] ]
+ [ "When" Expr<out expr> ]
+ EndOfStmt
+ Block<out blockStmt>
+ (. catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); .)
+ }
+ .
+
+/* 4.7 */
+Qualident<out string qualident>
+ (. string name = String.Empty; .) =
+ Identifier (. StringBuilder qualidentBuilder = new StringBuilder(t.val); .)
+ {
+ "." IdentifierOrKeyword<out name> (. qualidentBuilder.Append('.');
+ qualidentBuilder.Append(name);
+ .)
+ }
+ (. qualident = qualidentBuilder.ToString(); .)
+ .
+
+/* This production handles pseudo keywords that are needed in the grammar */
+Identifier =
+ ident
+ | "Text"
+ | "Binary"
+ | "Compare"
+ .
+
+/* 2.2 */
+IdentifierOrKeyword<out string name>
+ (.
+ name = String.Empty;
+ .) =
+ Identifier (. name = t.val; .)
+ | "AddHandler" (. name = t.val; .)
+ | "AddressOf" (. name = t.val; .)
+ | "Alias" (. name = t.val; .)
+ | "And" (. name = t.val; .)
+ | "AndAlso" (. name = t.val; .)
+ | "Ansi" (. name = t.val; .)
+ | "As" (. name = t.val; .)
+ | "Assembly" (. name = t.val; .)
+ | "Auto" (. name = t.val; .)
+ | "Boolean" (. name = t.val; .)
+ | "ByRef" (. name = t.val; .)
+ | "Byte" (. name = t.val; .)
+ | "ByVal" (. name = t.val; .)
+ | "Call" (. name = t.val; .)
+ | "Case" (. name = t.val; .)
+ | "Catch" (. name = t.val; .)
+ | "CBool" (. name = t.val; .)
+ | "CByte" (. name = t.val; .)
+ | "CChar" (. name = t.val; .)
+ | "CDate" (. name = t.val; .)
+ | "CDbl" (. name = t.val; .)
+ | "CDec" (. name = t.val; .)
+ | "Char" (. name = t.val; .)
+ | "CInt" (. name = t.val; .)
+ | "Class" (. name = t.val; .)
+ | "CLng" (. name = t.val; .)
+ | "CObj" (. name = t.val; .)
+ | "Const" (. name = t.val; .)
+ | "CShort" (. name = t.val; .)
+ | "CSng" (. name = t.val; .)
+ | "CStr" (. name = t.val; .)
+ | "CType" (. name = t.val; .)
+ | "Date" (. name = t.val; .)
+ | "Decimal" (. name = t.val; .)
+ | "Declare" (. name = t.val; .)
+ | "Default" (. name = t.val; .)
+ | "Delegate" (. name = t.val; .)
+ | "Dim" (. name = t.val; .)
+ | "DirectCast" (. name = t.val; .)
+ | "Do" (. name = t.val; .)
+ | "Double" (. name = t.val; .)
+ | "Each" (. name = t.val; .)
+ | "Else" (. name = t.val; .)
+ | "ElseIf" (. name = t.val; .)
+ | "End" (. name = t.val; .)
+ | "EndIf" (. name = t.val; .)
+ | "Enum" (. name = t.val; .)
+ | "Erase" (. name = t.val; .)
+ | "Error" (. name = t.val; .)
+ | "Event" (. name = t.val; .)
+ | "Exit" (. name = t.val; .)
+ | "False" (. name = t.val; .)
+ | "Finally" (. name = t.val; .)
+ | "For" (. name = t.val; .)
+ | "Friend" (. name = t.val; .)
+ | "Function" (. name = t.val; .)
+ | "Get" (. name = t.val; .)
+ | "GetType" (. name = t.val; .)
+ | "GoSub" (. name = t.val; .)
+ | "GoTo" (. name = t.val; .)
+ | "Handles" (. name = t.val; .)
+ | "If" (. name = t.val; .)
+ | "Implements" (. name = t.val; .)
+ | "Imports" (. name = t.val; .)
+ | "In" (. name = t.val; .)
+ | "Inherits" (. name = t.val; .)
+ | "Integer" (. name = t.val; .)
+ | "Interface" (. name = t.val; .)
+ | "Is" (. name = t.val; .)
+ | "Let" (. name = t.val; .)
+ | "Lib" (. name = t.val; .)
+ | "Like" (. name = t.val; .)
+ | "Long" (. name = t.val; .)
+ | "Loop" (. name = t.val; .)
+ | "Me" (. name = t.val; .)
+ | "Mod" (. name = t.val; .)
+ | "Module" (. name = t.val; .)
+ | "MustInherit" (. name = t.val; .)
+ | "MustOverride" (. name = t.val; .)
+ | "MyBase" (. name = t.val; .)
+ | "MyClass" (. name = t.val; .)
+ | "Namespace" (. name = t.val; .)
+ | "New" (. name = t.val; .)
+ | "Next" (. name = t.val; .)
+ | "Not" (. name = t.val; .)
+ | "Nothing" (. name = t.val; .)
+ | "NotInheritable" (. name = t.val; .)
+ | "NotOverridable" (. name = t.val; .)
+ | "Object" (. name = t.val; .)
+ | "On" (. name = t.val; .)
+ | "Option" (. name = t.val; .)
+ | "Optional" (. name = t.val; .)
+ | "Or" (. name = t.val; .)
+ | "OrElse" (. name = t.val; .)
+ | "Overloads" (. name = t.val; .)
+ | "Overridable" (. name = t.val; .)
+ | "Overrides" (. name = t.val; .)
+ | "ParamArray" (. name = t.val; .)
+ | "Preserve" (. name = t.val; .)
+ | "Private" (. name = t.val; .)
+ | "Property" (. name = t.val; .)
+ | "Protected" (. name = t.val; .)
+ | "Public" (. name = t.val; .)
+ | "RaiseEvent" (. name = t.val; .)
+ | "ReadOnly" (. name = t.val; .)
+ | "ReDim" (. name = t.val; .)
+ | "RemoveHandler" (. name = t.val; .)
+ | "Resume" (. name = t.val; .)
+ | "Return" (. name = t.val; .)
+ | "Select" (. name = t.val; .)
+ | "Set" (. name = t.val; .)
+ | "Shadows" (. name = t.val; .)
+ | "Shared" (. name = t.val; .)
+ | "Short" (. name = t.val; .)
+ | "Single" (. name = t.val; .)
+ | "Static" (. name = t.val; .)
+ | "Step" (. name = t.val; .)
+ | "Stop" (. name = t.val; .)
+ | "String" (. name = t.val; .)
+ | "Structure" (. name = t.val; .)
+ | "Sub" (. name = t.val; .)
+ | "SyncLock" (. name = t.val; .)
+ | "Then" (. name = t.val; .)
+ | "Throw" (. name = t.val; .)
+ | "To" (. name = t.val; .)
+ | "True" (. name = t.val; .)
+ | "Try" (. name = t.val; .)
+ | "TypeOf" (. name = t.val; .)
+ | "Unicode" (. name = t.val; .)
+ | "Until" (. name = t.val; .)
+ | "Variant" (. name = t.val; .)
+ | "Wend" (. name = t.val; .)
+ | "When" (. name = t.val; .)
+ | "While" (. name = t.val; .)
+ | "With" (. name = t.val; .)
+ | "WithEvents" (. name = t.val; .)
+ | "WriteOnly" (. name = t.val; .)
+ | "Xor" (. name = t.val; .)
+ .
+
+/* 7.3 */
+PrimitiveTypeName<out string type>
+ (. type = String.Empty; .) =
+ "Boolean" (. type = "Boolean"; .)
+ | "Date" (. type = "Date"; .)
+ | "Char" (. type = "Char"; .)
+ | "String" (. type = "String"; .)
+ | "Decimal" (. type = "Decimal"; .)
+ | "Byte" (. type = "Byte"; .)
+ | "Short" (. type = "Short"; .)
+ | "Integer" (. type = "Integer"; .)
+ | "Long" (. type = "Long"; .)
+ | "Single" (. type = "Single"; .)
+ | "Double" (. type = "Double"; .)
+ .
+
+ParameterModifier<ParamModifiers m>
+ = "ByVal" (. m.Add(ParamModifier.ByVal); .)
+ | "ByRef" (. m.Add(ParamModifier.ByRef); .)
+ | "Optional" (. m.Add(ParamModifier.Optional); .)
+ | "ParamArray" (. m.Add(ParamModifier.ParamArray); .)
+ .
+
+TypeModifier<Modifiers m>
+ = "Public" (. m.Add(Modifier.Public); .)
+ | "Protected" (. m.Add(Modifier.Protected); .)
+ | "Friend" (. m.Add(Modifier.Friend); .)
+ | "Private" (. m.Add(Modifier.Private); .)
+ | "Shared" (. m.Add(Modifier.Shared); .)
+ | "Shadows" (. m.Add(Modifier.Shadows); .)
+ | "MustInherit" (. m.Add(Modifier.MustInherit); .)
+ | "NotInheritable" (. m.Add(Modifier.NotInheritable); .)
+ .
+
+MemberModifier<Modifiers m> =
+ "MustInherit" (.m.Add(Modifier.MustInherit);.)
+ |"Default" (.m.Add(Modifier.Default);.)
+ |"Friend" (.m.Add(Modifier.Friend);.)
+ |"Shadows" (.m.Add(Modifier.Shadows);.)
+ |"Overrides" (.m.Add(Modifier.Overrides);.)
+ |"MustOverride" (.m.Add(Modifier.MustOverride);.)
+ |"Private" (.m.Add(Modifier.Private);.)
+ |"Protected" (.m.Add(Modifier.Protected);.)
+ |"Public" (.m.Add(Modifier.Public);.)
+ |"NotInheritable" (.m.Add(Modifier.NotInheritable);.)
+ |"NotOverridable" (.m.Add(Modifier.NotOverridable);.)
+ |"Shared" (.m.Add(Modifier.Shared);.)
+ |"Overridable" (.m.Add(Modifier.Overridable);.)
+ |"Overloads" (.m.Add(Modifier.Overloads);.)
+ | "ReadOnly" (.m.Add(Modifier.ReadOnly);.)
+ | "WriteOnly" (.m.Add(Modifier.WriteOnly);.)
+ | "WithEvents" (.m.Add(Modifier.WithEvents);.)
+ | "Dim" (.m.Add(Modifier.Dim);.)
+ .
+
+END VBNET.
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/VBNET.ATG
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,4 +1,4 @@
- at echo off
-SharpCoco -namespace ICSharpCode.SharpRefactory.Parser.VB VBNET.ATG
-del Parser.old.cs
+ at echo off
+SharpCoco -namespace ICSharpCode.SharpRefactory.Parser.VB VBNET.ATG
+del Parser.old.cs
pause
\ No newline at end of file
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/buildparser.cmd
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,222 +1,222 @@
-#!/bin/perl
-
-# File names
-$keyword_file = "KeywordList.txt";
-$keywords_outfile = "Keywords.cs";
-$tokens_outfile = "Tokens.cs";
-$ATGTokensSection = "ATGTokensSection.gen";
-
-#read infile
-print "\n";
-print "Reading keyword definition from '$keyword_file'.\n";
-open(DAT, $keyword_file) || die("Could not open file!");
- at raw_data=<DAT>;
-close(DAT);
-print "done.\n";
-
-#analyse infile
-print "starting analysation ... this could take a few minutes.\n";
-
-foreach (@raw_data) {
- if ($_=~/\A\s*\$(\w+)\s*=\s*(\S+)/) {
- #properties form: $PROPERTY = "VALUE"
- $properties{$1} = $2;
- } elsif ($_=~/\A\s*(\w+)\s*=\s*(\S+)/) {
- #special characters form: name = "VALUE"
- $special_chars[$#special_chars + 1] = $1;
- $special_values[$#special_values + 1] = $2;
- } elsif ($_=~/\A\s*\"(\S+)\s*\"/) {
- #special keywords form: "VALUE"
- $keywords[$#keywords + 1] = $1
- } elsif ($_=~/\A\s*(\w+)\s*/) {
- #special terminal classes form: name
- $terminals[$#terminals + 1] = $1
- }
-}
-
-for ($i=0; $i <= $#keywords; $i++) {
- $upperKeywords[$i] = uc $keywords[$i];
-}
-sort (ascend @upperKeywords);
-
-
-sort (ascend @keywords);
-print "done.\n";
-
-#write output
-print "writing output files.\nIf your computer doesnt respond, then press \"Ctrl-Alt-Delete\"\n";
-print "\n";
-&write_keywordfile;
-print "\n";
-&write_tokensfile;
-print "\n";
-&write_atgtokensfile;
-print "\n";
-print "finished.\n";
-
-sub write_keywordfile {
- print " ->Generating Keywords class to file '$keywords_outfile'\n";
- open(DAT,">$keywords_outfile") || die("Cannot Open File");
- print DAT "// this file was autogenerated by a tool.\n";
- print DAT "using System;\n";
- print DAT "using System.Collections;\n";
- print DAT "using System.Text;\n";
- print DAT "\n";
- print DAT "namespace " . $properties{'Namespace'} . "\n";
- print DAT "{\n";
- print DAT " public class Keywords\n";
- print DAT " {\n";
- print DAT " static readonly string[] keywordList = {\n";
- if ($properties{'UpperCaseKeywords'} eq "True") {
- for ($i=0; $i <= $#upperKeywords; $i++) {
- print DAT " \"$upperKeywords[$i]\"";
- if ($i + 1 <= $#upperKeywords) {
- print DAT ",";
- }
- print DAT "\n";
- }
- } else {
- for ($i=0; $i <= $#keywords; $i++) {
- print DAT " \"$keywords[$i]\"";
- if ($i + 1 <= $#keywords) {
- print DAT ",";
- }
- print DAT "\n";
- }
- }
-
- print DAT " };\n";
- print DAT " \n";
- print DAT " static Hashtable keywords = new Hashtable();\n";
- print DAT " \n";
- print DAT " static Keywords()\n";
- print DAT " {\n";
- print DAT " for (int i = 0; i < keywordList.Length; ++i) {\n";
- print DAT " keywords.Add(keywordList[i], i + Tokens.$keywords[0]);\n";
- print DAT " }\n";
- print DAT " }\n";
- print DAT " \n";
- print DAT " public static bool IsKeyword(string identifier)\n";
- print DAT " {\n";
- if ($properties{'UpperCaseKeywords'} eq "True") {
- print DAT " return keywords[identifier.ToUpper()] != null;\n";
- } else {
- print DAT " return keywords[identifier] != null;\n";
- }
- print DAT " }\n";
- print DAT " \n";
- print DAT " public static int GetToken(string keyword)\n";
- print DAT " {\n";
- if ($properties{'UpperCaseKeywords'} eq "True") {
- print DAT " return (int)keywords[keyword.ToUpper()];\n";
- } else {
- print DAT " return (int)keywords[keyword];\n";
- }
- print DAT " }\n";
- print DAT " }\n";
- print DAT "}\n";
-
- close(DAT);
- print " ->done.\n";
-}
-
-sub write_token {
- $formattedString = sprintf("%-20s", $tokenName);
- if ($tokenName eq "GetType") {
- print DAT " new public const int $formattedString = $tokenValue;\n";
- } else {
- print DAT " public const int $formattedString = $tokenValue;\n";
- }
- $tokenValue++;
-
-}
-
-sub write_tokensfile {
- print " ->Generating Tokens class to file '$tokens_outfile'\n";
- open(DAT,">$tokens_outfile") || die("Cannot Open File");
- print DAT "// this file was autogenerated by a tool.\n";
- print DAT "using System;\n";
- print DAT "\n";
- print DAT "namespace " . $properties{'Namespace'} . "\n";
- print DAT "{\n";
- print DAT " public sealed class Tokens\n";
- print DAT " {\n";
- $tokenValue = 0;
-
- print DAT " // ----- terminal classes -----\n";
- foreach (@terminals) {
- $tokenName = $_;
- write_token();
- }
- print DAT "\n";
- print DAT " // ----- special character -----\n";
- foreach (@special_chars) {
- $tokenName = $_;
- write_token();
- }
- print DAT "\n";
- print DAT " // ----- keywords -----\n";
- foreach (@keywords) {
- $tokenName = $_;
- write_token();
- }
- print DAT "\n";
-
- print DAT " public static string GetTokenString(int token)\n";
- print DAT " {\n";
- print DAT " switch (token) {\n";
- for ($i = 0; $i <= $#special_chars; $i++) {
- print DAT " case $special_chars[$i]:\n";
- print DAT " return $special_values[$i];\n";
- }
- foreach (@keywords) {
- print DAT " case $_:\n";
- print DAT " return \"$_\";\n";
- }
-
- print DAT " }\n";
- print DAT " throw new System.NotSupportedException(\"Unknown token:\" + token);\n";
- print DAT " }\n";
- print DAT " }\n";
-
-
-
- print DAT "}\n";
- close(DAT);
- print " ->done.\n";
-}
-
-sub write_atgtokensfile {
- print " ->Generating ATG TOKENS section and writing it to file '$ATGTokensSection'\n";
- open(DAT,">$ATGTokensSection") || die("Cannot Open File");
- print DAT "/* START AUTOGENERATED TOKENS SECTION */\n";
- print DAT "TOKENS\n";
-
- print DAT " /* ----- terminal classes ----- */\n";
- print DAT " /* EOF is 0 */\n";
- foreach $term (@terminals) {
- if ($term eq "EOF") {
- } elsif ($term eq "Identifier") {
- print DAT "\tident\n";
- } else {
- print DAT "\t$term\n";
- }
-
- }
-
- print DAT "\n";
- print DAT " /* ----- special character ----- */\n";
- foreach (@special_values) {
- print DAT "\t$_\n";
- }
- print DAT "\n";
- print DAT " /* ----- keywords ----- */\n";
- foreach (@keywords) {
- print DAT "\t\"$_\"\n";
- }
-
- print DAT "/* END AUTOGENERATED TOKENS SECTION */\n";
- close(DAT);
- print " ->done.\n";
-}
-
+#!/bin/perl
+
+# File names
+$keyword_file = "KeywordList.txt";
+$keywords_outfile = "Keywords.cs";
+$tokens_outfile = "Tokens.cs";
+$ATGTokensSection = "ATGTokensSection.gen";
+
+#read infile
+print "\n";
+print "Reading keyword definition from '$keyword_file'.\n";
+open(DAT, $keyword_file) || die("Could not open file!");
+ at raw_data=<DAT>;
+close(DAT);
+print "done.\n";
+
+#analyse infile
+print "starting analysation ... this could take a few minutes.\n";
+
+foreach (@raw_data) {
+ if ($_=~/\A\s*\$(\w+)\s*=\s*(\S+)/) {
+ #properties form: $PROPERTY = "VALUE"
+ $properties{$1} = $2;
+ } elsif ($_=~/\A\s*(\w+)\s*=\s*(\S+)/) {
+ #special characters form: name = "VALUE"
+ $special_chars[$#special_chars + 1] = $1;
+ $special_values[$#special_values + 1] = $2;
+ } elsif ($_=~/\A\s*\"(\S+)\s*\"/) {
+ #special keywords form: "VALUE"
+ $keywords[$#keywords + 1] = $1
+ } elsif ($_=~/\A\s*(\w+)\s*/) {
+ #special terminal classes form: name
+ $terminals[$#terminals + 1] = $1
+ }
+}
+
+for ($i=0; $i <= $#keywords; $i++) {
+ $upperKeywords[$i] = uc $keywords[$i];
+}
+sort (ascend @upperKeywords);
+
+
+sort (ascend @keywords);
+print "done.\n";
+
+#write output
+print "writing output files.\nIf your computer doesnt respond, then press \"Ctrl-Alt-Delete\"\n";
+print "\n";
+&write_keywordfile;
+print "\n";
+&write_tokensfile;
+print "\n";
+&write_atgtokensfile;
+print "\n";
+print "finished.\n";
+
+sub write_keywordfile {
+ print " ->Generating Keywords class to file '$keywords_outfile'\n";
+ open(DAT,">$keywords_outfile") || die("Cannot Open File");
+ print DAT "// this file was autogenerated by a tool.\n";
+ print DAT "using System;\n";
+ print DAT "using System.Collections;\n";
+ print DAT "using System.Text;\n";
+ print DAT "\n";
+ print DAT "namespace " . $properties{'Namespace'} . "\n";
+ print DAT "{\n";
+ print DAT " public class Keywords\n";
+ print DAT " {\n";
+ print DAT " static readonly string[] keywordList = {\n";
+ if ($properties{'UpperCaseKeywords'} eq "True") {
+ for ($i=0; $i <= $#upperKeywords; $i++) {
+ print DAT " \"$upperKeywords[$i]\"";
+ if ($i + 1 <= $#upperKeywords) {
+ print DAT ",";
+ }
+ print DAT "\n";
+ }
+ } else {
+ for ($i=0; $i <= $#keywords; $i++) {
+ print DAT " \"$keywords[$i]\"";
+ if ($i + 1 <= $#keywords) {
+ print DAT ",";
+ }
+ print DAT "\n";
+ }
+ }
+
+ print DAT " };\n";
+ print DAT " \n";
+ print DAT " static Hashtable keywords = new Hashtable();\n";
+ print DAT " \n";
+ print DAT " static Keywords()\n";
+ print DAT " {\n";
+ print DAT " for (int i = 0; i < keywordList.Length; ++i) {\n";
+ print DAT " keywords.Add(keywordList[i], i + Tokens.$keywords[0]);\n";
+ print DAT " }\n";
+ print DAT " }\n";
+ print DAT " \n";
+ print DAT " public static bool IsKeyword(string identifier)\n";
+ print DAT " {\n";
+ if ($properties{'UpperCaseKeywords'} eq "True") {
+ print DAT " return keywords[identifier.ToUpper()] != null;\n";
+ } else {
+ print DAT " return keywords[identifier] != null;\n";
+ }
+ print DAT " }\n";
+ print DAT " \n";
+ print DAT " public static int GetToken(string keyword)\n";
+ print DAT " {\n";
+ if ($properties{'UpperCaseKeywords'} eq "True") {
+ print DAT " return (int)keywords[keyword.ToUpper()];\n";
+ } else {
+ print DAT " return (int)keywords[keyword];\n";
+ }
+ print DAT " }\n";
+ print DAT " }\n";
+ print DAT "}\n";
+
+ close(DAT);
+ print " ->done.\n";
+}
+
+sub write_token {
+ $formattedString = sprintf("%-20s", $tokenName);
+ if ($tokenName eq "GetType") {
+ print DAT " new public const int $formattedString = $tokenValue;\n";
+ } else {
+ print DAT " public const int $formattedString = $tokenValue;\n";
+ }
+ $tokenValue++;
+
+}
+
+sub write_tokensfile {
+ print " ->Generating Tokens class to file '$tokens_outfile'\n";
+ open(DAT,">$tokens_outfile") || die("Cannot Open File");
+ print DAT "// this file was autogenerated by a tool.\n";
+ print DAT "using System;\n";
+ print DAT "\n";
+ print DAT "namespace " . $properties{'Namespace'} . "\n";
+ print DAT "{\n";
+ print DAT " public sealed class Tokens\n";
+ print DAT " {\n";
+ $tokenValue = 0;
+
+ print DAT " // ----- terminal classes -----\n";
+ foreach (@terminals) {
+ $tokenName = $_;
+ write_token();
+ }
+ print DAT "\n";
+ print DAT " // ----- special character -----\n";
+ foreach (@special_chars) {
+ $tokenName = $_;
+ write_token();
+ }
+ print DAT "\n";
+ print DAT " // ----- keywords -----\n";
+ foreach (@keywords) {
+ $tokenName = $_;
+ write_token();
+ }
+ print DAT "\n";
+
+ print DAT " public static string GetTokenString(int token)\n";
+ print DAT " {\n";
+ print DAT " switch (token) {\n";
+ for ($i = 0; $i <= $#special_chars; $i++) {
+ print DAT " case $special_chars[$i]:\n";
+ print DAT " return $special_values[$i];\n";
+ }
+ foreach (@keywords) {
+ print DAT " case $_:\n";
+ print DAT " return \"$_\";\n";
+ }
+
+ print DAT " }\n";
+ print DAT " throw new System.NotSupportedException(\"Unknown token:\" + token);\n";
+ print DAT " }\n";
+ print DAT " }\n";
+
+
+
+ print DAT "}\n";
+ close(DAT);
+ print " ->done.\n";
+}
+
+sub write_atgtokensfile {
+ print " ->Generating ATG TOKENS section and writing it to file '$ATGTokensSection'\n";
+ open(DAT,">$ATGTokensSection") || die("Cannot Open File");
+ print DAT "/* START AUTOGENERATED TOKENS SECTION */\n";
+ print DAT "TOKENS\n";
+
+ print DAT " /* ----- terminal classes ----- */\n";
+ print DAT " /* EOF is 0 */\n";
+ foreach $term (@terminals) {
+ if ($term eq "EOF") {
+ } elsif ($term eq "Identifier") {
+ print DAT "\tident\n";
+ } else {
+ print DAT "\t$term\n";
+ }
+
+ }
+
+ print DAT "\n";
+ print DAT " /* ----- special character ----- */\n";
+ foreach (@special_values) {
+ print DAT "\t$_\n";
+ }
+ print DAT "\n";
+ print DAT " /* ----- keywords ----- */\n";
+ foreach (@keywords) {
+ print DAT "\t\"$_\"\n";
+ }
+
+ print DAT "/* END AUTOGENERATED TOKENS SECTION */\n";
+ close(DAT);
+ print " ->done.\n";
+}
+
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/BuildKeywords.pl
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,211 +1,211 @@
-# this list is used for autogeneration of:
-# - Keywords.cs
-# - Tokens.cs
-# - ATGTokensSection.txt - the TOKENS section of the ATG file
-
-# use BuildKeywords to generate the different lists.
-
-$Namespace=ICSharpCode.SharpRefactory.Parser.VB
-$UpperCaseKeywords=True
-
-# TERMINAL_CLASSES
-EOF
-EOL
-Identifier
-LiteralString
-LiteralCharacter
-LiteralInteger
-LiteralDouble
-LiteralSingle
-LiteralDecimal
-LiteralDate
-
-# SPECIAL_CHARACTERS
-Dot = "."
-Assign = "="
-Comma = ","
-Colon =":"
-Plus = "+"
-Minus = "-"
-Times = "*"
-Div ="/"
-DivInteger = "\\"
-ConcatString = "&"
-Power = "^"
-
-OpenCurlyBrace = "{"
-CloseCurlyBrace = "}"
-
-OpenSquareBracket = "["
-CloseSquareBracket ="]"
-
-OpenParenthesis = "("
-CloseParenthesis = ")"
-
-GreaterThan = ">"
-LessThan = "<"
-
-NotEqual = "<>"
-GreaterEqual = ">="
-LessEqual = "<="
-
-ShiftLeft = "<<"
-ShiftRight = ">>"
-
-PlusAssign = "+="
-PowerAssign = "^="
-MinusAssign = "-="
-TimesAssign = "*="
-DivAssign = "/="
-DivIntegerAssign = "\\="
-ShiftLeftAssign = "<<="
-ShiftRightAssign = ">>="
-ConcatStringAssign = "&="
-
-# keywords according to the spec:
-# Keywordlist
-"AddHandler"
-"AddressOf"
-"Alias"
-"And"
-"AndAlso"
-"Ansi"
-"As"
-"Assembly"
-"Auto"
-"Binary"
-"Boolean"
-"ByRef"
-"Byte"
-"ByVal"
-"Call"
-"Case"
-"Catch"
-"CBool"
-"CByte"
-"CChar"
-"CDate"
-"CDbl"
-"CDec"
-"Char"
-"CInt"
-"Class"
-"CLng"
-"CObj"
-"Compare"
-"Const"
-"CShort"
-"CSng"
-"CStr"
-"CType"
-"Date"
-"Decimal"
-"Declare"
-"Default"
-"Delegate"
-"Dim"
-"DirectCast"
-"Do"
-"Double"
-"Each"
-"Else"
-"ElseIf"
-"End"
-"EndIf"
-"Enum"
-"Erase"
-"Error"
-"Event"
-"Exit"
-"Explicit"
-"False"
-"Finally"
-"For"
-"Friend"
-"Function"
-"Get"
-"GetType"
-"GoSub"
-"GoTo"
-"Handles"
-"If"
-"Implements"
-"Imports"
-"In"
-"Inherits"
-"Integer"
-"Interface"
-"Is"
-"Let"
-"Lib"
-"Like"
-"Long"
-"Loop"
-"Me"
-"Mod"
-"Module"
-"MustInherit"
-"MustOverride"
-"MyBase"
-"MyClass"
-"Namespace"
-"New"
-"Next"
-"Not"
-"Nothing"
-"NotInheritable"
-"NotOverridable"
-"Object"
-"Off"
-"On"
-"Option"
-"Optional"
-"Or"
-"OrElse"
-"Overloads"
-"Overridable"
-"Override"
-"Overrides"
-"ParamArray"
-"Preserve"
-"Private"
-"Property"
-"Protected"
-"Public"
-"RaiseEvent"
-"ReadOnly"
-"ReDim"
-"RemoveHandler"
-"Resume"
-"Return"
-"Select"
-"Set"
-"Shadows"
-"Shared"
-"Short"
-"Single"
-"Static"
-"Step"
-"Stop"
-"Strict"
-"String"
-"Structure"
-"Sub"
-"SyncLock"
-"Text"
-"Then"
-"Throw"
-"To"
-"True"
-"Try"
-"TypeOf"
-"Unicode"
-"Until"
-"Variant"
-"Wend"
-"When"
-"While"
-"With"
-"WithEvents"
-"WriteOnly"
-"Xor"
+# this list is used for autogeneration of:
+# - Keywords.cs
+# - Tokens.cs
+# - ATGTokensSection.txt - the TOKENS section of the ATG file
+
+# use BuildKeywords to generate the different lists.
+
+$Namespace=ICSharpCode.SharpRefactory.Parser.VB
+$UpperCaseKeywords=True
+
+# TERMINAL_CLASSES
+EOF
+EOL
+Identifier
+LiteralString
+LiteralCharacter
+LiteralInteger
+LiteralDouble
+LiteralSingle
+LiteralDecimal
+LiteralDate
+
+# SPECIAL_CHARACTERS
+Dot = "."
+Assign = "="
+Comma = ","
+Colon =":"
+Plus = "+"
+Minus = "-"
+Times = "*"
+Div ="/"
+DivInteger = "\\"
+ConcatString = "&"
+Power = "^"
+
+OpenCurlyBrace = "{"
+CloseCurlyBrace = "}"
+
+OpenSquareBracket = "["
+CloseSquareBracket ="]"
+
+OpenParenthesis = "("
+CloseParenthesis = ")"
+
+GreaterThan = ">"
+LessThan = "<"
+
+NotEqual = "<>"
+GreaterEqual = ">="
+LessEqual = "<="
+
+ShiftLeft = "<<"
+ShiftRight = ">>"
+
+PlusAssign = "+="
+PowerAssign = "^="
+MinusAssign = "-="
+TimesAssign = "*="
+DivAssign = "/="
+DivIntegerAssign = "\\="
+ShiftLeftAssign = "<<="
+ShiftRightAssign = ">>="
+ConcatStringAssign = "&="
+
+# keywords according to the spec:
+# Keywordlist
+"AddHandler"
+"AddressOf"
+"Alias"
+"And"
+"AndAlso"
+"Ansi"
+"As"
+"Assembly"
+"Auto"
+"Binary"
+"Boolean"
+"ByRef"
+"Byte"
+"ByVal"
+"Call"
+"Case"
+"Catch"
+"CBool"
+"CByte"
+"CChar"
+"CDate"
+"CDbl"
+"CDec"
+"Char"
+"CInt"
+"Class"
+"CLng"
+"CObj"
+"Compare"
+"Const"
+"CShort"
+"CSng"
+"CStr"
+"CType"
+"Date"
+"Decimal"
+"Declare"
+"Default"
+"Delegate"
+"Dim"
+"DirectCast"
+"Do"
+"Double"
+"Each"
+"Else"
+"ElseIf"
+"End"
+"EndIf"
+"Enum"
+"Erase"
+"Error"
+"Event"
+"Exit"
+"Explicit"
+"False"
+"Finally"
+"For"
+"Friend"
+"Function"
+"Get"
+"GetType"
+"GoSub"
+"GoTo"
+"Handles"
+"If"
+"Implements"
+"Imports"
+"In"
+"Inherits"
+"Integer"
+"Interface"
+"Is"
+"Let"
+"Lib"
+"Like"
+"Long"
+"Loop"
+"Me"
+"Mod"
+"Module"
+"MustInherit"
+"MustOverride"
+"MyBase"
+"MyClass"
+"Namespace"
+"New"
+"Next"
+"Not"
+"Nothing"
+"NotInheritable"
+"NotOverridable"
+"Object"
+"Off"
+"On"
+"Option"
+"Optional"
+"Or"
+"OrElse"
+"Overloads"
+"Overridable"
+"Override"
+"Overrides"
+"ParamArray"
+"Preserve"
+"Private"
+"Property"
+"Protected"
+"Public"
+"RaiseEvent"
+"ReadOnly"
+"ReDim"
+"RemoveHandler"
+"Resume"
+"Return"
+"Select"
+"Set"
+"Shadows"
+"Shared"
+"Short"
+"Single"
+"Static"
+"Step"
+"Stop"
+"Strict"
+"String"
+"Structure"
+"Sub"
+"SyncLock"
+"Text"
+"Then"
+"Throw"
+"To"
+"True"
+"Try"
+"TypeOf"
+"Unicode"
+"Until"
+"Variant"
+"Wend"
+"When"
+"While"
+"With"
+"WithEvents"
+"WriteOnly"
+"Xor"
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/KeywordList.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,177 +1,177 @@
-// this file was autogenerated by a tool.
-using System;
-using System.Collections;
-using System.Text;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public class Keywords
- {
- static readonly string[] keywordList = {
- "ADDHANDLER",
- "ADDRESSOF",
- "ALIAS",
- "AND",
- "ANDALSO",
- "ANSI",
- "AS",
- "ASSEMBLY",
- "AUTO",
- "BINARY",
- "BOOLEAN",
- "BYREF",
- "BYTE",
- "BYVAL",
- "CALL",
- "CASE",
- "CATCH",
- "CBOOL",
- "CBYTE",
- "CCHAR",
- "CDATE",
- "CDBL",
- "CDEC",
- "CHAR",
- "CINT",
- "CLASS",
- "CLNG",
- "COBJ",
- "COMPARE",
- "CONST",
- "CSHORT",
- "CSNG",
- "CSTR",
- "CTYPE",
- "DATE",
- "DECIMAL",
- "DECLARE",
- "DEFAULT",
- "DELEGATE",
- "DIM",
- "DIRECTCAST",
- "DO",
- "DOUBLE",
- "EACH",
- "ELSE",
- "ELSEIF",
- "END",
- "ENDIF",
- "ENUM",
- "ERASE",
- "ERROR",
- "EVENT",
- "EXIT",
- "EXPLICIT",
- "FALSE",
- "FINALLY",
- "FOR",
- "FRIEND",
- "FUNCTION",
- "GET",
- "GETTYPE",
- "GOSUB",
- "GOTO",
- "HANDLES",
- "IF",
- "IMPLEMENTS",
- "IMPORTS",
- "IN",
- "INHERITS",
- "INTEGER",
- "INTERFACE",
- "IS",
- "LET",
- "LIB",
- "LIKE",
- "LONG",
- "LOOP",
- "ME",
- "MOD",
- "MODULE",
- "MUSTINHERIT",
- "MUSTOVERRIDE",
- "MYBASE",
- "MYCLASS",
- "NAMESPACE",
- "NEW",
- "NEXT",
- "NOT",
- "NOTHING",
- "NOTINHERITABLE",
- "NOTOVERRIDABLE",
- "OBJECT",
- "OFF",
- "ON",
- "OPTION",
- "OPTIONAL",
- "OR",
- "ORELSE",
- "OVERLOADS",
- "OVERRIDABLE",
- "OVERRIDE",
- "OVERRIDES",
- "PARAMARRAY",
- "PRESERVE",
- "PRIVATE",
- "PROPERTY",
- "PROTECTED",
- "PUBLIC",
- "RAISEEVENT",
- "READONLY",
- "REDIM",
- "REMOVEHANDLER",
- "RESUME",
- "RETURN",
- "SELECT",
- "SET",
- "SHADOWS",
- "SHARED",
- "SHORT",
- "SINGLE",
- "STATIC",
- "STEP",
- "STOP",
- "STRICT",
- "STRING",
- "STRUCTURE",
- "SUB",
- "SYNCLOCK",
- "TEXT",
- "THEN",
- "THROW",
- "TO",
- "TRUE",
- "TRY",
- "TYPEOF",
- "UNICODE",
- "UNTIL",
- "VARIANT",
- "WEND",
- "WHEN",
- "WHILE",
- "WITH",
- "WITHEVENTS",
- "WRITEONLY",
- "XOR"
- };
-
- static Hashtable keywords = new Hashtable();
-
- static Keywords()
- {
- for (int i = 0; i < keywordList.Length; ++i) {
- keywords.Add(keywordList[i], i + Tokens.AddHandler);
- }
- }
-
- public static bool IsKeyword(string identifier)
- {
- return keywords[identifier.ToUpper()] != null;
- }
-
- public static int GetToken(string keyword)
- {
- return (int)keywords[keyword.ToUpper()];
- }
- }
-}
+// this file was autogenerated by a tool.
+using System;
+using System.Collections;
+using System.Text;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public class Keywords
+ {
+ static readonly string[] keywordList = {
+ "ADDHANDLER",
+ "ADDRESSOF",
+ "ALIAS",
+ "AND",
+ "ANDALSO",
+ "ANSI",
+ "AS",
+ "ASSEMBLY",
+ "AUTO",
+ "BINARY",
+ "BOOLEAN",
+ "BYREF",
+ "BYTE",
+ "BYVAL",
+ "CALL",
+ "CASE",
+ "CATCH",
+ "CBOOL",
+ "CBYTE",
+ "CCHAR",
+ "CDATE",
+ "CDBL",
+ "CDEC",
+ "CHAR",
+ "CINT",
+ "CLASS",
+ "CLNG",
+ "COBJ",
+ "COMPARE",
+ "CONST",
+ "CSHORT",
+ "CSNG",
+ "CSTR",
+ "CTYPE",
+ "DATE",
+ "DECIMAL",
+ "DECLARE",
+ "DEFAULT",
+ "DELEGATE",
+ "DIM",
+ "DIRECTCAST",
+ "DO",
+ "DOUBLE",
+ "EACH",
+ "ELSE",
+ "ELSEIF",
+ "END",
+ "ENDIF",
+ "ENUM",
+ "ERASE",
+ "ERROR",
+ "EVENT",
+ "EXIT",
+ "EXPLICIT",
+ "FALSE",
+ "FINALLY",
+ "FOR",
+ "FRIEND",
+ "FUNCTION",
+ "GET",
+ "GETTYPE",
+ "GOSUB",
+ "GOTO",
+ "HANDLES",
+ "IF",
+ "IMPLEMENTS",
+ "IMPORTS",
+ "IN",
+ "INHERITS",
+ "INTEGER",
+ "INTERFACE",
+ "IS",
+ "LET",
+ "LIB",
+ "LIKE",
+ "LONG",
+ "LOOP",
+ "ME",
+ "MOD",
+ "MODULE",
+ "MUSTINHERIT",
+ "MUSTOVERRIDE",
+ "MYBASE",
+ "MYCLASS",
+ "NAMESPACE",
+ "NEW",
+ "NEXT",
+ "NOT",
+ "NOTHING",
+ "NOTINHERITABLE",
+ "NOTOVERRIDABLE",
+ "OBJECT",
+ "OFF",
+ "ON",
+ "OPTION",
+ "OPTIONAL",
+ "OR",
+ "ORELSE",
+ "OVERLOADS",
+ "OVERRIDABLE",
+ "OVERRIDE",
+ "OVERRIDES",
+ "PARAMARRAY",
+ "PRESERVE",
+ "PRIVATE",
+ "PROPERTY",
+ "PROTECTED",
+ "PUBLIC",
+ "RAISEEVENT",
+ "READONLY",
+ "REDIM",
+ "REMOVEHANDLER",
+ "RESUME",
+ "RETURN",
+ "SELECT",
+ "SET",
+ "SHADOWS",
+ "SHARED",
+ "SHORT",
+ "SINGLE",
+ "STATIC",
+ "STEP",
+ "STOP",
+ "STRICT",
+ "STRING",
+ "STRUCTURE",
+ "SUB",
+ "SYNCLOCK",
+ "TEXT",
+ "THEN",
+ "THROW",
+ "TO",
+ "TRUE",
+ "TRY",
+ "TYPEOF",
+ "UNICODE",
+ "UNTIL",
+ "VARIANT",
+ "WEND",
+ "WHEN",
+ "WHILE",
+ "WITH",
+ "WITHEVENTS",
+ "WRITEONLY",
+ "XOR"
+ };
+
+ static Hashtable keywords = new Hashtable();
+
+ static Keywords()
+ {
+ for (int i = 0; i < keywordList.Length; ++i) {
+ keywords.Add(keywordList[i], i + Tokens.AddHandler);
+ }
+ }
+
+ public static bool IsKeyword(string identifier)
+ {
+ return keywords[identifier.ToUpper()] != null;
+ }
+
+ public static int GetToken(string keyword)
+ {
+ return (int)keywords[keyword.ToUpper()];
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Keywords.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,565 +1,565 @@
-// this file was autogenerated by a tool.
-using System;
-
-namespace ICSharpCode.SharpRefactory.Parser.VB
-{
- public sealed class Tokens
- {
- // ----- terminal classes -----
- public const int EOF = 0;
- public const int EOL = 1;
- public const int Identifier = 2;
- public const int LiteralString = 3;
- public const int LiteralCharacter = 4;
- public const int LiteralInteger = 5;
- public const int LiteralDouble = 6;
- public const int LiteralSingle = 7;
- public const int LiteralDecimal = 8;
- public const int LiteralDate = 9;
-
- // ----- special character -----
- public const int Dot = 10;
- public const int Assign = 11;
- public const int Comma = 12;
- public const int Colon = 13;
- public const int Plus = 14;
- public const int Minus = 15;
- public const int Times = 16;
- public const int Div = 17;
- public const int DivInteger = 18;
- public const int ConcatString = 19;
- public const int Power = 20;
- public const int OpenCurlyBrace = 21;
- public const int CloseCurlyBrace = 22;
- public const int OpenSquareBracket = 23;
- public const int CloseSquareBracket = 24;
- public const int OpenParenthesis = 25;
- public const int CloseParenthesis = 26;
- public const int GreaterThan = 27;
- public const int LessThan = 28;
- public const int NotEqual = 29;
- public const int GreaterEqual = 30;
- public const int LessEqual = 31;
- public const int ShiftLeft = 32;
- public const int ShiftRight = 33;
- public const int PlusAssign = 34;
- public const int PowerAssign = 35;
- public const int MinusAssign = 36;
- public const int TimesAssign = 37;
- public const int DivAssign = 38;
- public const int DivIntegerAssign = 39;
- public const int ShiftLeftAssign = 40;
- public const int ShiftRightAssign = 41;
- public const int ConcatStringAssign = 42;
-
- // ----- keywords -----
- public const int AddHandler = 43;
- public const int AddressOf = 44;
- public const int Alias = 45;
- public const int And = 46;
- public const int AndAlso = 47;
- public const int Ansi = 48;
- public const int As = 49;
- public const int Assembly = 50;
- public const int Auto = 51;
- public const int Binary = 52;
- public const int Boolean = 53;
- public const int ByRef = 54;
- public const int Byte = 55;
- public const int ByVal = 56;
- public const int Call = 57;
- public const int Case = 58;
- public const int Catch = 59;
- public const int CBool = 60;
- public const int CByte = 61;
- public const int CChar = 62;
- public const int CDate = 63;
- public const int CDbl = 64;
- public const int CDec = 65;
- public const int Char = 66;
- public const int CInt = 67;
- public const int Class = 68;
- public const int CLng = 69;
- public const int CObj = 70;
- public const int Compare = 71;
- public const int Const = 72;
- public const int CShort = 73;
- public const int CSng = 74;
- public const int CStr = 75;
- public const int CType = 76;
- public const int Date = 77;
- public const int Decimal = 78;
- public const int Declare = 79;
- public const int Default = 80;
- public const int Delegate = 81;
- public const int Dim = 82;
- public const int DirectCast = 83;
- public const int Do = 84;
- public const int Double = 85;
- public const int Each = 86;
- public const int Else = 87;
- public const int ElseIf = 88;
- public const int End = 89;
- public const int EndIf = 90;
- public const int Enum = 91;
- public const int Erase = 92;
- public const int Error = 93;
- public const int Event = 94;
- public const int Exit = 95;
- public const int Explicit = 96;
- public const int False = 97;
- public const int Finally = 98;
- public const int For = 99;
- public const int Friend = 100;
- public const int Function = 101;
- public const int Get = 102;
- new public const int GetType = 103;
- public const int GoSub = 104;
- public const int GoTo = 105;
- public const int Handles = 106;
- public const int If = 107;
- public const int Implements = 108;
- public const int Imports = 109;
- public const int In = 110;
- public const int Inherits = 111;
- public const int Integer = 112;
- public const int Interface = 113;
- public const int Is = 114;
- public const int Let = 115;
- public const int Lib = 116;
- public const int Like = 117;
- public const int Long = 118;
- public const int Loop = 119;
- public const int Me = 120;
- public const int Mod = 121;
- public const int Module = 122;
- public const int MustInherit = 123;
- public const int MustOverride = 124;
- public const int MyBase = 125;
- public const int MyClass = 126;
- public const int Namespace = 127;
- public const int New = 128;
- public const int Next = 129;
- public const int Not = 130;
- public const int Nothing = 131;
- public const int NotInheritable = 132;
- public const int NotOverridable = 133;
- public const int Object = 134;
- public const int Off = 135;
- public const int On = 136;
- public const int Option = 137;
- public const int Optional = 138;
- public const int Or = 139;
- public const int OrElse = 140;
- public const int Overloads = 141;
- public const int Overridable = 142;
- public const int Override = 143;
- public const int Overrides = 144;
- public const int ParamArray = 145;
- public const int Preserve = 146;
- public const int Private = 147;
- public const int Property = 148;
- public const int Protected = 149;
- public const int Public = 150;
- public const int RaiseEvent = 151;
- public const int ReadOnly = 152;
- public const int ReDim = 153;
- public const int RemoveHandler = 154;
- public const int Resume = 155;
- public const int Return = 156;
- public const int Select = 157;
- public const int Set = 158;
- public const int Shadows = 159;
- public const int Shared = 160;
- public const int Short = 161;
- public const int Single = 162;
- public const int Static = 163;
- public const int Step = 164;
- public const int Stop = 165;
- public const int Strict = 166;
- public const int String = 167;
- public const int Structure = 168;
- public const int Sub = 169;
- public const int SyncLock = 170;
- public const int Text = 171;
- public const int Then = 172;
- public const int Throw = 173;
- public const int To = 174;
- public const int True = 175;
- public const int Try = 176;
- public const int TypeOf = 177;
- public const int Unicode = 178;
- public const int Until = 179;
- public const int Variant = 180;
- public const int Wend = 181;
- public const int When = 182;
- public const int While = 183;
- public const int With = 184;
- public const int WithEvents = 185;
- public const int WriteOnly = 186;
- public const int Xor = 187;
-
- string GetTokenString(int token)
- {
- switch (token) {
- case Dot:
- return ".";
- case Assign:
- return "=";
- case Comma:
- return ",";
- case Colon:
- return ":";
- case Plus:
- return "+";
- case Minus:
- return "-";
- case Times:
- return "*";
- case Div:
- return "/";
- case DivInteger:
- return "\\";
- case ConcatString:
- return "&";
- case Power:
- return "^";
- case OpenCurlyBrace:
- return "{";
- case CloseCurlyBrace:
- return "}";
- case OpenSquareBracket:
- return "[";
- case CloseSquareBracket:
- return "]";
- case OpenParenthesis:
- return "(";
- case CloseParenthesis:
- return ")";
- case GreaterThan:
- return ">";
- case LessThan:
- return "<";
- case NotEqual:
- return "<>";
- case GreaterEqual:
- return ">=";
- case LessEqual:
- return "<=";
- case ShiftLeft:
- return "<<";
- case ShiftRight:
- return ">>";
- case PlusAssign:
- return "+=";
- case PowerAssign:
- return "^=";
- case MinusAssign:
- return "-=";
- case TimesAssign:
- return "*=";
- case DivAssign:
- return "/=";
- case DivIntegerAssign:
- return "\\=";
- case ShiftLeftAssign:
- return "<<=";
- case ShiftRightAssign:
- return ">>=";
- case ConcatStringAssign:
- return "&=";
- case AddHandler:
- return "AddHandler";
- case AddressOf:
- return "AddressOf";
- case Alias:
- return "Alias";
- case And:
- return "And";
- case AndAlso:
- return "AndAlso";
- case Ansi:
- return "Ansi";
- case As:
- return "As";
- case Assembly:
- return "Assembly";
- case Auto:
- return "Auto";
- case Binary:
- return "Binary";
- case Boolean:
- return "Boolean";
- case ByRef:
- return "ByRef";
- case Byte:
- return "Byte";
- case ByVal:
- return "ByVal";
- case Call:
- return "Call";
- case Case:
- return "Case";
- case Catch:
- return "Catch";
- case CBool:
- return "CBool";
- case CByte:
- return "CByte";
- case CChar:
- return "CChar";
- case CDate:
- return "CDate";
- case CDbl:
- return "CDbl";
- case CDec:
- return "CDec";
- case Char:
- return "Char";
- case CInt:
- return "CInt";
- case Class:
- return "Class";
- case CLng:
- return "CLng";
- case CObj:
- return "CObj";
- case Compare:
- return "Compare";
- case Const:
- return "Const";
- case CShort:
- return "CShort";
- case CSng:
- return "CSng";
- case CStr:
- return "CStr";
- case CType:
- return "CType";
- case Date:
- return "Date";
- case Decimal:
- return "Decimal";
- case Declare:
- return "Declare";
- case Default:
- return "Default";
- case Delegate:
- return "Delegate";
- case Dim:
- return "Dim";
- case DirectCast:
- return "DirectCast";
- case Do:
- return "Do";
- case Double:
- return "Double";
- case Each:
- return "Each";
- case Else:
- return "Else";
- case ElseIf:
- return "ElseIf";
- case End:
- return "End";
- case EndIf:
- return "EndIf";
- case Enum:
- return "Enum";
- case Erase:
- return "Erase";
- case Error:
- return "Error";
- case Event:
- return "Event";
- case Exit:
- return "Exit";
- case Explicit:
- return "Explicit";
- case False:
- return "False";
- case Finally:
- return "Finally";
- case For:
- return "For";
- case Friend:
- return "Friend";
- case Function:
- return "Function";
- case Get:
- return "Get";
- case GetType:
- return "GetType";
- case GoSub:
- return "GoSub";
- case GoTo:
- return "GoTo";
- case Handles:
- return "Handles";
- case If:
- return "If";
- case Implements:
- return "Implements";
- case Imports:
- return "Imports";
- case In:
- return "In";
- case Inherits:
- return "Inherits";
- case Integer:
- return "Integer";
- case Interface:
- return "Interface";
- case Is:
- return "Is";
- case Let:
- return "Let";
- case Lib:
- return "Lib";
- case Like:
- return "Like";
- case Long:
- return "Long";
- case Loop:
- return "Loop";
- case Me:
- return "Me";
- case Mod:
- return "Mod";
- case Module:
- return "Module";
- case MustInherit:
- return "MustInherit";
- case MustOverride:
- return "MustOverride";
- case MyBase:
- return "MyBase";
- case MyClass:
- return "MyClass";
- case Namespace:
- return "Namespace";
- case New:
- return "New";
- case Next:
- return "Next";
- case Not:
- return "Not";
- case Nothing:
- return "Nothing";
- case NotInheritable:
- return "NotInheritable";
- case NotOverridable:
- return "NotOverridable";
- case Object:
- return "Object";
- case Off:
- return "Off";
- case On:
- return "On";
- case Option:
- return "Option";
- case Optional:
- return "Optional";
- case Or:
- return "Or";
- case OrElse:
- return "OrElse";
- case Overloads:
- return "Overloads";
- case Overridable:
- return "Overridable";
- case Override:
- return "Override";
- case Overrides:
- return "Overrides";
- case ParamArray:
- return "ParamArray";
- case Preserve:
- return "Preserve";
- case Private:
- return "Private";
- case Property:
- return "Property";
- case Protected:
- return "Protected";
- case Public:
- return "Public";
- case RaiseEvent:
- return "RaiseEvent";
- case ReadOnly:
- return "ReadOnly";
- case ReDim:
- return "ReDim";
- case RemoveHandler:
- return "RemoveHandler";
- case Resume:
- return "Resume";
- case Return:
- return "Return";
- case Select:
- return "Select";
- case Set:
- return "Set";
- case Shadows:
- return "Shadows";
- case Shared:
- return "Shared";
- case Short:
- return "Short";
- case Single:
- return "Single";
- case Static:
- return "Static";
- case Step:
- return "Step";
- case Stop:
- return "Stop";
- case Strict:
- return "Strict";
- case String:
- return "String";
- case Structure:
- return "Structure";
- case Sub:
- return "Sub";
- case SyncLock:
- return "SyncLock";
- case Text:
- return "Text";
- case Then:
- return "Then";
- case Throw:
- return "Throw";
- case To:
- return "To";
- case True:
- return "True";
- case Try:
- return "Try";
- case TypeOf:
- return "TypeOf";
- case Unicode:
- return "Unicode";
- case Until:
- return "Until";
- case Variant:
- return "Variant";
- case Wend:
- return "Wend";
- case When:
- return "When";
- case While:
- return "While";
- case With:
- return "With";
- case WithEvents:
- return "WithEvents";
- case WriteOnly:
- return "WriteOnly";
- case Xor:
- return "Xor";
- }
- throw new System.NotSupportedException("Unknown token:" + token);
- }
- }
-}
+// this file was autogenerated by a tool.
+using System;
+
+namespace ICSharpCode.SharpRefactory.Parser.VB
+{
+ public sealed class Tokens
+ {
+ // ----- terminal classes -----
+ public const int EOF = 0;
+ public const int EOL = 1;
+ public const int Identifier = 2;
+ public const int LiteralString = 3;
+ public const int LiteralCharacter = 4;
+ public const int LiteralInteger = 5;
+ public const int LiteralDouble = 6;
+ public const int LiteralSingle = 7;
+ public const int LiteralDecimal = 8;
+ public const int LiteralDate = 9;
+
+ // ----- special character -----
+ public const int Dot = 10;
+ public const int Assign = 11;
+ public const int Comma = 12;
+ public const int Colon = 13;
+ public const int Plus = 14;
+ public const int Minus = 15;
+ public const int Times = 16;
+ public const int Div = 17;
+ public const int DivInteger = 18;
+ public const int ConcatString = 19;
+ public const int Power = 20;
+ public const int OpenCurlyBrace = 21;
+ public const int CloseCurlyBrace = 22;
+ public const int OpenSquareBracket = 23;
+ public const int CloseSquareBracket = 24;
+ public const int OpenParenthesis = 25;
+ public const int CloseParenthesis = 26;
+ public const int GreaterThan = 27;
+ public const int LessThan = 28;
+ public const int NotEqual = 29;
+ public const int GreaterEqual = 30;
+ public const int LessEqual = 31;
+ public const int ShiftLeft = 32;
+ public const int ShiftRight = 33;
+ public const int PlusAssign = 34;
+ public const int PowerAssign = 35;
+ public const int MinusAssign = 36;
+ public const int TimesAssign = 37;
+ public const int DivAssign = 38;
+ public const int DivIntegerAssign = 39;
+ public const int ShiftLeftAssign = 40;
+ public const int ShiftRightAssign = 41;
+ public const int ConcatStringAssign = 42;
+
+ // ----- keywords -----
+ public const int AddHandler = 43;
+ public const int AddressOf = 44;
+ public const int Alias = 45;
+ public const int And = 46;
+ public const int AndAlso = 47;
+ public const int Ansi = 48;
+ public const int As = 49;
+ public const int Assembly = 50;
+ public const int Auto = 51;
+ public const int Binary = 52;
+ public const int Boolean = 53;
+ public const int ByRef = 54;
+ public const int Byte = 55;
+ public const int ByVal = 56;
+ public const int Call = 57;
+ public const int Case = 58;
+ public const int Catch = 59;
+ public const int CBool = 60;
+ public const int CByte = 61;
+ public const int CChar = 62;
+ public const int CDate = 63;
+ public const int CDbl = 64;
+ public const int CDec = 65;
+ public const int Char = 66;
+ public const int CInt = 67;
+ public const int Class = 68;
+ public const int CLng = 69;
+ public const int CObj = 70;
+ public const int Compare = 71;
+ public const int Const = 72;
+ public const int CShort = 73;
+ public const int CSng = 74;
+ public const int CStr = 75;
+ public const int CType = 76;
+ public const int Date = 77;
+ public const int Decimal = 78;
+ public const int Declare = 79;
+ public const int Default = 80;
+ public const int Delegate = 81;
+ public const int Dim = 82;
+ public const int DirectCast = 83;
+ public const int Do = 84;
+ public const int Double = 85;
+ public const int Each = 86;
+ public const int Else = 87;
+ public const int ElseIf = 88;
+ public const int End = 89;
+ public const int EndIf = 90;
+ public const int Enum = 91;
+ public const int Erase = 92;
+ public const int Error = 93;
+ public const int Event = 94;
+ public const int Exit = 95;
+ public const int Explicit = 96;
+ public const int False = 97;
+ public const int Finally = 98;
+ public const int For = 99;
+ public const int Friend = 100;
+ public const int Function = 101;
+ public const int Get = 102;
+ new public const int GetType = 103;
+ public const int GoSub = 104;
+ public const int GoTo = 105;
+ public const int Handles = 106;
+ public const int If = 107;
+ public const int Implements = 108;
+ public const int Imports = 109;
+ public const int In = 110;
+ public const int Inherits = 111;
+ public const int Integer = 112;
+ public const int Interface = 113;
+ public const int Is = 114;
+ public const int Let = 115;
+ public const int Lib = 116;
+ public const int Like = 117;
+ public const int Long = 118;
+ public const int Loop = 119;
+ public const int Me = 120;
+ public const int Mod = 121;
+ public const int Module = 122;
+ public const int MustInherit = 123;
+ public const int MustOverride = 124;
+ public const int MyBase = 125;
+ public const int MyClass = 126;
+ public const int Namespace = 127;
+ public const int New = 128;
+ public const int Next = 129;
+ public const int Not = 130;
+ public const int Nothing = 131;
+ public const int NotInheritable = 132;
+ public const int NotOverridable = 133;
+ public const int Object = 134;
+ public const int Off = 135;
+ public const int On = 136;
+ public const int Option = 137;
+ public const int Optional = 138;
+ public const int Or = 139;
+ public const int OrElse = 140;
+ public const int Overloads = 141;
+ public const int Overridable = 142;
+ public const int Override = 143;
+ public const int Overrides = 144;
+ public const int ParamArray = 145;
+ public const int Preserve = 146;
+ public const int Private = 147;
+ public const int Property = 148;
+ public const int Protected = 149;
+ public const int Public = 150;
+ public const int RaiseEvent = 151;
+ public const int ReadOnly = 152;
+ public const int ReDim = 153;
+ public const int RemoveHandler = 154;
+ public const int Resume = 155;
+ public const int Return = 156;
+ public const int Select = 157;
+ public const int Set = 158;
+ public const int Shadows = 159;
+ public const int Shared = 160;
+ public const int Short = 161;
+ public const int Single = 162;
+ public const int Static = 163;
+ public const int Step = 164;
+ public const int Stop = 165;
+ public const int Strict = 166;
+ public const int String = 167;
+ public const int Structure = 168;
+ public const int Sub = 169;
+ public const int SyncLock = 170;
+ public const int Text = 171;
+ public const int Then = 172;
+ public const int Throw = 173;
+ public const int To = 174;
+ public const int True = 175;
+ public const int Try = 176;
+ public const int TypeOf = 177;
+ public const int Unicode = 178;
+ public const int Until = 179;
+ public const int Variant = 180;
+ public const int Wend = 181;
+ public const int When = 182;
+ public const int While = 183;
+ public const int With = 184;
+ public const int WithEvents = 185;
+ public const int WriteOnly = 186;
+ public const int Xor = 187;
+
+ string GetTokenString(int token)
+ {
+ switch (token) {
+ case Dot:
+ return ".";
+ case Assign:
+ return "=";
+ case Comma:
+ return ",";
+ case Colon:
+ return ":";
+ case Plus:
+ return "+";
+ case Minus:
+ return "-";
+ case Times:
+ return "*";
+ case Div:
+ return "/";
+ case DivInteger:
+ return "\\";
+ case ConcatString:
+ return "&";
+ case Power:
+ return "^";
+ case OpenCurlyBrace:
+ return "{";
+ case CloseCurlyBrace:
+ return "}";
+ case OpenSquareBracket:
+ return "[";
+ case CloseSquareBracket:
+ return "]";
+ case OpenParenthesis:
+ return "(";
+ case CloseParenthesis:
+ return ")";
+ case GreaterThan:
+ return ">";
+ case LessThan:
+ return "<";
+ case NotEqual:
+ return "<>";
+ case GreaterEqual:
+ return ">=";
+ case LessEqual:
+ return "<=";
+ case ShiftLeft:
+ return "<<";
+ case ShiftRight:
+ return ">>";
+ case PlusAssign:
+ return "+=";
+ case PowerAssign:
+ return "^=";
+ case MinusAssign:
+ return "-=";
+ case TimesAssign:
+ return "*=";
+ case DivAssign:
+ return "/=";
+ case DivIntegerAssign:
+ return "\\=";
+ case ShiftLeftAssign:
+ return "<<=";
+ case ShiftRightAssign:
+ return ">>=";
+ case ConcatStringAssign:
+ return "&=";
+ case AddHandler:
+ return "AddHandler";
+ case AddressOf:
+ return "AddressOf";
+ case Alias:
+ return "Alias";
+ case And:
+ return "And";
+ case AndAlso:
+ return "AndAlso";
+ case Ansi:
+ return "Ansi";
+ case As:
+ return "As";
+ case Assembly:
+ return "Assembly";
+ case Auto:
+ return "Auto";
+ case Binary:
+ return "Binary";
+ case Boolean:
+ return "Boolean";
+ case ByRef:
+ return "ByRef";
+ case Byte:
+ return "Byte";
+ case ByVal:
+ return "ByVal";
+ case Call:
+ return "Call";
+ case Case:
+ return "Case";
+ case Catch:
+ return "Catch";
+ case CBool:
+ return "CBool";
+ case CByte:
+ return "CByte";
+ case CChar:
+ return "CChar";
+ case CDate:
+ return "CDate";
+ case CDbl:
+ return "CDbl";
+ case CDec:
+ return "CDec";
+ case Char:
+ return "Char";
+ case CInt:
+ return "CInt";
+ case Class:
+ return "Class";
+ case CLng:
+ return "CLng";
+ case CObj:
+ return "CObj";
+ case Compare:
+ return "Compare";
+ case Const:
+ return "Const";
+ case CShort:
+ return "CShort";
+ case CSng:
+ return "CSng";
+ case CStr:
+ return "CStr";
+ case CType:
+ return "CType";
+ case Date:
+ return "Date";
+ case Decimal:
+ return "Decimal";
+ case Declare:
+ return "Declare";
+ case Default:
+ return "Default";
+ case Delegate:
+ return "Delegate";
+ case Dim:
+ return "Dim";
+ case DirectCast:
+ return "DirectCast";
+ case Do:
+ return "Do";
+ case Double:
+ return "Double";
+ case Each:
+ return "Each";
+ case Else:
+ return "Else";
+ case ElseIf:
+ return "ElseIf";
+ case End:
+ return "End";
+ case EndIf:
+ return "EndIf";
+ case Enum:
+ return "Enum";
+ case Erase:
+ return "Erase";
+ case Error:
+ return "Error";
+ case Event:
+ return "Event";
+ case Exit:
+ return "Exit";
+ case Explicit:
+ return "Explicit";
+ case False:
+ return "False";
+ case Finally:
+ return "Finally";
+ case For:
+ return "For";
+ case Friend:
+ return "Friend";
+ case Function:
+ return "Function";
+ case Get:
+ return "Get";
+ case GetType:
+ return "GetType";
+ case GoSub:
+ return "GoSub";
+ case GoTo:
+ return "GoTo";
+ case Handles:
+ return "Handles";
+ case If:
+ return "If";
+ case Implements:
+ return "Implements";
+ case Imports:
+ return "Imports";
+ case In:
+ return "In";
+ case Inherits:
+ return "Inherits";
+ case Integer:
+ return "Integer";
+ case Interface:
+ return "Interface";
+ case Is:
+ return "Is";
+ case Let:
+ return "Let";
+ case Lib:
+ return "Lib";
+ case Like:
+ return "Like";
+ case Long:
+ return "Long";
+ case Loop:
+ return "Loop";
+ case Me:
+ return "Me";
+ case Mod:
+ return "Mod";
+ case Module:
+ return "Module";
+ case MustInherit:
+ return "MustInherit";
+ case MustOverride:
+ return "MustOverride";
+ case MyBase:
+ return "MyBase";
+ case MyClass:
+ return "MyClass";
+ case Namespace:
+ return "Namespace";
+ case New:
+ return "New";
+ case Next:
+ return "Next";
+ case Not:
+ return "Not";
+ case Nothing:
+ return "Nothing";
+ case NotInheritable:
+ return "NotInheritable";
+ case NotOverridable:
+ return "NotOverridable";
+ case Object:
+ return "Object";
+ case Off:
+ return "Off";
+ case On:
+ return "On";
+ case Option:
+ return "Option";
+ case Optional:
+ return "Optional";
+ case Or:
+ return "Or";
+ case OrElse:
+ return "OrElse";
+ case Overloads:
+ return "Overloads";
+ case Overridable:
+ return "Overridable";
+ case Override:
+ return "Override";
+ case Overrides:
+ return "Overrides";
+ case ParamArray:
+ return "ParamArray";
+ case Preserve:
+ return "Preserve";
+ case Private:
+ return "Private";
+ case Property:
+ return "Property";
+ case Protected:
+ return "Protected";
+ case Public:
+ return "Public";
+ case RaiseEvent:
+ return "RaiseEvent";
+ case ReadOnly:
+ return "ReadOnly";
+ case ReDim:
+ return "ReDim";
+ case RemoveHandler:
+ return "RemoveHandler";
+ case Resume:
+ return "Resume";
+ case Return:
+ return "Return";
+ case Select:
+ return "Select";
+ case Set:
+ return "Set";
+ case Shadows:
+ return "Shadows";
+ case Shared:
+ return "Shared";
+ case Short:
+ return "Short";
+ case Single:
+ return "Single";
+ case Static:
+ return "Static";
+ case Step:
+ return "Step";
+ case Stop:
+ return "Stop";
+ case Strict:
+ return "Strict";
+ case String:
+ return "String";
+ case Structure:
+ return "Structure";
+ case Sub:
+ return "Sub";
+ case SyncLock:
+ return "SyncLock";
+ case Text:
+ return "Text";
+ case Then:
+ return "Then";
+ case Throw:
+ return "Throw";
+ case To:
+ return "To";
+ case True:
+ return "True";
+ case Try:
+ return "Try";
+ case TypeOf:
+ return "TypeOf";
+ case Unicode:
+ return "Unicode";
+ case Until:
+ return "Until";
+ case Variant:
+ return "Variant";
+ case Wend:
+ return "Wend";
+ case When:
+ return "When";
+ case While:
+ return "While";
+ case With:
+ return "With";
+ case WithEvents:
+ return "WithEvents";
+ case WriteOnly:
+ return "WriteOnly";
+ case Xor:
+ return "Xor";
+ }
+ throw new System.NotSupportedException("Unknown token:" + token);
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/SharpRefactoryVB/src/Parser/generated/keywordlist/Tokens.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VB.glade
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs 2005-05-11 02:36:30 UTC (rev 2527)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs 2005-05-13 23:13:05 UTC (rev 2528)
@@ -1,103 +1,103 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Windows.Forms;
-using System.Reflection;
-
-using ICSharpCode.Core.Properties;
-using ICSharpCode.Core.Services;
-
-using ICSharpCode.Core.AddIns;
-using ICSharpCode.Core.AddIns.Codons;
-
-using ICSharpCode.SharpDevelop.Internal.Project;
-using ICSharpCode.SharpDevelop.Services;
-
-namespace VBBinding
-{
- ////<summary>
- /// Provides functions to run VB.DOC and to read the configuration of VB.DOC.
- /// </summary>
- public class VBDOCCommand : AbstractMenuCommand
- {
- ///<summary>
- /// Runs VB.DOC for the given project
- /// </summary>
- public override void Run()
- {
- IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
- VBProject project = (VBProject)projectService.CurrentSelectedProject;
- VBCompilerParameters compilerParameters = (VBCompilerParameters)project.ActiveConfiguration;
-
- Options options = new Options();
- string extension = compilerParameters.CompileTarget == CompileTarget.Exe ? ".dll" : ".exe";
- options.AssemblyFile = Path.Combine(compilerParameters.OutputDirectory, compilerParameters.OutputAssembly) + extension;
-
- ArrayList files = new ArrayList();
- foreach(ProjectFile file in project.ProjectFiles) {
- if(VBDOCConfigurationPanel.IsFileIncluded(file.Name, project)) {
- files.Add(file.Name);
- }
- }
-
- options.Files = (string[])files.ToArray(typeof(string));
- options.GlobalImports = compilerParameters.Imports.Split(',');
- options.OutputXML = compilerParameters.VBDOCOutputFile;
- options.Prefix = compilerParameters.VBDOCCommentPrefix;
- options.RootNamespace = compilerParameters.RootNamespace;
-
- ArrayList referenceDirs = new ArrayList();
- string mainDirectory = Path.GetDirectoryName(options.AssemblyFile);
-
- foreach(ProjectReference projectFile in project.ProjectReferences) {
- if(projectFile.ReferenceType == ReferenceType.Assembly) {
- string referenceDir = Path.GetDirectoryName(projectFile.Reference);
- if(referenceDir.ToLower() != mainDirectory.ToLower() && referenceDirs.Contains(referenceDir) == false) {
- referenceDirs.Add(referenceDir);
- }
- }
- }
-
- StringCollection errors = options.Validate();
-
- if(errors.Count > 0) {
- string message = "";
- foreach(string description in errors) {
- message += description + "\n";
- }
- MessageBox.Show(message, "Invalid VB.DOC options", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
-
- VBDOCRunner runner = new VBDOCRunner();
- AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(resolve);
- GuiMessageRecipient messageRecipient = new GuiMessageRecipient();
-
- try {
- runner.RunVBDOC(options, messageRecipient);
- } catch(Exception ex) {
- MessageBox.Show("Documentation generation failed:\n" + ex.Message);
- } finally {
- messageRecipient.Finished();
- AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(resolve);
- }
-
- }
-
- Assembly resolve(object sender, ResolveEventArgs e)
- {
- if(e.Name.StartsWith("CommentExtractor")) {
- return Assembly.GetAssembly(typeof(VBDOCRunner));
- }
- return null;
- }
- }
-}
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Markus Palme" email="MarkusPalme at gmx.de"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Windows.Forms;
+using System.Reflection;
+
+using ICSharpCode.Core.Properties;
+using ICSharpCode.Core.Services;
+
+using ICSharpCode.Core.AddIns;
+using ICSharpCode.Core.AddIns.Codons;
+
+using ICSharpCode.SharpDevelop.Internal.Project;
+using ICSharpCode.SharpDevelop.Services;
+
+namespace VBBinding
+{
+ ////<summary>
+ /// Provides functions to run VB.DOC and to read the configuration of VB.DOC.
+ /// </summary>
+ public class VBDOCCommand : AbstractMenuCommand
+ {
+ ///<summary>
+ /// Runs VB.DOC for the given project
+ /// </summary>
+ public override void Run()
+ {
+ IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
+ VBProject project = (VBProject)projectService.CurrentSelectedProject;
+ VBCompilerParameters compilerParameters = (VBCompilerParameters)project.ActiveConfiguration;
+
+ Options options = new Options();
+ string extension = compilerParameters.CompileTarget == CompileTarget.Exe ? ".dll" : ".exe";
+ options.AssemblyFile = Path.Combine(compilerParameters.OutputDirectory, compilerParameters.OutputAssembly) + extension;
+
+ ArrayList files = new ArrayList();
+ foreach(ProjectFile file in project.ProjectFiles) {
+ if(VBDOCConfigurationPanel.IsFileIncluded(file.Name, project)) {
+ files.Add(file.Name);
+ }
+ }
+
+ options.Files = (string[])files.ToArray(typeof(string));
+ options.GlobalImports = compilerParameters.Imports.Split(',');
+ options.OutputXML = compilerParameters.VBDOCOutputFile;
+ options.Prefix = compilerParameters.VBDOCCommentPrefix;
+ options.RootNamespace = compilerParameters.RootNamespace;
+
+ ArrayList referenceDirs = new ArrayList();
+ string mainDirectory = Path.GetDirectoryName(options.AssemblyFile);
+
+ foreach(ProjectReference projectFile in project.ProjectReferences) {
+ if(projectFile.ReferenceType == ReferenceType.Assembly) {
+ string referenceDir = Path.GetDirectoryName(projectFile.Reference);
+ if(referenceDir.ToLower() != mainDirectory.ToLower() && referenceDirs.Contains(referenceDir) == false) {
+ referenceDirs.Add(referenceDir);
+ }
+ }
+ }
+
+ StringCollection errors = options.Validate();
+
+ if(errors.Count > 0) {
+ string message = "";
+ foreach(string description in errors) {
+ message += description + "\n";
+ }
+ MessageBox.Show(message, "Invalid VB.DOC options", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return;
+ }
+
+ VBDOCRunner runner = new VBDOCRunner();
+ AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(resolve);
+ GuiMessageRecipient messageRecipient = new GuiMessageRecipient();
+
+ try {
+ runner.RunVBDOC(options, messageRecipient);
+ } catch(Exception ex) {
+ MessageBox.Show("Documentation generation failed:\n" + ex.Message);
+ } finally {
+ messageRecipient.Finished();
+ AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(resolve);
+ }
+
+ }
+
+ Assembly resolve(object sender, ResolveEventArgs e)
+ {
+ if(e.Name.StartsWith("CommentExtractor")) {
+ return Assembly.GetAssembly(typeof(VBDOCRunner));
+ }
+ return null;
+ }
+ }
+}
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBDOCCommand.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/VBNetBinding.addin.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/EmptyVBFile.xft.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/EmptyVBProject.xpt.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/VBConsoleApplicationProject.xpt.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/VBGtkSharp2Project.xpt.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/VBNetBinding/templates/VBGtkSharpProject.xpt.xml
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Monodevelop-patches-list
mailing list