gs-weblang-cli
CLI for the Gobstones interpreter
Install
# requires node > 4 sudo npm install -g gs-weblang-cli
Run tests
npm test
Building wrapper
The cli can be wrapped as an executable using nexe: npm install nexe -g
.
git clone https://github.com/gobstones/gs-weblang-cli
cd gs-weblang-cli
nexe -i src/index.js -o gs-weblang-cli
Usage
gs-weblang-cli --help
Run
passed
echo "program {\n Poner(Rojo)\n }" > /tmp/gobs.gbsgs-weblang-cli /tmp/gobs.gbs -f gbb
compilation_error
echo "programita {\n Poner(Rojo)\n }" > /tmp/gobs.gbsgs-weblang-cli /tmp/gobs.gbs
runtime_error
echo "program {\n Ponerrrrr(Rojo)\n }" > /tmp/gobs.gbsgs-weblang-cli /tmp/gobs.gbs
}
all_is_broken_error
This one shouldn't happen very often, but for now... 😅
echo "" > /tmp/gobs.gbsgs-weblang-cli /tmp/gobs.gbs
Batch run
request.json
:
gs-weblang-cli --batch request.json# returns an array with the responses
Generate AST
echo "program {\n Poner(Azul)\n }" | gs-weblang-cli --ast --from_stdin