Permalink
Browse files

Fixed unparenthesed versions of else elseif.

Added option to parentheses after the if* preprocessor directives.
Added test statements for the abovementioned addition.

Signed-off-by: Martin Carlson <spearalot@gmail.com>
  • Loading branch information...
1 parent a1dfba5 commit 0b45f287a6f1476ed49320d716593c39dfd532f0 @spearalot spearalot committed Mar 16, 2010
Showing with 7 additions and 1 deletion.
  1. +1 −1 syntax/erlang.vim
  2. +6 −0 test/test.erl
View
@@ -67,7 +67,7 @@ syn match erlangAttribute /^-\%(vsn\|author\|copyright\|compi
syn match erlangInclude /^-include\%(_lib\)\? *(\@=/
syn match erlangRecordDef /^-record *(\@=/
syn match erlangDefine /^-\%(define\|undef\) *(\@=/
-syn match erlangPreCondit /^-\%(ifdef\|ifndef\|else\|endif\) *(\@=/
+syn match erlangPreCondit /^-\%(ifdef\|ifndef\|else\|endif\)\%( *(\@=\)\?/
syn match erlangType /^-\%(spec\|type\)[( ]\@=/
View
@@ -17,6 +17,12 @@
-ifdef(AO).
-endif(AO).
+-ifndef(FOO).
+-define(FOO, true).
+-else.
+-define(FOO, false).
+-endif.
+
start() -> foo(), bar().
foo(#foo{bar = Bar, test = Test}) ->

0 comments on commit 0b45f28

Please sign in to comment.