summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-08-28 11:27:14 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-08-28 11:27:14 (GMT)
commit1d8610c90ba279bb207f0d45f96cef3054ff34eb (patch)
treee7ebd37ddf367a4d34a9f52b24de0667bdc8f98c /src/scanner.l
parent63dc5b9b1b3e8fb875304a954e4df934b249034b (diff)
downloadDoxygen-1d8610c90ba279bb207f0d45f96cef3054ff34eb.zip
Doxygen-1d8610c90ba279bb207f0d45f96cef3054ff34eb.tar.gz
Doxygen-1d8610c90ba279bb207f0d45f96cef3054ff34eb.tar.bz2
bug_647654 Special command \fn fails when first argument of PHP function is call-by-reference
The handling of `(&$var` for php was not included at all places. It was handled with the rules (in scanner.l): ``` <FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */$ <FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) or int (*fun c(int))[], the ^ is for Obj-C blocks */$ ```
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 7c710fa..e4e7184 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -6505,10 +6505,17 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN( ReadFuncArgType ) ;
}
<Prototype>"("({ID}"::")*({B}*[&*])+ {
- yyextra->current->type+=yyextra->current->name+yytext;
- yyextra->current->name.resize(0);
- BEGIN( PrototypePtr );
- }
+ if (yyextra->insidePHP) // reference parameter
+ {
+ REJECT;
+ }
+ else
+ {
+ yyextra->current->type+=yyextra->current->name+yytext;
+ yyextra->current->name.resize(0);
+ BEGIN( PrototypePtr );
+ }
+ }
<PrototypePtr>{SCOPENAME} {
yyextra->current->name+=yytext;
}