Warning, /frameworks/syntax-highlighting/autotests/folding/highlight.erl.fold is written in an unsupported language. File is not indexed.

0001 % testing for the erlang syntax highlighter
0002 % NOTE alerts work in comments to TODO !
0003 
0004 % pragmas (show as keywords)
0005 -module
0006 -export
0007 -define
0008 -undef
0009 -ifdef
0010 -ifndef
0011 -else
0012 -endif
0013 -include
0014 -include_lib
0015 
0016 % key words
0017 after begin case catch cond  end fun if let of query receive all_true some_true 
0018 
0019 % operators
0020 div rem or xor bor bxor bsl bsr and band not bnot
0021 + - * / == /= =:= =/= < =< > >= ++ -- = ! <-
0022 
0023 % separators (show as functions)
0024 ( ) { } [ ] . : | || ; , ? -> #
0025 
0026 % functions - predefined (part of erlang module) - show as functions
0027 abs accept alarm apply atom_to_list binary_to_list binary_to_term check_process_code
0028 concat_binary date delete_module disconnect_node element erase exit float float_to_list
0029 garbage_collect get get_keys group_leader halt hd integer_to_list is_alive is_atom is_binary
0030 is_boolean is_float is_function is_integer is_list is_number is_pid is_port is_process_alive
0031 is_record is_reference is_tuple length link list_to_atom list_to_binary list_to_float list_to_integer
0032 list_to_pid list_to_tuple load_module loaded localtime make_ref module_loaded node nodes now
0033 open_port pid_to_list port_close port_command port_connect port_control ports pre_loaded process_flag
0034 process_info processes purge_module put register registered round self setelement size
0035 spawn spawn_link spawn_opt split_binary statistics term_to_binary throw time tl trunc tuple_to_list
0036 unlink unregister whereis
0037 
0038 % functions - inferred
0039 module:function
0040 function()
0041 
0042 % atoms (show as "char")
0043 % begin with underscore, lowercase, contain numbers letters and @ - or anything between ''
0044 middle_underscore
0045 abc ab4d a@cd8 a@
0046 'And this is (\012) an atom \' Atoo' Variable 'atom again' 
0047 
0048 % variables (begin with capital letter or underscore, contain numbers, letters and @)
0049 _leadingUnderscore AbdD@ B45@c
0050 
0051 % this is a string 
0052 "a string sits between \" double quotes" atom "more string"
0053 
0054 % integers (decimal)
0055 1. 234 $A
0056 
0057 % integers (specified base)
0058 2#10101 34#567
0059 
0060 % float
0061 12.23 12.9e-67 12.8E+89 33.34e89
0062 
0063 % and finally some real code, so we can see what it looks like...
0064 -module(codetest).                      % everything is in a module
0065 -export([fac/1]).               % name and number of arguments - need this to be called outside of the module
0066 
0067 fac(N) when N > 0  -> N * fac(N-1);
0068 fac(N) when N == 0 -> 1.