Skip to content

Commit

Permalink
Fable support
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave committed Oct 27, 2020
1 parent bd3f38e commit 73c898c
Show file tree
Hide file tree
Showing 115 changed files with 5,090 additions and 403 deletions.
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/artifacts/bin/fcs-fable-test/Debug/netcoreapp3.1/fcs-fable-test.dll",
"args": [],
"cwd": "${workspaceFolder}/fcs/fcs-fable/test",
"console": "internalConsole",
"stopAtEntry": false
}
]
}
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<!-- https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json; --></RestoreSources>
<!-- System.* packages -->
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
<SystemCollectionsImmutableVersion>5.0.0-preview.8.20407.11</SystemCollectionsImmutableVersion>
<SystemCollectionsImmutableVersion>1.7.1</SystemCollectionsImmutableVersion>
<SystemConsoleVersion>4.3.0</SystemConsoleVersion>
<SystemDataSqlClientPackageVersion>4.3.0</SystemDataSqlClientPackageVersion>
<SystemDesignVersion>4.0.0</SystemDesignVersion>
Expand All @@ -81,7 +81,7 @@
<SystemNetRequestsVersion>4.3.0</SystemNetRequestsVersion>
<SystemNetSecurityVersion>4.3.0</SystemNetSecurityVersion>
<SystemReflectionEmitVersion>4.3.0</SystemReflectionEmitVersion>
<SystemReflectionMetadataVersion>5.0.0-preview.8.20407.11</SystemReflectionMetadataVersion>
<SystemReflectionMetadataVersion>1.8.1</SystemReflectionMetadataVersion>
<SystemReflectionTypeExtensionsVersion>4.3.0</SystemReflectionTypeExtensionsVersion>
<SystemRuntimeCachingVersion>1.5.0</SystemRuntimeCachingVersion>
<SystemRuntimeVersion>4.3.0</SystemRuntimeVersion>
Expand Down
30 changes: 30 additions & 0 deletions fcs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

# cd to root
cd $(dirname $0)/..

# build fslex/fsyacc tools
dotnet build -c Release src/buildtools/buildtools.proj
# dotnet build -c Release src/fsharp/FSharp.Compiler.Service

# FCS-Fable codegen
cd fcs/fcs-fable/codegen
dotnet build -c Release
dotnet run -c Release -- ../../../src/fsharp/FSComp.txt FSComp.fs
dotnet run -c Release -- ../../../src/fsharp/fsi/FSIstrings.txt FSIstrings.fs

# replace all #line directives with comments
files="lex.fs pplex.fs illex.fs ilpars.fs pars.fs pppars.fs"
for file in $files; do
echo "Replace #line directives with comments in $file"
sed -i 's/^# [0-9]/\/\/\0/' $file # comment #line directives
sed -i 's/^\(\/\/# [0-9]\{1,\} "\).*\/codegen\//\1/' $file # cleanup #line paths
done

# FCS-Fable build
cd ..
dotnet build -c Release

# # run test
# cd test
# dotnet run -c Release
3 changes: 3 additions & 0 deletions fcs/fcs-fable/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Codegen
codegen/*.fs
codegen/*.fsi
Loading

0 comments on commit 73c898c

Please sign in to comment.