From: Junio C Hamano Date: Mon, 24 Jan 2011 18:54:12 +0000 (-0800) Subject: Merge branch 'as/userdiff-pascal' X-Git-Tag: v1.7.4-rc3~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/342953a6860915b4b66dfb24147c46a191342daf?hp=-c Merge branch 'as/userdiff-pascal' * as/userdiff-pascal: userdiff: match Pascal class methods --- 342953a6860915b4b66dfb24147c46a191342daf diff --combined userdiff.c index c384b39e4d,234697821d..9ebf231ea5 --- a/userdiff.c +++ b/userdiff.c @@@ -52,7 -52,7 +52,7 @@@ PATTERNS("objc" "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->" "|[^[:space:]]|[\x80-\xff]+"), PATTERNS("pascal", - "^((procedure|function|constructor|destructor|interface|" + "^(((class[ \t]+)?(procedure|function)|constructor|destructor|interface|" "implementation|initialization|finalization)[ \t]*.*)$" "\n" "^(.*=[ \t]*(class|record).*)$", @@@ -61,23 -61,6 +61,23 @@@ "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+" "|<>|<=|>=|:=|\\.\\." "|[^[:space:]]|[\x80-\xff]+"), +PATTERNS("perl", + "^[ \t]*package .*;\n" + "^[ \t]*sub .* \\{\n" + "^[A-Z]+ \\{\n" /* BEGIN, END, ... */ + "^=head[0-9] ", /* POD */ + /* -- */ + "[[:alpha:]_'][[:alnum:]_']*" + "|0[xb]?[0-9a-fA-F_]*" + /* taking care not to interpret 3..5 as (3.)(.5) */ + "|[0-9a-fA-F_]+(\\.[0-9a-fA-F_]+)?([eE][-+]?[0-9_]+)?" + "|=>|-[rwxoRWXOezsfdlpSugkbctTBMAC>]|~~|::" + "|&&=|\\|\\|=|//=|\\*\\*=" + "|&&|\\|\\||//|\\+\\+|--|\\*\\*|\\.\\.\\.?" + "|[-+*/%.^&<>=!|]=" + "|=~|!~" + "|<<|<>|<=>|>>" + "|[^[:space:]]"), PATTERNS("php", "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n" "^[\t ]*(class.*)$",