diff options
author | David Miller <dmiller2718@gmail.com> | 2009-05-31 07:37:00 +0000 |
---|---|---|
committer | David Miller <dmiller2718@gmail.com> | 2009-05-31 07:37:00 +0000 |
commit | 810e1a63de383c991153b286ad677cce161de60e (patch) | |
tree | 853b80cdf11899fbe06c4c5562165c5dddd1782c /ClojureCLR/Clojure/Clojure.Main | |
parent | 7eabf5df39ab6bb0e93a53a8ddc1651d49d9ff3e (diff) |
ClojureCLR: major update, part2
Diffstat (limited to 'ClojureCLR/Clojure/Clojure.Main')
-rw-r--r-- | ClojureCLR/Clojure/Clojure.Main/Clojure.Main.csproj | 73 | ||||
-rw-r--r-- | ClojureCLR/Clojure/Clojure.Main/Main.cs | 38 | ||||
-rw-r--r-- | ClojureCLR/Clojure/Clojure.Main/Properties/AssemblyInfo.cs | 36 |
3 files changed, 147 insertions, 0 deletions
diff --git a/ClojureCLR/Clojure/Clojure.Main/Clojure.Main.csproj b/ClojureCLR/Clojure/Clojure.Main/Clojure.Main.csproj new file mode 100644 index 00000000..3006d806 --- /dev/null +++ b/ClojureCLR/Clojure/Clojure.Main/Clojure.Main.csproj @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A9B3BA9E-6955-43E6-9846-54DEFEDCFBFC}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Clojure.Main</RootNamespace>
+ <AssemblyName>Clojure.Main</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Main.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\DLR_Main\Src\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj">
+ <Project>{2AE75F5A-CD1F-4925-9647-AF4D1C282FB4}</Project>
+ <Name>Microsoft.Scripting.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\DLR_Main\Src\Runtime\Microsoft.Scripting\Microsoft.Scripting.csproj">
+ <Project>{EB66B766-6354-4208-A3D4-AACBDCB5C3B3}</Project>
+ <Name>Microsoft.Scripting</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Clojure\Clojure.csproj">
+ <Project>{B8089F66-DFBD-4906-BEE0-B317689C2524}</Project>
+ <Name>Clojure</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/ClojureCLR/Clojure/Clojure.Main/Main.cs b/ClojureCLR/Clojure/Clojure.Main/Main.cs new file mode 100644 index 00000000..e98d9afc --- /dev/null +++ b/ClojureCLR/Clojure/Clojure.Main/Main.cs @@ -0,0 +1,38 @@ +using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using clojure.lang;
+
+namespace Clojure
+{
+ public static class CljMain
+ {
+ private static readonly Symbol CLOJURE_MAIN = Symbol.intern("clojure.main");
+ private static readonly Var REQUIRE = RT.var("clojure.core", "require");
+ private static readonly Var LEGACY_REPL = RT.var("clojure.main", "legacy-repl");
+ private static readonly Var LEGACY_SCRIPT = RT.var("clojure.main", "legacy-script");
+ private static readonly Var MAIN = RT.var("clojure.main", "main");
+
+ static void Main(string[] args)
+ {
+ REQUIRE.invoke(CLOJURE_MAIN);
+ MAIN.applyTo(RT.seq(args));
+ }
+
+ static void legacy_repl(string[] args)
+ {
+ REQUIRE.invoke(CLOJURE_MAIN);
+ LEGACY_REPL.invoke(RT.seq(args));
+
+ }
+
+ static void legacy_script(string[] args)
+ {
+ REQUIRE.invoke(CLOJURE_MAIN);
+ LEGACY_SCRIPT.invoke(RT.seq(args));
+ }
+
+
+ }
+}
diff --git a/ClojureCLR/Clojure/Clojure.Main/Properties/AssemblyInfo.cs b/ClojureCLR/Clojure/Clojure.Main/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..e355cc52 --- /dev/null +++ b/ClojureCLR/Clojure/Clojure.Main/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Clojure.Main")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Clojure.Main")]
+[assembly: AssemblyCopyright("Copyright © 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0d3ce997-8d0d-40c6-b116-a3d2f006b912")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
|