Unified · Split
| @@ -494,6 +494,26 @@ Prism.languages.insertBefore('coffeescript', 'keyword', { · 493 unmodified lines | |||
| 494 | 'attr-name': /[_?a-z-|A-Z-]+(\s*:)| @[_?$?a-z-|A-Z-]+(\s*)| /g | 494 | 'attr-name': /[_?a-z-|A-Z-]+(\s*:)| @[_?$?a-z-|A-Z-]+(\s*)| /g |
| 495 | }); | 495 | }); |
| 496 | ; | 496 | ; |
| 497 | Prism.languages.c = Prism.languages.extend('clike', { | ||
| 498 | 'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/g, | ||
| 499 | 'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|={1,2}|\^|~|%|(&){1,2}|\|?\||\?|\*|\//g | ||
| 500 | }); | ||
| 501 | |||
| 502 | Prism.languages.insertBefore('c', 'keyword', { | ||
| 503 | //property class reused for macro statements | ||
| 504 | 'property': { | ||
| 505 | pattern:/#[a-zA-Z]+\ .*/g, | ||
| 506 | inside: { | ||
| 507 | property: /<[a-zA-Z.]+>/g | ||
| 508 | } | ||
| 509 | } | ||
| 510 | }); | ||
| 511 | ; | ||
| 512 | Prism.languages.cpp = Prism.languages.extend('c', { | ||
| 513 | 'keyword': /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|delete\[\]|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|new\[\]|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/g, | ||
| 514 | 'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|(&){1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/g | ||
| 515 | }); | ||
| 516 | ; | ||
| 497 | Prism.languages.python= { | 517 | Prism.languages.python= { |
| 498 | 'comment': { | 518 | 'comment': { |
| 499 | pattern: /(^|[^\\])#.*?(\r?\n|$)/g, | 519 | pattern: /(^|[^\\])#.*?(\r?\n|$)/g, |