userdiff: add Elixir to supported userdiff languages
Adds support for xfuncref in Elixir[1] language which is Ruby-like language that runs on Erlang[3] Virtual Machine (BEAM). [1]: https://elixir-lang.org [2]: https://www.erlang.org Signed-off-by: Łukasz Niemier <lukasz@niemier.pl> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
da72936f54
commit
a807200f67
12
userdiff.c
12
userdiff.c
@ -32,6 +32,18 @@ PATTERNS("dts",
|
||||
/* Property names and math operators */
|
||||
"[a-zA-Z0-9,._+?#-]+"
|
||||
"|[-+*/%&^|!~]|>>|<<|&&|\\|\\|"),
|
||||
PATTERNS("elixir",
|
||||
"^[ \t]*((def(macro|module|impl|protocol|p)?|test)[ \t].*)$",
|
||||
/* Atoms, names, and module attributes */
|
||||
"|[@:]?[a-zA-Z0-9@_?!]+"
|
||||
/* Numbers with specific base */
|
||||
"|[-+]?0[xob][0-9a-fA-F]+"
|
||||
/* Numbers */
|
||||
"|[-+]?[0-9][0-9_.]*([eE][-+]?[0-9_]+)?"
|
||||
/* Operators and atoms that represent them */
|
||||
"|:?(\\+\\+|--|\\.\\.|~~~|<>|\\^\\^\\^|<?\\|>|<<<?|>?>>|<<?~|~>?>|<~>|<=|>=|===?|!==?|=~|&&&?|\\|\\|\\|?|=>|<-|\\\\\\\\|->)"
|
||||
/* Not real operators, but should be grouped */
|
||||
"|:?%[A-Za-z0-9_.]\\{\\}?"),
|
||||
IPATTERN("fortran",
|
||||
"!^([C*]|[ \t]*!)\n"
|
||||
"!^[ \t]*MODULE[ \t]+PROCEDURE[ \t]\n"
|
||||
|
Reference in New Issue
Block a user