From 1c564523e7b46352c407ca7380e94397330dc07c Mon Sep 17 00:00:00 2001 From: Alexey Slaykovsky Date: Thu, 13 Mar 2014 17:26:17 +0900 Subject: [PATCH 1/2] Added simple Erlang Selection Based Evaluation. ;) --- examples/example.erl | 5 +++++ lib/grammars.coffee | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 examples/example.erl diff --git a/examples/example.erl b/examples/example.erl new file mode 100644 index 00000000..a5949d3c --- /dev/null +++ b/examples/example.erl @@ -0,0 +1,5 @@ +-module(example). +-export([hello/0]). + +hello() -> + io:format("Hello, World!~n"). diff --git a/lib/grammars.coffee b/lib/grammars.coffee index 97cceddd..836d4cf2 100644 --- a/lib/grammars.coffee +++ b/lib/grammars.coffee @@ -56,3 +56,7 @@ module.exports = "File Based": (filename) -> [filename] #command: "ghc" #"Selection Based": (code) -> ['-e', code] + + Erlang: + command: "erl" + "Selection Based": (code) -> ['-noshell', '-eval', code+', init:stop().'] From a87eb68cee5dcfeee7540f02e0cfa833657f8b7e Mon Sep 17 00:00:00 2001 From: Alexey Slaykovsky Date: Thu, 13 Mar 2014 23:30:36 +0900 Subject: [PATCH 2/2] Added Erlang in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6f5fe0f1..052aa1e2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Currently supports: * PHP * Python * Ruby + * Erlang (Only Selection Based runs. It's not support functions and full power of REPL yet.) You only have to add a few lines in a PR to support another.