2005-05-18 Marek Safar <marek.safar@seznam.cz>
authorMarek Safar <marek.safar@gmail.com>
Wed, 18 May 2005 10:16:27 +0000 (10:16 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 18 May 2005 10:16:27 +0000 (10:16 -0000)
* JScriptCodeGenerator.cs: Stubbed.

* JScriptCodeProvider.cs: Implemented.

svn path=/trunk/mcs/; revision=44669

mcs/class/Microsoft.JScript/Assembly/AssemblyInfo.cs
mcs/class/Microsoft.JScript/Assembly/ChangeLog
mcs/class/Microsoft.JScript/ChangeLog
mcs/class/Microsoft.JScript/Microsoft.JScript.dll.sources
mcs/class/Microsoft.JScript/Microsoft.JScript/ChangeLog
mcs/class/Microsoft.JScript/Microsoft.JScript/JScriptCodeGenerator.cs [new file with mode: 0644]
mcs/class/Microsoft.JScript/Microsoft.JScript/JScriptCodeProvider.cs

index 96786b21ed7aa79ce77b066478a75990d5dcf791..b0217470572143aceea30d14261cc70e8424e00b 100755 (executable)
 using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
-
-/* TODO COMPLETE INFORMATION
-
-#if (NET_1_0)
-       [assembly: AssemblyVersion ("1.0.3300.0")]
-#endif
-#if (NET_1_1)
-       [assembly: AssemblyVersion ("1.0.5000.0")]
+using System.Security;
+using System.Resources;
+\r
+#if (NET_2_0)
+       [assembly: AssemblyVersion ("8.0.3600.0")]\r
+//     [assembly: CLSCompliant (true)]
+#elif (NET_1_1)
+       [assembly: AssemblyVersion("7.0.5000.0")]
+       [assembly: SatelliteContractVersion("7.0.5000.0")]
+       [assembly: TypeLibVersion(7, 1)]
+#else
+       [assembly: AssemblyVersion("7.0.3300.0")]
+       [assembly: SatelliteContractVersion("7.0.3300.0")]
 #endif
 
-[assembly: AssemblyTitle ("")]
-[assembly: AssemblyDescription ("")]
-
-[assembly: CLSCompliant (true)]
-[assembly: AssemblyFileVersion ("0.0.0.1")]
-
-[assembly: ComVisible (false)]
-
-*/
+[assembly: AssemblyTitle ("Microsoft.JScript")]
+[assembly: AssemblyDescription("Microsoft.JScript.dll")]
+[assembly: AssemblyCompany("MONO development team")]
+[assembly: AssemblyCopyright("(c) 2003 Various Authors")]
 
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile("../msfinal.pub")]
+[assembly: NeutralResourcesLanguage("en-US")]
+[assembly: AllowPartiallyTrustedCallers()]
 
+[assembly: AssemblyDelaySign(true)]
+[assembly: AssemblyKeyFile("../msfinal.pub")]\r
index 6d2d71dcb6befe77f8a70da2b4ff20162ebe69a0..556dd77cd691d4a983118956a4b74c3e81632018 100755 (executable)
@@ -1,3 +1,7 @@
+2005-05-18  Marek Safar  <marek.safar@seznam.cz>\r
+\r
+       * AssemblyInfo.cs: Fixed attributes.\r
+\r
 2004-04-28  Sebastien Pouliot  <sebastien@ximian.com>
 
        * AssemblyInfo.cs: Added
index 45f8bdffc4e93a28e8c614f508c49737bd9767d9..a262c1e95432042399d314579575bc251b81c58a 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-18  Marek Safar  <marek.safar@seznam.cz>
+
+       * Microsoft.JScript.dll.sources: Added JScriptCodeGenerator.cs
+\r
 2005-05-07  Cesar Lopez Nataren  <cnataren@novell.com>
 
        * COMFieldInfo.cs, COMMethodInfo.cs, JSMethod.cs: added to the
