<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pygments-git.git/tests/examplefiles/cpp/functions.cpp, branch 2.12.0</title>
<subtitle>github.com: pygments/pygments.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/'/>
<entry>
<title>CFamily: improve function detection (#2008)</title>
<updated>2021-12-30T14:40:59+00:00</updated>
<author>
<name>amitkummer</name>
<email>49096391+amitkummer@users.noreply.github.com</email>
</author>
<published>2021-12-30T14:40:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=ed2bdcdadaff58c183d5127e0af77e72b7b7f501'/>
<id>ed2bdcdadaff58c183d5127e0af77e72b7b7f501</id>
<content type='text'>
Detect function with return types of more than a single word length
(like `unsigned int` or `long long`).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detect function with return types of more than a single word length
(like `unsigned int` or `long long`).</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes for C and C++ functions and namespaces (#1722)</title>
<updated>2021-02-27T16:32:41+00:00</updated>
<author>
<name>amitkummer</name>
<email>49096391+amitkummer@users.noreply.github.com</email>
</author>
<published>2021-02-27T16:32:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=c1a0d82acbe6fa026a1f6843fee00cc1df626549'/>
<id>c1a0d82acbe6fa026a1f6843fee00cc1df626549</id>
<content type='text'>
* Fix lexing of function names

This fixes #1561.

Add a keywords state that matches inside and outside functions for
keywords.

Before this, when a keyword would appear the lexer would go to the
statements state, in which functions were not matched.

* Add tests for lexing of function names

* Unbreak previous tests

* Allow namespaced names in function statements

Add a second identifiers regex that matces all the previous identifiers
and also '::'.

I took the decision to create a second identifiers regex with '::'
inside, simply because using the old identifiers regex would hurt
performance massively on every solution I tried to craft.

* Add tests for namespaced names in functions

* Unbreak previous tests

* Add support for namespaces in namespace declarations

Add a namespace state that is entered each time the namespace keyword
is matched and lexes all name matches as namespaces.

Cases this approach doesn't cover:
* Namespaces in using declarations.
* Namespaces that prefix names in random code.
Unfortunately, in both of these cases the names before and after '::'
are not always namespaces.

* Add tests for namespace declartions

* Unbreak previous tests

* Tidy functions regex

Remove group nesting that became unneeded after fc56ab8 (the last big
refactor).

* Remove f string usage I introduced by mistake</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix lexing of function names

This fixes #1561.

Add a keywords state that matches inside and outside functions for
keywords.

Before this, when a keyword would appear the lexer would go to the
statements state, in which functions were not matched.

* Add tests for lexing of function names

* Unbreak previous tests

* Allow namespaced names in function statements

Add a second identifiers regex that matces all the previous identifiers
and also '::'.

I took the decision to create a second identifiers regex with '::'
inside, simply because using the old identifiers regex would hurt
performance massively on every solution I tried to craft.

* Add tests for namespaced names in functions

* Unbreak previous tests

* Add support for namespaces in namespace declarations

Add a namespace state that is entered each time the namespace keyword
is matched and lexes all name matches as namespaces.

Cases this approach doesn't cover:
* Namespaces in using declarations.
* Namespaces that prefix names in random code.
Unfortunately, in both of these cases the names before and after '::'
are not always namespaces.

* Add tests for namespace declartions

* Unbreak previous tests

* Tidy functions regex

Remove group nesting that became unneeded after fc56ab8 (the last big
refactor).

* Remove f string usage I introduced by mistake</pre>
</div>
</content>
</entry>
</feed>
