C-like

The C-like component is not really a language on its own, it is the basis of many other components. To use it directly, however, use the class "language-clike".

Comments

// Single line comment
/* Multi-line
comment */

Strings

"foo \"bar\" baz";
'foo \'bar\' baz';

Numbers

123
123.456
-123.456
1e-23
123.456E789
0xaf
0xAF

Functions

foo();
Bar();
_456();

Known failures

There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter. However, Prism dares to be open and honest about them. If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.

Comment-like substrings

"foo /* bar */ baz"; "foo // bar";