Crystal

To use this language, use the class "language-crystal".

Number literals with underscores and postfix

1_u32
123_456.789e-10_f64

Attributes

@[AlwaysInline]
def foo
	1
end

Macro expansions

{% for key, value in {foo: 100, bar: 20} %}
	def {{ key.id }}
		{{ value }}
	end
{% end %}

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.

Attriubte-like substrings

" @[AlwaysInline] "

Macro expansions in strings

" {{ foo }} "
" {% bar %} "