index f636ad56c8016de0a09d92aee0a0b2c5c8f63d15..a18dbfeeb10ade99dc37bcb9012e82fd515060b1 100644 (file)
@@ -105,7 +105,8 @@ Microsoft.JScript/JSPropertyInfo.cs
 Microsoft.JScript/JSScanner.cs
 Microsoft.JScript/JSToken.cs
 Microsoft.JScript/JSVariableField.cs
-Microsoft.JScript/JScriptCodeProvider.cs
+Microsoft.JScript/JScriptCodeProvider.cs\r
+Microsoft.JScript/JScriptCodeGenerator.cs
 Microsoft.JScript/JScriptException.cs
 Microsoft.JScript/LateBinding.cs
 Microsoft.JScript/LenientArrayPrototype.cs
index 2375f7c10f77ac17ca957d175ef5f4e90ae4d059..8461be22564c4f1385691988f15a95d20ffdf194 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-18  Marek Safar  <marek.safar@seznam.cz>
+\r
+       * JScriptCodeGenerator.cs: Stubbed.\r
+       \r
+       * JScriptCodeProvider.cs: Implemented.\r
+\r
 2005-05-17  Cesar Lopez Nataren  <cnataren@novell.com>
 
        * SemanticAnalizer.cs: Add methods_with_outter_scope_refs and
