mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ide: Fixed parsing >> as nested template brackets (Bug #361)
git-svn-id: svn://ultimatepp.org/upp/trunk@5586 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6ee120de30
commit
078fad738d
1 changed files with 16 additions and 0 deletions
|
|
@ -300,6 +300,14 @@ String Parser::TemplateParams(String& param)
|
|||
}
|
||||
}
|
||||
else
|
||||
if(Key(t_shr) && level >= 2) {
|
||||
level -= 2;
|
||||
if(level <= 0) {
|
||||
ScAdd(param, id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if(Key('<'))
|
||||
level++;
|
||||
else
|
||||
|
|
@ -517,6 +525,11 @@ int Parser::RPtr()
|
|||
n++;
|
||||
}
|
||||
else
|
||||
if(t == t_shr && tlevel >= 2) {
|
||||
tlevel -= 2;
|
||||
n++;
|
||||
}
|
||||
else
|
||||
if(t == t_dblcolon || lex.IsId(n) || t == ',' && tlevel > 0)
|
||||
n++;
|
||||
else
|
||||
|
|
@ -791,6 +804,9 @@ String Parser::Tparam(int& q)
|
|||
level++;
|
||||
if(lex[q] == '>')
|
||||
level--;
|
||||
else
|
||||
if(lex[q] == t_shr && level >= 2)
|
||||
level -= 2;
|
||||
q++;
|
||||
}
|
||||
return String(p, lex.Pos(q));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue