diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bc4de1c..250c6ac 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -37,6 +37,20 @@ "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" + }, + { + "label": "lexcom", + "command": "dotnet", + "type": "process", + "args": [ + "run", + "--project", + "${workspaceFolder}/lexcom/lexcom.csproj", + "--", + "${file}" + ], + "problemMatcher": "$msCompile" } ] + } \ No newline at end of file diff --git a/LC/LC.csproj b/LC/LC.csproj index b1d9e8e..f6e2145 100644 --- a/LC/LC.csproj +++ b/LC/LC.csproj @@ -1,7 +1,6 @@  - true diff --git a/LC/LexRepl.cs b/LC/LexRepl.cs index b93b67c..59c28dd 100644 --- a/LC/LexRepl.cs +++ b/LC/LexRepl.cs @@ -117,40 +117,7 @@ protected override void EvaluateSubmition(string text) } else { - foreach (var diagnostic in result.Diagnostics.OrderBy(diag =>diag.Span, new TextSpanComparer())) - { - var lineIndex = syntaxTree.Text.GetLineIndex(diagnostic.Span.Start); - var line = syntaxTree.Text.Lines[lineIndex]; - var lineNumber = lineIndex + 1; - var character = diagnostic.Span.Start - line.Start + 1; - - Console.WriteLine(); - - Console.ForegroundColor = ConsoleColor.DarkRed; - Console.Write($"({lineNumber}, {character}): "); - Console.WriteLine(diagnostic); - Console.ResetColor(); - - var prefixSpan = TextSpan.FromBounds(line.Start, diagnostic.Span.Start); - var suffixSpan = TextSpan.FromBounds(diagnostic.Span.End, line.end); - - var prefix = syntaxTree.Text.ToString(prefixSpan); - var error = syntaxTree.Text.ToString(diagnostic.Span); - var suffix = syntaxTree.Text.ToString(suffixSpan); - - Console.Write(" "); - Console.Write(prefix); - - Console.ForegroundColor = ConsoleColor.DarkRed; - Console.Write(error); - Console.ResetColor(); - - Console.Write(suffix); - - Console.WriteLine(); - } - - Console.WriteLine(); + Console.Out.WriteDiagnostics(result.Diagnostics, syntaxTree); } } } diff --git a/LC/TextSpanComparer.cs b/LC/TextSpanComparer.cs deleted file mode 100644 index 11a5603..0000000 --- a/LC/TextSpanComparer.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using Lex.CodeAnalysis.Text; - -namespace Lex -{ - internal class TextSpanComparer : IComparer - { - public int Compare(TextSpan x, TextSpan y) - { - int cmp = x.Start - y.Start; - if (cmp == 0) - cmp = x.Length - y.Length; - return cmp; - } - } -} diff --git a/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.dll b/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.dll index 1859921..04cc4f0 100644 Binary files a/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.dll and b/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.dll differ diff --git a/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.pdb b/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.pdb index bef2b60..17c29f1 100644 Binary files a/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.pdb and b/Lex.Tests/bin/Debug/netcoreapp3.0/Lex.Tests.pdb differ diff --git a/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.dll b/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.dll index 1859921..04cc4f0 100644 Binary files a/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.dll and b/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.dll differ diff --git a/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.pdb b/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.pdb index bef2b60..17c29f1 100644 Binary files a/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.pdb and b/Lex.Tests/obj/Debug/netcoreapp3.0/Lex.Tests.pdb differ diff --git a/Lex.sln b/Lex.sln index 4359e45..2770a06 100644 --- a/Lex.sln +++ b/Lex.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LC", "LC\LC.csproj", "{4CC28DD9-CC33-4915-BB16-22D52BC1E426}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lexcom", "lexcom\lexcom.csproj", "{B96B9B71-2FD8-4C61-96BF-337166696452}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,5 +32,17 @@ Global {4CC28DD9-CC33-4915-BB16-22D52BC1E426}.Release|x64.Build.0 = Release|Any CPU {4CC28DD9-CC33-4915-BB16-22D52BC1E426}.Release|x86.ActiveCfg = Release|Any CPU {4CC28DD9-CC33-4915-BB16-22D52BC1E426}.Release|x86.Build.0 = Release|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Debug|x64.ActiveCfg = Debug|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Debug|x64.Build.0 = Debug|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Debug|x86.ActiveCfg = Debug|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Debug|x86.Build.0 = Debug|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Release|Any CPU.Build.0 = Release|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Release|x64.ActiveCfg = Release|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Release|x64.Build.0 = Release|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Release|x86.ActiveCfg = Release|Any CPU + {B96B9B71-2FD8-4C61-96BF-337166696452}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/Lex/IO/TextWriterExtensions.cs b/Lex/IO/TextWriterExtensions.cs index ec5ffb1..f4b9b89 100644 --- a/Lex/IO/TextWriterExtensions.cs +++ b/Lex/IO/TextWriterExtensions.cs @@ -1,10 +1,14 @@ using System; using System.CodeDom.Compiler; +using System.Collections.Generic; using System.IO; +using System.Linq; +using Lex.CodeAnalysis.Syntax; +using Lex.CodeAnalysis.Text; namespace Lex.CodeAnalysis { - internal static class TextWriterExtensions + public static class TextWriterExtensions { public static bool IsConsoleOut(this TextWriter writer) { @@ -63,7 +67,45 @@ public static void WritePunctuation(this TextWriter writer, string text) writer.Write(text); writer.ResetColor(); } - } + public static void WriteDiagnostics(this TextWriter TextWriter, IEnumerable diagnostics, SyntaxTree syntaxTree){ + foreach (var diagnostic in diagnostics.OrderBy(d =>d.Span.Start).ThenBy(d => d.Span.Length)) + { + var lineIndex = syntaxTree.Text.GetLineIndex(diagnostic.Span.Start); + var line = syntaxTree.Text.Lines[lineIndex]; + var lineNumber = lineIndex + 1; + var character = diagnostic.Span.Start - line.Start + 1; + + Console.WriteLine(); + + Console.ForegroundColor = ConsoleColor.DarkRed; + Console.Write($"({lineNumber}, {character}): "); + Console.WriteLine(diagnostic); + Console.ResetColor(); + + var prefixSpan = TextSpan.FromBounds(line.Start, diagnostic.Span.Start); + var suffixSpan = TextSpan.FromBounds(diagnostic.Span.End, line.end); + + var prefix = syntaxTree.Text.ToString(prefixSpan); + var error = syntaxTree.Text.ToString(diagnostic.Span); + var suffix = syntaxTree.Text.ToString(suffixSpan); + + Console.Write(" "); + Console.Write(prefix); + + Console.ForegroundColor = ConsoleColor.DarkRed; + Console.Write(error); + Console.ResetColor(); + + Console.Write(suffix); + + Console.WriteLine(); + } + + Console.WriteLine(); + } + + } + } \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9ae04d1..1f35579 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,9 +10,10 @@ pool: vmImage: 'windows-latest' variables: - solution: '**/*.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release' + sln: './Lex/Lex.sln' + tests: './Lex.Tests/Lex.Tests.csproj' steps: - task: NuGetToolInstaller@1 @@ -32,3 +33,13 @@ steps: inputs: platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' +- script: dotnet build --configuration $(buildConfiguration) $(sln) + displayName: 'dotnet build $(buildConfiguration)' +- script: dotnet test $(tests) --logger "xunit;LogFileName=TestResults.xml" + displayName: 'dotnet test' +- task: PublishTestResults@2 + displayName: 'publish test results to azure pipelines' + inputs: + testResultsFormat: 'xUnit' + testResultsFiles: '**/TestResults.xml' + condition: always() diff --git a/run.cmd b/lex.cmd similarity index 100% rename from run.cmd rename to lex.cmd diff --git a/run.sh b/lex.sh similarity index 100% rename from run.sh rename to lex.sh diff --git a/lexcom.cmd b/lexcom.cmd new file mode 100644 index 0000000..2328da1 --- /dev/null +++ b/lexcom.cmd @@ -0,0 +1,3 @@ +@echo off + +dotnet run --project ./lexcom/lexcom.csproj -- %* \ No newline at end of file diff --git a/lexcom.sh b/lexcom.sh new file mode 100644 index 0000000..ac33807 --- /dev/null +++ b/lexcom.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +dotnet run --project ./lexcom/lexcom.csproj -- "$@" \ No newline at end of file diff --git a/lexcom/Program.cs b/lexcom/Program.cs new file mode 100644 index 0000000..bf1647c --- /dev/null +++ b/lexcom/Program.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Lex.CodeAnalysis; +using Lex.CodeAnalysis.Symbols; +using Lex.CodeAnalysis.Syntax; + +namespace Lex +{ + internal static class Program + { + private static void Main(string[] args) + { + if (args.Length ==0) + { + Console.Error.WriteLine("usage: lex "); + return; + } + + if (args.Length > 1) + { + Console.Error.WriteLine("Error: Onl one path supported right now"); + return; + } + + var path = args.Single(); + + var text = File.ReadAllText(path); + var syntaxTree = SyntaxTree.Parse(text); + + var compilation = new Compilation(syntaxTree); + var result = compilation.Evaluate(new Dictionary()); + + if (result.Diagnostics.Any()){ + Console.Error.WriteDiagnostics(result.Diagnostics, syntaxTree); + }else{ + if (result.Value != null){ + Console.Out.WriteLine(result.Value); + } + } + } + } +} diff --git a/lexcom/bin/Debug/netcoreapp3.0/Lex.dll b/lexcom/bin/Debug/netcoreapp3.0/Lex.dll new file mode 100644 index 0000000..d2c535b Binary files /dev/null and b/lexcom/bin/Debug/netcoreapp3.0/Lex.dll differ diff --git a/lexcom/bin/Debug/netcoreapp3.0/Lex.pdb b/lexcom/bin/Debug/netcoreapp3.0/Lex.pdb new file mode 100644 index 0000000..0247854 Binary files /dev/null and b/lexcom/bin/Debug/netcoreapp3.0/Lex.pdb differ diff --git a/lexcom/bin/Debug/netcoreapp3.0/System.Collections.Immutable.dll b/lexcom/bin/Debug/netcoreapp3.0/System.Collections.Immutable.dll new file mode 100644 index 0000000..0302500 Binary files /dev/null and b/lexcom/bin/Debug/netcoreapp3.0/System.Collections.Immutable.dll differ diff --git a/lexcom/bin/Debug/netcoreapp3.0/cfg.dot b/lexcom/bin/Debug/netcoreapp3.0/cfg.dot new file mode 100644 index 0000000..44442de --- /dev/null +++ b/lexcom/bin/Debug/netcoreapp3.0/cfg.dot @@ -0,0 +1,7 @@ +digraph G { + N0 [label = "" shape = box] + N1 [label = "print(\"What is Your name\")\lstring name = input()\lprint(\"Hello \" + name)\l" shape = box] + N2 [label = "" shape = box] + N0 -> N1 [label = ""] + N1 -> N2 [label = ""] +} diff --git a/lexcom/bin/Debug/netcoreapp3.0/lexcom.deps.json b/lexcom/bin/Debug/netcoreapp3.0/lexcom.deps.json new file mode 100644 index 0000000..a280118 --- /dev/null +++ b/lexcom/bin/Debug/netcoreapp3.0/lexcom.deps.json @@ -0,0 +1,54 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.0": { + "lexcom/1.0.0": { + "dependencies": { + "Lex": "1.0.0" + }, + "runtime": { + "lexcom.dll": {} + } + }, + "System.Collections.Immutable/1.7.1": { + "runtime": { + "lib/netstandard2.0/System.Collections.Immutable.dll": { + "assemblyVersion": "1.2.5.0", + "fileVersion": "4.700.20.21406" + } + } + }, + "Lex/1.0.0": { + "dependencies": { + "System.Collections.Immutable": "1.7.1" + }, + "runtime": { + "Lex.dll": {} + } + } + } + }, + "libraries": { + "lexcom/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "System.Collections.Immutable/1.7.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-B43Zsz5EfMwyEbnObwRxW5u85fzJma3lrDeGcSAV1qkhSRTNY5uXAByTn9h9ddNdhM+4/YoLc/CI43umjwIl9Q==", + "path": "system.collections.immutable/1.7.1", + "hashPath": "system.collections.immutable.1.7.1.nupkg.sha512" + }, + "Lex/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/lexcom/bin/Debug/netcoreapp3.0/lexcom.dll b/lexcom/bin/Debug/netcoreapp3.0/lexcom.dll new file mode 100644 index 0000000..2ae5ff9 Binary files /dev/null and b/lexcom/bin/Debug/netcoreapp3.0/lexcom.dll differ diff --git a/lexcom/bin/Debug/netcoreapp3.0/lexcom.exe b/lexcom/bin/Debug/netcoreapp3.0/lexcom.exe new file mode 100644 index 0000000..108d15a Binary files /dev/null and b/lexcom/bin/Debug/netcoreapp3.0/lexcom.exe differ diff --git a/lexcom/bin/Debug/netcoreapp3.0/lexcom.pdb b/lexcom/bin/Debug/netcoreapp3.0/lexcom.pdb new file mode 100644 index 0000000..7727878 Binary files /dev/null and b/lexcom/bin/Debug/netcoreapp3.0/lexcom.pdb differ diff --git a/lexcom/bin/Debug/netcoreapp3.0/lexcom.runtimeconfig.dev.json b/lexcom/bin/Debug/netcoreapp3.0/lexcom.runtimeconfig.dev.json new file mode 100644 index 0000000..c44586e --- /dev/null +++ b/lexcom/bin/Debug/netcoreapp3.0/lexcom.runtimeconfig.dev.json @@ -0,0 +1,8 @@ +{ + "runtimeOptions": { + "additionalProbingPaths": [ + "C:\\Users\\Danuja Fernando\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\Danuja Fernando\\.nuget\\packages" + ] + } +} \ No newline at end of file diff --git a/lexcom/bin/Debug/netcoreapp3.0/lexcom.runtimeconfig.json b/lexcom/bin/Debug/netcoreapp3.0/lexcom.runtimeconfig.json new file mode 100644 index 0000000..33ec9d0 --- /dev/null +++ b/lexcom/bin/Debug/netcoreapp3.0/lexcom.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp3.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "3.0.0" + } + } +} \ No newline at end of file diff --git a/lexcom/lexcom.csproj b/lexcom/lexcom.csproj new file mode 100644 index 0000000..4cf62d7 --- /dev/null +++ b/lexcom/lexcom.csproj @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp3.0 + + + + + + + + + diff --git a/lexcom/obj/Debug/netcoreapp3.0/.NETCoreApp,Version=v3.0.AssemblyAttributes.cs b/lexcom/obj/Debug/netcoreapp3.0/.NETCoreApp,Version=v3.0.AssemblyAttributes.cs new file mode 100644 index 0000000..cc083fe --- /dev/null +++ b/lexcom/obj/Debug/netcoreapp3.0/.NETCoreApp,Version=v3.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.0", FrameworkDisplayName = "")] diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.AssemblyInfo.cs b/lexcom/obj/Debug/netcoreapp3.0/lexcom.AssemblyInfo.cs new file mode 100644 index 0000000..e5d8f6d --- /dev/null +++ b/lexcom/obj/Debug/netcoreapp3.0/lexcom.AssemblyInfo.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// Generated by the MSBuild WriteCodeFragment class. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("lexcom")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("lexcom")] +[assembly: System.Reflection.AssemblyTitleAttribute("lexcom")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.AssemblyInfoInputs.cache b/lexcom/obj/Debug/netcoreapp3.0/lexcom.AssemblyInfoInputs.cache new file mode 100644 index 0000000..8cbdf72 --- /dev/null +++ b/lexcom/obj/Debug/netcoreapp3.0/lexcom.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +bc9170369c4781a262e84076e7d137eb34bf1d54 diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.assets.cache b/lexcom/obj/Debug/netcoreapp3.0/lexcom.assets.cache new file mode 100644 index 0000000..97ed3eb Binary files /dev/null and b/lexcom/obj/Debug/netcoreapp3.0/lexcom.assets.cache differ diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.csproj.CopyComplete b/lexcom/obj/Debug/netcoreapp3.0/lexcom.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.csproj.FileListAbsolute.txt b/lexcom/obj/Debug/netcoreapp3.0/lexcom.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e79838e --- /dev/null +++ b/lexcom/obj/Debug/netcoreapp3.0/lexcom.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +F:\hiru\works\C#\Lex\lexcom\obj\Debug\netcoreapp3.0\lexcom.csprojAssemblyReference.cache +F:\hiru\works\C#\Lex\lexcom\obj\Debug\netcoreapp3.0\lexcom.AssemblyInfoInputs.cache +F:\hiru\works\C#\Lex\lexcom\obj\Debug\netcoreapp3.0\lexcom.AssemblyInfo.cs +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\lexcom.exe +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\lexcom.deps.json +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\lexcom.runtimeconfig.json +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\lexcom.runtimeconfig.dev.json +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\lexcom.dll +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\lexcom.pdb +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\System.Collections.Immutable.dll +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\Lex.dll +F:\hiru\works\C#\Lex\lexcom\bin\Debug\netcoreapp3.0\Lex.pdb +F:\hiru\works\C#\Lex\lexcom\obj\Debug\netcoreapp3.0\lexcom.csproj.CopyComplete +F:\hiru\works\C#\Lex\lexcom\obj\Debug\netcoreapp3.0\lexcom.dll +F:\hiru\works\C#\Lex\lexcom\obj\Debug\netcoreapp3.0\lexcom.pdb diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.csprojAssemblyReference.cache b/lexcom/obj/Debug/netcoreapp3.0/lexcom.csprojAssemblyReference.cache new file mode 100644 index 0000000..8938cb7 Binary files /dev/null and b/lexcom/obj/Debug/netcoreapp3.0/lexcom.csprojAssemblyReference.cache differ diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.dll b/lexcom/obj/Debug/netcoreapp3.0/lexcom.dll new file mode 100644 index 0000000..2ae5ff9 Binary files /dev/null and b/lexcom/obj/Debug/netcoreapp3.0/lexcom.dll differ diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.exe b/lexcom/obj/Debug/netcoreapp3.0/lexcom.exe new file mode 100644 index 0000000..108d15a Binary files /dev/null and b/lexcom/obj/Debug/netcoreapp3.0/lexcom.exe differ diff --git a/lexcom/obj/Debug/netcoreapp3.0/lexcom.pdb b/lexcom/obj/Debug/netcoreapp3.0/lexcom.pdb new file mode 100644 index 0000000..7727878 Binary files /dev/null and b/lexcom/obj/Debug/netcoreapp3.0/lexcom.pdb differ diff --git a/lexcom/obj/lexcom.csproj.nuget.cache b/lexcom/obj/lexcom.csproj.nuget.cache new file mode 100644 index 0000000..83d1871 --- /dev/null +++ b/lexcom/obj/lexcom.csproj.nuget.cache @@ -0,0 +1,5 @@ +{ + "version": 1, + "dgSpecHash": "Q1q89NlsGWwUwhcDG5nJbiq/sVs2iude/aI5jl3f5tfE5ARVBNJp6zfSRjGzQNX2SZ/cg9A7er/vVdyA8Kr0PQ==", + "success": true +} \ No newline at end of file diff --git a/lexcom/obj/lexcom.csproj.nuget.dgspec.json b/lexcom/obj/lexcom.csproj.nuget.dgspec.json new file mode 100644 index 0000000..6e3198b --- /dev/null +++ b/lexcom/obj/lexcom.csproj.nuget.dgspec.json @@ -0,0 +1,123 @@ +{ + "format": 1, + "restore": { + "F:\\hiru\\works\\C#\\Lex\\lexcom\\lexcom.csproj": {} + }, + "projects": { + "F:\\hiru\\works\\C#\\Lex\\lexcom\\lexcom.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "F:\\hiru\\works\\C#\\Lex\\lexcom\\lexcom.csproj", + "projectName": "lexcom", + "projectPath": "F:\\hiru\\works\\C#\\Lex\\lexcom\\lexcom.csproj", + "packagesPath": "C:\\Users\\Danuja Fernando\\.nuget\\packages\\", + "outputPath": "F:\\hiru\\works\\C#\\Lex\\lexcom\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Danuja Fernando\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "netcoreapp3.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp3.0": { + "projectReferences": { + "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj": { + "projectPath": "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj" + } + } + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp3.0": { + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.0.100\\RuntimeIdentifierGraph.json" + } + } + }, + "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj", + "projectName": "Lex", + "projectPath": "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj", + "packagesPath": "C:\\Users\\Danuja Fernando\\.nuget\\packages\\", + "outputPath": "F:\\hiru\\works\\C#\\Lex\\Lex\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Danuja Fernando\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "netstandard2.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netstandard2.0": { + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netstandard2.0": { + "dependencies": { + "NETStandard.Library": { + "suppressParent": "All", + "target": "Package", + "version": "[2.0.3, )", + "autoReferenced": true + }, + "System.Collections.Immutable": { + "target": "Package", + "version": "[1.7.1, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.0.100\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/lexcom/obj/lexcom.csproj.nuget.g.props b/lexcom/obj/lexcom.csproj.nuget.g.props new file mode 100644 index 0000000..1c2cc7b --- /dev/null +++ b/lexcom/obj/lexcom.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\Danuja Fernando\.nuget\packages\ + PackageReference + 5.3.0 + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/lexcom/obj/lexcom.csproj.nuget.g.targets b/lexcom/obj/lexcom.csproj.nuget.g.targets new file mode 100644 index 0000000..53cfaa1 --- /dev/null +++ b/lexcom/obj/lexcom.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/lexcom/obj/project.assets.json b/lexcom/obj/project.assets.json new file mode 100644 index 0000000..57b1660 --- /dev/null +++ b/lexcom/obj/project.assets.json @@ -0,0 +1,126 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.0": { + "System.Collections.Immutable/1.7.1": { + "type": "package", + "compile": { + "lib/netstandard2.0/System.Collections.Immutable.dll": {} + }, + "runtime": { + "lib/netstandard2.0/System.Collections.Immutable.dll": {} + } + }, + "Lex/1.0.0": { + "type": "project", + "framework": ".NETStandard,Version=v2.0", + "dependencies": { + "System.Collections.Immutable": "1.7.1" + }, + "compile": { + "bin/placeholder/Lex.dll": {} + }, + "runtime": { + "bin/placeholder/Lex.dll": {} + } + } + } + }, + "libraries": { + "System.Collections.Immutable/1.7.1": { + "sha512": "B43Zsz5EfMwyEbnObwRxW5u85fzJma3lrDeGcSAV1qkhSRTNY5uXAByTn9h9ddNdhM+4/YoLc/CI43umjwIl9Q==", + "type": "package", + "path": "system.collections.immutable/1.7.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/System.Collections.Immutable.dll", + "lib/net461/System.Collections.Immutable.xml", + "lib/netstandard1.0/System.Collections.Immutable.dll", + "lib/netstandard1.0/System.Collections.Immutable.xml", + "lib/netstandard1.3/System.Collections.Immutable.dll", + "lib/netstandard1.3/System.Collections.Immutable.xml", + "lib/netstandard2.0/System.Collections.Immutable.dll", + "lib/netstandard2.0/System.Collections.Immutable.xml", + "lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll", + "lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.xml", + "system.collections.immutable.1.7.1.nupkg.sha512", + "system.collections.immutable.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Lex/1.0.0": { + "type": "project", + "path": "../Lex/Lex.csproj", + "msbuildProject": "../Lex/Lex.csproj" + } + }, + "projectFileDependencyGroups": { + ".NETCoreApp,Version=v3.0": [ + "Lex >= 1.0.0" + ] + }, + "packageFolders": { + "C:\\Users\\Danuja Fernando\\.nuget\\packages\\": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "F:\\hiru\\works\\C#\\Lex\\lexcom\\lexcom.csproj", + "projectName": "lexcom", + "projectPath": "F:\\hiru\\works\\C#\\Lex\\lexcom\\lexcom.csproj", + "packagesPath": "C:\\Users\\Danuja Fernando\\.nuget\\packages\\", + "outputPath": "F:\\hiru\\works\\C#\\Lex\\lexcom\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Danuja Fernando\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "netcoreapp3.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp3.0": { + "projectReferences": { + "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj": { + "projectPath": "F:\\hiru\\works\\C#\\Lex\\Lex\\Lex.csproj" + } + } + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp3.0": { + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.0.100\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/sample/helloworld.lx b/sample/helloworld.lx new file mode 100644 index 0000000..b56dbfa --- /dev/null +++ b/sample/helloworld.lx @@ -0,0 +1,3 @@ +print("What is Your name") +name = input() +print("Hello " + name)