diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c6e43d8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +insert_final_newline = true diff --git a/3rdparty/FParsec.dll b/3rdparty/FParsec.dll deleted file mode 100644 index e45c1de..0000000 Binary files a/3rdparty/FParsec.dll and /dev/null differ diff --git a/3rdparty/FParsecCS.dll b/3rdparty/FParsecCS.dll deleted file mode 100644 index fa67fea..0000000 Binary files a/3rdparty/FParsecCS.dll and /dev/null differ diff --git a/License.md b/License.md new file mode 100644 index 0000000..c0d71f4 --- /dev/null +++ b/License.md @@ -0,0 +1,22 @@ +The MIT License (MIT) +===================== + +Copyright (C) 2011—2015 by F. von Never, Hagane + +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. diff --git a/Naggum.Runtime/Cons.cs b/Naggum.Runtime/Cons.cs index d3bf587..88a0301 100644 --- a/Naggum.Runtime/Cons.cs +++ b/Naggum.Runtime/Cons.cs @@ -1,24 +1,4 @@ -/* Copyright (C) 2011 by ForNeVeR,Hagane - -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; using System.Text; using System.Collections; diff --git a/Naggum.Runtime/Naggum.Runtime.csproj b/Naggum.Runtime/Naggum.Runtime.csproj index 5630aa4..0cb6973 100644 --- a/Naggum.Runtime/Naggum.Runtime.csproj +++ b/Naggum.Runtime/Naggum.Runtime.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties Naggum.Runtime Naggum.Runtime - v4.0 + v4.6.1 512 + true @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -29,6 +31,7 @@ TRACE prompt 4 + false diff --git a/Naggum.Runtime/Reader.cs b/Naggum.Runtime/Reader.cs index f6a6fde..dda66ff 100644 --- a/Naggum.Runtime/Reader.cs +++ b/Naggum.Runtime/Reader.cs @@ -1,24 +1,4 @@ -/* Copyright (C) 2011-2012 by ForNeVeR, Hagane - -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; using System.IO; using System.Collections.Generic; using System.Linq; diff --git a/Naggum.Runtime/Symbol.cs b/Naggum.Runtime/Symbol.cs index eded498..7d78ecf 100644 --- a/Naggum.Runtime/Symbol.cs +++ b/Naggum.Runtime/Symbol.cs @@ -1,24 +1,4 @@ -/* Copyright (C) 2012 by ForNeVeR, Hagane - -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; namespace Naggum.Runtime { diff --git a/Naggum.Test/CompilerTest.fs b/Naggum.Test/CompilerTest.fs index d89cb2c..448fcad 100644 --- a/Naggum.Test/CompilerTest.fs +++ b/Naggum.Test/CompilerTest.fs @@ -1,30 +1,12 @@ -(* Copyright (C) 2012 by ForNeVeR - -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. *) - -namespace Naggum.Test -open Naggum.Compiler -open NUnit.Framework +namespace Naggum.Test + open System.Diagnostics open System.IO -[] +open Xunit + +open Naggum.Compiler + type CompilerTest() = static let testExtension = "naggum" static let resultExtension = "result" @@ -45,12 +27,12 @@ type CompilerTest() = let startInfo = new ProcessStartInfo(executablePath, UseShellExecute = false, RedirectStandardOutput = true) let ``process`` = Process.Start startInfo ``process``.WaitForExit() - let result = ``process``.StandardOutput.ReadToEnd() + let result = ``process``.StandardOutput.ReadToEnd().Replace("\r\n", "\n") - let reference = File.ReadAllText resultPath - Assert.AreEqual(reference, result) + let reference = (File.ReadAllText resultPath).Replace("\r\n", "\n") + Assert.Equal(reference, result) - [] + [] member this.RunTests() = filenames - |> List.iter CompilerTest.RunTest + |> List.iter CompilerTest.RunTest diff --git a/Naggum.Test/Naggum.Test.dll.config b/Naggum.Test/Naggum.Test.dll.config new file mode 100644 index 0000000..fe35c7b --- /dev/null +++ b/Naggum.Test/Naggum.Test.dll.config @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Naggum.Test/Naggum.Test.fsproj b/Naggum.Test/Naggum.Test.fsproj index 5c8264b..83eb979 100644 --- a/Naggum.Test/Naggum.Test.fsproj +++ b/Naggum.Test/Naggum.Test.fsproj @@ -9,8 +9,11 @@ Library Naggum.Test Naggum.Test - v4.0 + v4.6.1 Naggum.Test + 4.4.0.0 + 11 + true @@ -31,29 +34,55 @@ 3 bin\Release\Naggum.Test.XML - - + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + - + + + PreserveNewest + - - - - ..\packages\NUnit.2.6.1\lib\nunit.framework.dll + True + - - + + ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + ngc {a4269c5e-e4ac-44bf-a06e-1b45248910ad} True + + ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll + True + + + ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + True + + + ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True +