[erlang-questions] indentation-sensitive erlang

Ulf Wiger ulf@REDACTED
Wed Mar 19 18:31:14 CET 2008


2008/3/11, Ulf Wiger <ulf@REDACTED>:
>
>  - I'd like to try (= see someone else implement) an indentation-sensitive
>   front-end to the compiler,

Ok, so I did try it myself:

http://ulf.wiger.net/weblog/2008/03/19/indentation-sensitive-erlang/

(Inspired by Chris Okasaki's blog article).

Surely someone else could do a better job, but it's a start, at least.

The following senseless program compiled:

-module(test).

-compile(export_all).
-scan(indentation).

f(X) ->
    X+2
.

g(X) ->
    X+4
.

h(X) ->
    Y = case X of
          a ->
            {a}
          b ->
            {b}
    end
    Y
.


BR,
Ulf W



More information about the erlang-questions mailing list