diff --git a/mcs/class/Microsoft.JScript/Microsoft.JScript/JScriptCodeGenerator.cs b/mcs/class/Microsoft.JScript/Microsoft.JScript/JScriptCodeGenerator.cs
new file mode 100644 (file)
index 0000000..cc42734
--- /dev/null
@@ -0,0 +1,321 @@
+//
+// JScriptCodeGenerator.cs:
+//
+// Author: 
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.CodeDom;
+using System.CodeDom.Compiler;
+
+namespace Microsoft.JScript {
+
+       [MonoTODO]
+       sealed class JScriptCodeGenerator : CodeCompiler {
+               [MonoTODO]
+               protected override string CompilerName {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               protected override string FileExtension {
+                       get {
+                               return ".js";
+                       }
+               }
+
+               protected override string NullToken {
+                       get {
+                               return "null";
+                       }
+               }
+
+               protected override string CmdArgsFromParameters(CompilerParameters options) {
+                       throw new NotImplementedException();
+               }
+
+               protected override string CreateEscapedIdentifier(string name) {
+                       throw new NotImplementedException();
+               }
+
+               protected override string CreateValidIdentifier(string name) {
+                       throw new NotImplementedException();
+               }
+
+               protected override CompilerResults FromFileBatch(CompilerParameters options, string[] fileNames) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateArgumentReferenceExpression(CodeArgumentReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateArrayCreateExpression(CodeArrayCreateExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateArrayIndexerExpression(CodeArrayIndexerExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateAssignStatement(CodeAssignStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateAttachEventStatement(CodeAttachEventStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateAttributeDeclarationsEnd(CodeAttributeDeclarationCollection attributes) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateAttributeDeclarationsStart(CodeAttributeDeclarationCollection attributes) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateBaseReferenceExpression(CodeBaseReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateBinaryOperatorExpression(CodeBinaryOperatorExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateCastExpression(CodeCastExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateComment(CodeComment e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateCompileUnitStart(CodeCompileUnit e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateConditionStatement(CodeConditionStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateConstructor(CodeConstructor e, CodeTypeDeclaration c) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateDelegateCreateExpression(CodeDelegateCreateExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateDelegateInvokeExpression(CodeDelegateInvokeExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateEntryPointMethod(CodeEntryPointMethod e, CodeTypeDeclaration c) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateEvent(CodeMemberEvent e, CodeTypeDeclaration c) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateEventReferenceExpression(CodeEventReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateExpressionStatement(CodeExpressionStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateField(CodeMemberField e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateFieldReferenceExpression(CodeFieldReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateGotoStatement(CodeGotoStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateIndexerExpression(CodeIndexerExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateIterationStatement(CodeIterationStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateLabeledStatement(CodeLabeledStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateLinePragmaEnd(CodeLinePragma e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateLinePragmaStart(CodeLinePragma e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateMethod(CodeMemberMethod e, CodeTypeDeclaration c) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateMethodInvokeExpression(CodeMethodInvokeExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateMethodReferenceExpression(CodeMethodReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateMethodReturnStatement(CodeMethodReturnStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateNamespace(CodeNamespace e) {
+                       GenerateNamespaceStart (e);
+                       base.GenerateNamespace (e);
+                       GenerateNamespaceEnd (e);
+               }
+
+               protected override void GenerateNamespaceEnd(CodeNamespace e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateNamespaceImport(CodeNamespaceImport e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateNamespaceStart(CodeNamespace e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateObjectCreateExpression(CodeObjectCreateExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateParameterDeclarationExpression(CodeParameterDeclarationExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GeneratePrimitiveExpression(CodePrimitiveExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateProperty(CodeMemberProperty e, CodeTypeDeclaration c) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GeneratePropertyReferenceExpression(CodePropertyReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GeneratePropertySetValueReferenceExpression(CodePropertySetValueReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateRemoveEventStatement(CodeRemoveEventStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateSingleFloatValue(float s) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateSnippetExpression(CodeSnippetExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateSnippetMember(CodeSnippetTypeMember e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateSnippetStatement(CodeSnippetStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateThisReferenceExpression(CodeThisReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateThrowExceptionStatement(CodeThrowExceptionStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateTryCatchFinallyStatement(CodeTryCatchFinallyStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateTypeConstructor(CodeTypeConstructor e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateTypeEnd(CodeTypeDeclaration e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateTypeOfExpression(CodeTypeOfExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateTypeStart(CodeTypeDeclaration e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateVariableDeclarationStatement(CodeVariableDeclarationStatement e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void GenerateVariableReferenceExpression(CodeVariableReferenceExpression e) {
+                       throw new NotImplementedException();
+               }
+
+               protected override string GetTypeOutput(CodeTypeReference typeRef) {
+                       throw new NotImplementedException();
+               }
+
+               protected override bool IsValidIdentifier(string value) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void OutputType(CodeTypeReference typeRef) {
+                       throw new NotImplementedException();
+               }
+
+               protected override void ProcessCompilerOutputLine(CompilerResults results, string line) {
+                       throw new NotImplementedException();
+               }
+
+               protected override string QuoteSnippetString(string value) {
+                       throw new NotImplementedException();
+               }
+
+               protected override bool Supports(GeneratorSupport support) {
+                       throw new NotImplementedException();
+               }
+       }
+}
\ No newline at end of file
index a8750e38124e8fc8c7745699b00ae38066eecbe1..42c6b704f13a53ad61dc37318674e4aed0fd1df0 100644 (file)
@@ -30,35 +30,29 @@ using System.CodeDom.Compiler;
 
 namespace Microsoft.JScript {
 
-       [MonoTODO]
        public class JScriptCodeProvider : CodeDomProvider
        {
-               [MonoTODO]
+               JScriptCodeGenerator code_gen;
+
                public JScriptCodeProvider ()
                {
-                       throw new NotImplementedException ();
+                       code_gen = new JScriptCodeGenerator ();
                }
 
-
-               [MonoTODO]
                public override string FileExtension {
                        get {
-                               throw new NotImplementedException ();
+                               return "js";
                        }
                }
 
-
-               [MonoTODO]
                public override ICodeCompiler CreateCompiler ()
                {
-                       throw new NotImplementedException ();
+                       return code_gen;
                }
-
                
-               [MonoTODO]
                public override ICodeGenerator CreateGenerator ()
                {
-                       throw new NotImplementedException ();
+                       return code_gen;
                }               
        }
 }