Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 0b45f287a6f1476ed49320d716593c39dfd532f0 1 parent a1dfba5
@spearalot spearalot authored
Showing with 7 additions and 1 deletion.
  1. +1 −1  syntax/erlang.vim
  2. +6 −0 test/test.erl
View
2  syntax/erlang.vim
@@ -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
6 test/test.erl
@@ -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}) ->
Please sign in to comment.
Something went wrong with that request. Please try again.