Skip to content

Commit c256661

Browse files
committed
Merge branch 'aj/ada-diff-word-pattern'
* aj/ada-diff-word-pattern: userdiff: update Ada patterns
2 parents 53c2a59 + 39a87a2 commit c256661

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

t/t4034/ada/expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<BOLD>+++ b/post<RESET>
55
<CYAN>@@ -1,13 +1,13 @@<RESET>
66
Ada.Text_IO.Put_Line("Hello World<RED>!<RESET><GREEN>?<RESET>");
7-
1 1e<RED>-<RESET>10 16#FE12#E2 3.141_592 '<RED>x<RESET><GREEN>y<RESET>'
7+
1 <RED>1e-10<RESET><GREEN>1e10<RESET> 16#FE12#E2 3.141_592 '<RED>x<RESET><GREEN>y<RESET>'
88
<RED>a<RESET><GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
99
<RED>a<RESET><GREEN>y<RESET>
1010
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b<RESET>

userdiff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ static int drivers_alloc;
1515
word_regex "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+" }
1616
static struct userdiff_driver builtin_drivers[] = {
1717
IPATTERN("ada",
18-
"!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n"
18+
"!^(.*[ \t])?(is[ \t]+new|renames|is[ \t]+separate)([ \t].*)?$\n"
1919
"!^[ \t]*with[ \t].*$\n"
2020
"^[ \t]*((procedure|function)[ \t]+.*)$\n"
2121
"^[ \t]*((package|protected|task)[ \t]+.*)$",
2222
/* -- */
2323
"[a-zA-Z][a-zA-Z0-9_]*"
24-
"|[0-9][-+0-9#_.eE]"
24+
"|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?"
2525
"|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"),
2626
IPATTERN("fortran",
2727
"!^([C*]|[ \t]*!)\n"

0 commit comments

Comments
 (0)