Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that ate functions on C lexer #702

Merged
merged 1 commit into from Nov 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion lexers/embedded/c.xml
Expand Up @@ -218,6 +218,9 @@
<token type="Punctuation"/>
</bygroups>
</rule>
<rule pattern="\b[A-Za-z_]\w*(?=\s*\()">
<token type="NameFunction"/>
</rule>
<rule pattern="[a-zA-Z_]\w*">
<token type="Name"/>
</rule>
Expand All @@ -226,7 +229,7 @@
<rule>
<include state="whitespace"/>
</rule>
<rule pattern="((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)|\b[a-z_]\w*(?=\s*\()">
<rule pattern="((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)">
<bygroups>
<usingself state="root"/>
<token type="NameFunction"/>
Expand Down