Add OCaml code generation #24

Merged
glen merged 8 commits from ocaml_gen into main 2021-03-01 20:40:35 +00:00
3 changed files with 24 additions and 6 deletions
Showing only changes of commit b1f87428f5 - Show all commits

View File

@ -41,7 +41,7 @@ steps:
- cd ../bin
- ln -s ../nailgun/nailgun-client/target/ng .
- cd ..
- bin/fosgen tests/emit_sum.fos
- bin/fosgen -d tests/emit_sum.fos
- name: extract_tests
image: xonsh/xonsh
commands:

View File

@ -74,8 +74,13 @@ then
fi
if [[ $USE_NAILGUN ]]
then
if [[ $SUPPRESS_ERR ]]
then
$BINDIR/let_sun_shine
else
$BINDIR/let_sun_shine noisy
fi
$BINDIR/ng sunshine transform -p $PROJDIR -n $LANGUAGE -i $PROGRAM
exit $?
fi

View File

@ -1,13 +1,21 @@
#!/bin/bash
# Helper for fosgen, not intended to be used directly
# With an argument, print diagnostic output
BINDIR=$(dirname $BASH_SOURCE)
if $BINDIR/ng sunshine --help
then
# echo "sun already shining."
:
if [[ $1 ]]
then
echo "sun already shining."
fi
else
# echo "disperse the clouds."
if [[ $1 ]]
then
echo "disperse the clouds."
fi
SUNJAR="$BINDIR/../lib/sunshine.jar"
PROJDIR="$BINDIR/.."
if [[ ! $MVN_REPO ]]; then
@ -21,7 +29,12 @@ else
echo "MVN_REPO to its full path and re-run."
exit 1
fi
if [[ $1 ]]
then
java -jar $SUNJAR server &
else
java -jar $SUNJAR server >/dev/null 2>&1 &
fi
sleep 5
$BINDIR/ng sunshine load -l $PROJDIR -l $MVN_REPO
fi