4 Tokens
*TokenFactory(string type
)
10 }else if (type
== "svn"){
11 ret
= new TokensSvn();
14 DBG("factory(" << type
<< ") - ret: " << (long)ret
);
19 Tokens::Tokens(const char *f_tok
,
30 Tokens::token
Tokens::match(QString
&line
) const
32 if (file_tok
.indexIn(line
) != -1){
34 }else if (hunk_tok
.indexIn(line
) != -1){
36 }else if (context_tok
.indexIn(line
) != -1){
38 }else if (added_tok
.indexIn(line
) != -1){
40 }else if (deleted_tok
.indexIn(line
) != -1){
47 /* CONCRETE TOKENS: */
48 TokensGit::TokensGit() : Tokens::Tokens("^diff --git a/([^ ]+) b/.*$",
49 "^@@ -([0-9]+),.* \\+([0-9]+),.*$",
54 TokensSvn::TokensSvn() : Tokens::Tokens("^Index: ([^ ]+).*$",
55 "^@@ -([0-9]+),.* \\+([0-9]+),.*$",