Skip to content

Commit

Permalink
Fable support
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave committed Oct 18, 2020
1 parent 591e829 commit 2882351
Show file tree
Hide file tree
Showing 116 changed files with 5,090 additions and 404 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
}
]
}
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 2882351

Please sign in to comment.