<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <NoWarn>$(NoWarn);57;</NoWarn> <!-- Experimental -->
    <NoWarn>$(NoWarn);1204</NoWarn> <!-- This construct is for use in the FSharp.Core library and should not be used directly -->
    <NoWarn>$(NoWarn);1178</NoWarn> <!-- FS1178 does not support structural equality -->
    <DefineConstants>$(DefineConstants);COMPILER;FSHARPCORE_USE_PACKAGE;NO_CHECKNULLS</DefineConstants>
    <FsYaccOutputFolder>generated\$(TargetFramework)\</FsYaccOutputFolder>
    <FsLexOutputFolder>generated\$(TargetFramework)\</FsLexOutputFolder>
    <Tailcalls>true</Tailcalls>
    <IsPackable>true</IsPackable>
    <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="AssemblyInfo.fs" />
    <Compile Include="TailCall.fs" />
    <EmbeddedText Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\FSComp.txt">
      <Link>FSComp.txt</Link>
    </EmbeddedText>
    <EmbeddedResource Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\FSStrings.resx">
      <Link>FSStrings.resx</Link>
      <LogicalName>FSStrings.resources</LogicalName>
    </EmbeddedResource>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\NullnessShims.fs">
      <Link>Utilities\NullnessShims.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\Activity.fsi">
      <Link>Utilities\Activity.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\Activity.fs">
      <Link>Utilities\Activity.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\sformat.fsi">
      <Link>Utilities\sformat.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\sformat.fs">
      <Link>Utilities\sformat.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\sr.fsi">
      <Link>Utilities\sr.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\sr.fs">
      <Link>Utilities\sr.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\ResizeArray.fsi">
      <Link>Utilities\ResizeArray.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\ResizeArray.fs">
      <Link>Utilities\ResizeArray.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\HashMultiMap.fsi">
      <Link>Utilities\HashMultiMap.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\HashMultiMap.fs">
      <Link>Utilities\HashMultiMap.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\ReadOnlySpan.fsi">
      <Link>Utilities\HashMultiMap.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\ReadOnlySpan.fs">
      <Link>Utilities\HashMultiMap.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\TaggedCollections.fsi">
      <Link>Utilities\TaggedCollections.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\TaggedCollections.fs">
      <Link>Utilities\TaggedCollections.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\illib.fsi">
      <Link>Utilities\illib.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\illib.fs">
      <Link>Utilities\illib.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\Cancellable.fsi">
      <Link>Utilities\Cancellable.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\Cancellable.fs">
      <Link>Utilities\Cancellable.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\FileSystem.fsi">
      <Link>Utilities\FileSystem.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\FileSystem.fs">
      <Link>Utilities\FileSystem.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\ildiag.fsi">
      <Link>Utilities\ildiag.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\ildiag.fs">
      <Link>Utilities\ildiag.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\zmap.fsi">
      <Link>Utilities\zmap.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\zmap.fs">
      <Link>Utilities\zmap.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\zset.fsi">
      <Link>Utilities\zset.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\zset.fs">
      <Link>Utilities\zset.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\XmlAdapters.fsi">
      <Link>Utilities\XmlAdapters.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\XmlAdapters.fs">
      <Link>Utilities\XmlAdapters.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\InternalCollections.fsi">
      <Link>Utilities\InternalCollections.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\InternalCollections.fs">
      <Link>Utilities\InternalCollections.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\lib.fsi">
      <Link>Utilities\lib.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\lib.fs">
      <Link>Utilities\lib.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\PathMap.fsi">
      <Link>Utilities\PathMap.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\PathMap.fs">
      <Link>Utilities\PathMap.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\range.fsi">
      <Link>Utilities\range.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Utilities\range.fs">
      <Link>Utilities\range.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\LanguageFeatures.fsi">
      <Link>Facilities\LanguageFeatures.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\LanguageFeatures.fs">
      <Link>Facilities\LanguageFeatures.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\DiagnosticOptions.fsi">
      <Link>Facilities\DiagnosticOptions.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\DiagnosticOptions.fs">
      <Link>Facilities\DiagnosticOptions.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\DiagnosticsLogger.fsi">
      <Link>Facilities\DiagnosticsLogger.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\DiagnosticsLogger.fs">
      <Link>Facilities\DiagnosticsLogger.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\Hashing.fsi">
      <Link>Facilities\Hashing.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\Hashing.fs">
      <Link>Facilities\Hashing.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\prim-lexing.fsi">
      <Link>Facilities\prim-lexing.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\prim-lexing.fs">
      <Link>Facilities\prim-lexing.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\prim-parsing.fsi">
      <Link>Facilities\prim-parsing.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\Facilities\prim-parsing.fs">
      <Link>Facilities\prim-parsing.fs</Link>
    </Compile>
    <FsLex Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\illex.fsl">
      <OtherFlags>--module Fantomas.FCS.AbstractIL.AsciiLexer --internal --open Internal.Utilities.Text.Lexing --open Fantomas.FCS.AbstractIL.AsciiParser --unicode --lexlib Internal.Utilities.Text.Lexing</OtherFlags>
      <Link>AbstractIL\illex.fsl</Link>
    </FsLex>
    <None Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\illex.fsl">
      <Link>AbstractIL\illex.fsl</Link>
    </None>
    <FsYacc Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\ilpars.fsy">
      <OtherFlags>--module Fantomas.FCS.AbstractIL.AsciiParser --open Fantomas.FCS.AbstractIL --open Fantomas.FCS.AbstractIL.AsciiConstants --open Fantomas.FCS.AbstractIL.IL --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing --buffer-type-argument char</OtherFlags>
      <Link>AbstractIL\ilpars.fsy</Link>
    </FsYacc>
    <None Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\ilpars.fsy">
      <Link>AbstractIL\FsYacc\ilpars.fsy</Link>
    </None>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\il.fsi">
      <Link>AbstractIL\il.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\il.fs">
      <Link>AbstractIL\il.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\ilascii.fsi">
      <Link>AbstractIL\ilascii.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\AbstractIL\ilascii.fs">
      <Link>AbstractIL\ilascii.fs</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)ilpars.fsi">
      <Link>AbstractIL\FsYaccOut\ilpars.fsi</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)ilpars.fs">
      <Link>AbstractIL\FsYaccOut\ilpars.fs</Link>
    </Compile>
    <Compile Include="$(FsLexOutputFolder)illex.fsi">
      <Link>AbstractIL\FsLexOut\illex.fsi</Link>
    </Compile>
    <Compile Include="$(FsLexOutputFolder)illex.fs">
      <Link>AbstractIL\FsLexOut\illex.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\PrettyNaming.fsi">
      <Link>SyntaxTree\PrettyNaming.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\PrettyNaming.fs">
      <Link>SyntaxTree\PrettyNaming.fs</Link>
    </Compile>
    <FsLex Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\pplex.fsl">
      <OtherFlags>--module Fantomas.FCS.PPLexer --internal --open Fantomas.FCS.Lexhelp --open Internal.Utilities.Text.Lexing --open Fantomas.FCS.PPParser --unicode --lexlib Internal.Utilities.Text.Lexing</OtherFlags>
      <Link>SyntaxTree\pplex.fsl</Link>
    </FsLex>
    <FsYacc Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\pppars.fsy">
      <OtherFlags>--module Fantomas.FCS.PPParser --open Fantomas.FCS --open Fantomas.FCS.Syntax --open Fantomas.FCS.ParseHelpers --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing --buffer-type-argument char</OtherFlags>
      <Link>SyntaxTree\pppars.fsy</Link>
    </FsYacc>
    <FsLex Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\lex.fsl">
      <OtherFlags>--module Fantomas.FCS.Lexer --open Fantomas.FCS.Lexhelp --open Internal.Utilities.Text.Lexing --open Fantomas.FCS.Parser --open Fantomas.FCS.Text --open Fantomas.FCS.ParseHelpers --internal --unicode --lexlib Internal.Utilities.Text.Lexing</OtherFlags>
      <Link>SyntaxTree\lex.fsl</Link>
    </FsLex>
    <FsYacc Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\pars.fsy">
      <OtherFlags>--module Fantomas.FCS.Parser --open Fantomas.FCS --open Fantomas.FCS.Syntax --open Fantomas.FCS.Text --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing --buffer-type-argument char</OtherFlags>
      <Link>SyntaxTree\pars.fsy</Link>
    </FsYacc>
    <None Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\pplex.fsl">
      <Link>SyntaxTree\FsLex\pplex.fsl</Link>
    </None>
    <None Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\lex.fsl">
      <Link>SyntaxTree\FsLex\lex.fsl</Link>
    </None>
    <None Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\pppars.fsy">
      <Link>SyntaxTree\FsYacc\pppars.fsy</Link>
    </None>
    <None Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\pars.fsy">
      <Link>SyntaxTree\FsYacc\pars.fsy</Link>
    </None>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\UnicodeLexing.fsi">
      <Link>SyntaxTree\UnicodeLexing.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\UnicodeLexing.fs">
      <Link>SyntaxTree\UnicodeLexing.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\XmlDoc.fsi">
      <Link>SyntaxTree\XmlDoc.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\XmlDoc.fs">
      <Link>SyntaxTree\XmlDoc.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\SyntaxTrivia.fsi">
      <Link>SyntaxTree\SyntaxTrivia.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\SyntaxTrivia.fs">
      <Link>SyntaxTree\SyntaxTrivia.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\SyntaxTree.fsi">
      <Link>SyntaxTree\SyntaxTree.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\SyntaxTree.fs">
      <Link>SyntaxTree\SyntaxTree.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\SyntaxTreeOps.fsi">
      <Link>SyntaxTree\SyntaxTreeOps.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\SyntaxTreeOps.fs">
      <Link>SyntaxTree\SyntaxTreeOps.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\ParseHelpers.fsi">
      <Link>SyntaxTree\ParseHelpers.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\ParseHelpers.fs">
      <Link>SyntaxTree\ParseHelpers.fs</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)pppars.fsi">
      <Link>SyntaxTree\FsYaccOutput\pppars.fsi</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)pppars.fs">
      <Link>SyntaxTree\FsYaccOutput\pppars.fs</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)pars.fsi">
      <Link>SyntaxTree\FsYaccOutput\pars.fsi</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)pars.fs">
      <Link>SyntaxTree\FsYaccOutput\pars.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\LexHelpers.fsi">
      <Link>SyntaxTree\LexHelpers.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\LexHelpers.fs">
      <Link>SyntaxTree\LexHelpers.fs</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)pplex.fsi">
      <Link>SyntaxTree\FsLexOutput\pplex.fsi</Link>
    </Compile>
    <Compile Include="$(FsYaccOutputFolder)pplex.fs">
      <Link>SyntaxTree\FsLexOutput\pplex.fs</Link>
    </Compile>
<!--    <Compile Include="$(FsYaccOutputFolder)\lex.fsi">-->
<!--      <Link>SyntaxTree\FsLexOutput\lex.fsi</Link>-->
<!--    </Compile>-->
    <Compile Include="$(FsYaccOutputFolder)\lex.fs">
      <Link>SyntaxTree\FsLexOutput\lex.fs</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\LexFilter.fsi">
      <Link>SyntaxTree\LexFilter.fsi</Link>
    </Compile>
    <Compile Include="..\..\.deps\$(FCSCommitHash)\src\Compiler\SyntaxTree\LexFilter.fs">
      <Link>SyntaxTree\LexFilter.fs</Link>
    </Compile>
    <Compile Include="Parse.fsi" />
    <Compile Include="Parse.fs" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="FSharp.Core" />
    <PackageReference Include="System.Collections.Immutable" />
    <PackageReference Include="System.Diagnostics.DiagnosticSource"  />
    <PackageReference Include="System.Memory" />
    <PackageReference Include="System.Runtime" />
    <PackageReference Include="FsLexYacc" PrivateAssets="all" />
  </ItemGroup>

  <Target Name="AcquireCompilerFiles" Condition="!Exists('../../.deps/$(FCSCommitHash)')" BeforeTargets="CollectPackageReferences">
    <Exec Command="dotnet fsi ../../build.fsx -p Init" />
  </Target>
</Project>
