Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/isocpp.xml
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 60 | <list name="keywords"> | |||
---|---|---|---|---|---|
101 | <!-- Alternative operators (see 2.12) --> | 101 | <!-- Alternative operators (see 2.12) --> | ||
102 | <item>and</item> | 102 | <item>and</item> | ||
103 | <item>and_eq</item> | 103 | <item>and_eq</item> | ||
104 | <item>bitand</item> | 104 | <item>bitand</item> | ||
105 | <item>bitor</item> | 105 | <item>bitor</item> | ||
106 | <item>compl</item> | 106 | <item>compl</item> | ||
107 | <item>not</item> | 107 | <item>not</item> | ||
108 | <item>not_eq</item> | 108 | <item>not_eq</item> | ||
109 | <item>or</item> | 109 | <item>or</item> | ||
110 | <item>or_eq</item> | 110 | <item>or_eq</item> | ||
111 | <item>xor</item> | 111 | <item>xor</item> | ||
112 | <item>xor_eq</item> | 112 | <item>xor_eq</item> | ||
113 | <!-- Contract --> | 113 | <!-- Concept --> | ||
114 | <item>concept</item> | 114 | <item>concept</item> | ||
115 | <item>requires</item> | 115 | <item>requires</item> | ||
116 | <!-- TM TS --> | 116 | <!-- TM TS --> | ||
117 | <!-- <item>atomic_cancel</item> | 117 | <!-- <item>atomic_cancel</item> | ||
118 | <item>atomic_commit</item> | 118 | <item>atomic_commit</item> | ||
119 | <item>atomic_noexcept</item> | 119 | <item>atomic_noexcept</item> | ||
120 | <item>synchronized</item> | 120 | <item>synchronized</item> | ||
121 | <item>transaction_safe</item> | 121 | <item>transaction_safe</item> | ||
Show All 26 Lines | 144 | <list name="attributes"> | |||
148 | <!-- C++14 --> | 148 | <!-- C++14 --> | ||
149 | <item>deprecated</item> | 149 | <item>deprecated</item> | ||
150 | <!-- C++17 --> | 150 | <!-- C++17 --> | ||
151 | <item>fallthrough</item> | 151 | <item>fallthrough</item> | ||
152 | <item>nodiscard</item> | 152 | <item>nodiscard</item> | ||
153 | <item>maybe_unused</item> | 153 | <item>maybe_unused</item> | ||
154 | <!-- C++20 --> | 154 | <!-- C++20 --> | ||
155 | <item>likely</item> | 155 | <item>likely</item> | ||
156 | <item>unlikely</item> | | |||
157 | <item>no_unique_address</item> | | |||
158 | <!-- TM TS --> | | |||
159 | <!-- <item>optimize_for_synchronized</item> --> | | |||
160 | </list> | | |||
161 | <list name="contractAttributes"> | | |||
162 | <!-- C++20 --> | | |||
163 | <item>assert</item> | | |||
164 | <item>ensures</item> | | |||
165 | <item>expects</item> | | |||
166 | </list> | | |||
167 | <list name="contractLevel"> | | |||
168 | <!-- C++20 --> | 156 | <item>unlikely</item> | ||
169 | <item>default</item> | 157 | <item>no_unique_address</item> | ||
170 | <item>audit</item> | 158 | <!-- TM TS --> | ||
171 | <item>axiom</item> | 159 | <!-- <item>optimize_for_synchronized</item> --> | ||
172 | </list> | 160 | </list> | ||
173 | <!-- This keyword may appear in Attribute context. For example in code: | 161 | <!-- This keyword may appear in Attribute context. For example in code: | ||
174 | [[using CC: opt(1), debug]] | 162 | [[using CC: opt(1), debug]] | ||
175 | and it should be displayed as keyword, not like part of attribute... | 163 | and it should be displayed as keyword, not like part of attribute... | ||
176 | --> | 164 | --> | ||
177 | <list name="using"> | 165 | <list name="using"> | ||
178 | <item>using</item> | 166 | <item>using</item> | ||
179 | </list> | 167 | </list> | ||
▲ Show 20 Lines • Show All 305 Lines • ▼ Show 20 Line(s) | 471 | <context name="String" attribute="String" lineEndContext="#pop"> | |||
485 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" /> | 473 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" /> | ||
486 | <IncludeRules context="string special char" /> | 474 | <IncludeRules context="string special char" /> | ||
487 | </context> | 475 | </context> | ||
488 | 476 | | |||
489 | <context name="String8" attribute="String" lineEndContext="#pop"> | 477 | <context name="String8" attribute="String" lineEndContext="#pop"> | ||
490 | <IncludeRules context="string normal char" /> | 478 | <IncludeRules context="string normal char" /> | ||
491 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,2}" /> | 479 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,2}" /> | ||
492 | <IncludeRules context="string special char" /> | 480 | <IncludeRules context="string special char" /> | ||
493 | </context> | | |||
494 | 481 | </context> | |||
495 | <context name="String16" attribute="String" lineEndContext="#pop"> | 482 | | ||
496 | <IncludeRules context="string normal char" /> | 483 | <context name="String16" attribute="String" lineEndContext="#pop"> | ||
497 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" /> | 484 | <IncludeRules context="string normal char" /> | ||
498 | <IncludeRules context="string special char" /> | 485 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" /> | ||
499 | </context> | 486 | <IncludeRules context="string special char" /> | ||
500 | 487 | </context> | |||
501 | <context name="String32" attribute="String" lineEndContext="#pop"> | 488 | | ||
502 | <IncludeRules context="string normal char" /> | 489 | <context name="String32" attribute="String" lineEndContext="#pop"> | ||
503 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" /> | 490 | <IncludeRules context="string normal char" /> | ||
504 | <IncludeRules context="string special char" /> | 491 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" /> | ||
505 | </context> | | |||
506 | | ||||
507 | <context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | | |||
508 | <RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" /> | | |||
509 | </context> | | |||
510 | 492 | <IncludeRules context="string special char" /> | |||
511 | <context name="string special char" attribute="String" lineEndContext="#pop"> | 493 | </context> | ||
512 | <RegExpr attribute="String Char" context="#stay" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|&printf_like;" /> | 494 | | ||
513 | <RegExpr attribute="Error" context="#stay" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)" /> | 495 | <context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
514 | <LineContinue attribute="String" context="#stay" /> | 496 | <RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" /> | ||
515 | </context> | 497 | </context> | ||
516 | 498 | | |||
517 | <context name="string normal char" attribute="String" lineEndContext="#pop"> | 499 | <context name="string special char" attribute="String" lineEndContext="#pop"> | ||
518 | <!-- fast way, can be replaced by a `UntilChars` rule if it exists --> | 500 | <RegExpr attribute="String Char" context="#stay" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|&printf_like;" /> | ||
519 | <RegExpr attribute="String" context="#stay" String="[^%\\"]+" /> | 501 | <RegExpr attribute="Error" context="#stay" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)" /> | ||
520 | <DetectChar attribute="String" context="UDLStringSuffix" char=""" /> | 502 | <LineContinue attribute="String" context="#stay" /> | ||
521 | </context> | 503 | </context> | ||
522 | 504 | | |||
523 | <context name="UDLStringSuffix" attribute="String" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"> | 505 | <context name="string normal char" attribute="String" lineEndContext="#pop"> | ||
524 | <WordDetect attribute="Standard Classes" context="#pop#pop" String="sv" /> | 506 | <!-- fast way, can be replaced by a `UntilChars` rule if it exists --> | ||
525 | <WordDetect attribute="Standard Classes" context="#pop#pop" String="s" /> | 507 | <RegExpr attribute="String" context="#stay" String="[^%\\"]+" /> | ||
526 | <RegExpr attribute="UDL String Suffix" context="#pop#pop" String="_[_0-9A-Za-z]*\b" /> | 508 | <DetectChar attribute="String" context="UDLStringSuffix" char=""" /> | ||
527 | </context> | 509 | </context> | ||
528 | 510 | | |||
529 | 511 | <context name="UDLStringSuffix" attribute="String" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"> | |||
530 | <context name="Attribute" attribute="Attribute" lineEndContext="#stay"> | 512 | <WordDetect attribute="Standard Classes" context="#pop#pop" String="sv" /> | ||
531 | <DetectSpaces/> | 513 | <WordDetect attribute="Standard Classes" context="#pop#pop" String="s" /> | ||
532 | <keyword attribute="Standard Attribute" context="#stay" String="attributes" /> | 514 | <RegExpr attribute="UDL String Suffix" context="#pop#pop" String="_[_0-9A-Za-z]*\b" /> | ||
533 | <keyword attribute="Standard Attribute" context="Contract Attribute" String="contractAttributes" /> | 515 | </context> | ||
534 | <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" /> | 516 | | ||
535 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | 517 | | ||
536 | <AnyChar attribute="Symbol" context="#stay" String="&punctuators;" /> | 518 | <context name="Attribute" attribute="Attribute" lineEndContext="#stay"> | ||
537 | <!-- Attributes may contain some text: [[deprecated("Reason text")]] --> | 519 | <DetectSpaces/> | ||
538 | <DetectChar attribute="String" context="String" char=""" /> | 520 | <keyword attribute="Standard Attribute" context="#stay" String="attributes" /> | ||
539 | <AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" /> | 521 | <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" /> | ||
540 | <keyword attribute="Keyword" context="AttributeNamespace" String="using" /> | 522 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||
541 | <IncludeRules context="DetectGccAttributes##GCCExtensions" /> | 523 | <AnyChar attribute="Symbol" context="#stay" String="&punctuators;" /> | ||
542 | <RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" /> | 524 | <!-- Attributes may contain some text: [[deprecated("Reason text")]] --> | ||
543 | <DetectIdentifier /> | 525 | <DetectChar attribute="String" context="String" char=""" /> | ||
544 | </context> | 526 | <AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" /> | ||
545 | 527 | <keyword attribute="Keyword" context="AttributeNamespace" String="using" /> | |||
546 | <context name="Contract Attribute" attribute="Attribute" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | 528 | <IncludeRules context="DetectGccAttributes##GCCExtensions" /> | ||
547 | <DetectSpaces/> | 529 | <RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" /> | ||
548 | <keyword attribute="Standard Attribute" context="#pop" String="contractLevel" /> | 530 | <DetectIdentifier /> | ||
549 | </context> | 531 | </context> | ||
550 | 532 | | |||
551 | <context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop"> | 533 | <context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop"> | ||
552 | <IncludeRules context="InPreprocessor" /> | 534 | <IncludeRules context="InPreprocessor" /> | ||
553 | <IncludeRules context="Attribute" /> | 535 | <IncludeRules context="Attribute" /> | ||
554 | </context> | 536 | </context> | ||
555 | 537 | | |||
556 | <context name="AttributeNamespace" attribute="Attribute" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 538 | <context name="AttributeNamespace" attribute="Attribute" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines |