1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

lexers/r: Match keywords prior to functions (#860)

This commit is contained in:
Watal M. Iwasaki 2023-09-25 18:57:51 +09:00 committed by GitHub
parent 827bd93b8c
commit 7eb0305e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,9 @@
</rule>
</state>
<state name="root">
<rule>
<include state="keywords"/>
</rule>
<rule pattern="((?:`[^`\\]*(?:\\.[^`\\]*)*`)|(?:(?:[a-zA-z]|[_.][^0-9])[\w_.]*))\s*(?=\()">
<token type="NameFunction"/>
</rule>
@ -108,9 +111,6 @@
<rule>
<include state="numbers"/>
</rule>
<rule>
<include state="keywords"/>
</rule>
<rule>
<include state="punctuation"/>
</rule>