use prism-tomorrow.css
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
:true
|
||||
:false
|
||||
:FooBar42
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["atom", ":true"],
|
||||
["atom", ":false"],
|
||||
["atom", ":FooBar42"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for atoms.
|
@ -0,0 +1,24 @@
|
||||
[a: 1, b: 2]
|
||||
do: :this, else: :that
|
||||
where: foo,
|
||||
select: bar
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["punctuation", "["],
|
||||
["attr-name", "a:"],
|
||||
["number", "1"], ["punctuation", ","],
|
||||
["attr-name", "b:"],
|
||||
["number", "2"], ["punctuation", "]"],
|
||||
|
||||
["attr-name", "do:"], ["atom", ":this"],
|
||||
["punctuation", ","],
|
||||
["attr-name", "else:"], ["atom", ":that"],
|
||||
["attr-name", "where:"], " foo", ["punctuation", ","],
|
||||
["attr-name", "select:"], " bar"
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for keyword list keys.
|
@ -0,0 +1,19 @@
|
||||
@vsn 2
|
||||
@moduledoc """
|
||||
foobar
|
||||
"""
|
||||
@tag :external
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["attribute", "@vsn"], ["number", "2"],
|
||||
["attribute", "@moduledoc"], ["string", [
|
||||
"\"\"\"\r\nfoobar\r\n\"\"\""
|
||||
]],
|
||||
["attribute", "@tag"], ["atom", ":external"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for module attributes.
|
@ -0,0 +1,15 @@
|
||||
true
|
||||
false
|
||||
nil
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["boolean", "true"],
|
||||
["boolean", "false"],
|
||||
["boolean", "nil"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for booleans and nil.
|
@ -0,0 +1,28 @@
|
||||
fun = &Math.zero?/1
|
||||
(&is_function/1).(fun)
|
||||
fun = &(&1 + 1)
|
||||
&List.flatten(&1, &2)
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
"fun ", ["operator", "="],
|
||||
["capture", "&Math.zero?/1"],
|
||||
["punctuation", "("],
|
||||
["capture", "&is_function/1"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", "."],
|
||||
["punctuation", "("], "fun", ["punctuation", ")"],
|
||||
"\r\nfun ", ["operator", "="],
|
||||
["capture", "&"],
|
||||
["punctuation", "("], ["argument", "&1"],
|
||||
["operator", "+"], ["number", "1"], ["punctuation", ")"],
|
||||
["capture", "&List.flatten"],
|
||||
["punctuation", "("], ["argument", "&1"],
|
||||
["punctuation", ","], ["argument", "&2"],
|
||||
["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for function capturing and arguments.
|
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Foobar
|
||||
#{ This is a comment
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "#"],
|
||||
["comment", "# Foobar"],
|
||||
["comment", "#{ This is a comment"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for comments.
|
@ -0,0 +1,16 @@
|
||||
String.upcase(@fixed)
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
"String",
|
||||
["punctuation", "."],
|
||||
"upcase",
|
||||
["punctuation", "("],
|
||||
["attribute", "@fixed"],
|
||||
["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Ensure module attributes don't consume punctuation.
|
@ -0,0 +1,17 @@
|
||||
@doc """
|
||||
## Parameters
|
||||
"""
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["attribute", "@doc"],
|
||||
["string", [
|
||||
"\"\"\"\r\n## Parameters\r\n\"\"\""
|
||||
]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Ensures that markdown headers are not highlighted as comments inside strings.
|
||||
See #775 for details.
|
@ -0,0 +1,31 @@
|
||||
after alias and case
|
||||
catch cond def
|
||||
defcallback
|
||||
defexception
|
||||
defimpl defmodule
|
||||
defp defprotocol
|
||||
defstruct do else
|
||||
end fn for if
|
||||
import not or
|
||||
require rescue try
|
||||
unless use when
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "after"], ["keyword", "alias"], ["keyword", "and"], ["keyword", "case"],
|
||||
["keyword", "catch"], ["keyword", "cond"], ["keyword", "def"],
|
||||
["keyword", "defcallback"],
|
||||
["keyword", "defexception"],
|
||||
["keyword", "defimpl"], ["keyword", "defmodule"],
|
||||
["keyword", "defp"], ["keyword", "defprotocol"],
|
||||
["keyword", "defstruct"], ["keyword", "do"], ["keyword", "else"],
|
||||
["keyword", "end"], ["keyword", "fn"], ["keyword", "for"], ["keyword", "if"],
|
||||
["keyword", "import"], ["keyword", "not"], ["keyword", "or"],
|
||||
["keyword", "require"], ["keyword", "rescue"], ["keyword", "try"],
|
||||
["keyword", "unless"], ["keyword", "use"], ["keyword", "when"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for all keywords.
|
@ -0,0 +1,27 @@
|
||||
0b1111_0000
|
||||
0o754_123
|
||||
0xBadFace
|
||||
42
|
||||
42_000
|
||||
3.14159
|
||||
2e6
|
||||
3.241_753E-7
|
||||
0.7e+15
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["number", "0b1111_0000"],
|
||||
["number", "0o754_123"],
|
||||
["number", "0xBadFace"],
|
||||
["number", "42"],
|
||||
["number", "42_000"],
|
||||
["number", "3.14159"],
|
||||
["number", "2e6"],
|
||||
["number", "3.241_753E-7"],
|
||||
["number", "0.7e+15"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for binary, octal, hexadecimal and decimal numbers.
|
@ -0,0 +1,41 @@
|
||||
in
|
||||
\\
|
||||
::
|
||||
..
|
||||
...
|
||||
+ ++
|
||||
- -- ->
|
||||
*
|
||||
/
|
||||
^
|
||||
& &&
|
||||
| || |>
|
||||
< <= <> <-
|
||||
> >=
|
||||
! != !==
|
||||
= =~ == === =>
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["operator", "in"],
|
||||
["operator", "\\\\"],
|
||||
["operator", "::"],
|
||||
["operator", ".."],
|
||||
["operator", "..."],
|
||||
["operator", "+"], ["operator", "++"],
|
||||
["operator", "-"], ["operator", "--"], ["operator", "->"],
|
||||
["operator", "*"],
|
||||
["operator", "/"],
|
||||
["operator", "^"],
|
||||
["operator", "&"], ["operator", "&&"],
|
||||
["operator", "|"], ["operator", "||"], ["operator", "|>"],
|
||||
["operator", "<"], ["operator", "<="], ["operator", "<>"], ["operator", "<-"],
|
||||
["operator", ">"], ["operator", ">="],
|
||||
["operator", "!"], ["operator", "!="], ["operator", "!=="],
|
||||
["operator", "="], ["operator", "=~"], ["operator", "=="], ["operator", "==="], ["operator", "=>"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for all operators.
|
@ -0,0 +1,29 @@
|
||||
~r"""foobar"""im
|
||||
~R'''foobar'''ux
|
||||
~r/fo\/obar/smfr
|
||||
~R|fo\|obar|uismxfr
|
||||
~r"fo\"obar"x
|
||||
~R'fo\'obar's
|
||||
~r(fo\)obar)
|
||||
~R[fo\]obar]
|
||||
~r{fo\}obar}
|
||||
~R<fo\>obar>
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["regex", "~r\"\"\"foobar\"\"\"im"],
|
||||
["regex", "~R'''foobar'''ux"],
|
||||
["regex", "~r/fo\\/obar/smfr"],
|
||||
["regex", "~R|fo\\|obar|uismxfr"],
|
||||
["regex", "~r\"fo\\\"obar\"x"],
|
||||
["regex", "~R'fo\\'obar's"],
|
||||
["regex", "~r(fo\\)obar)"],
|
||||
["regex", "~R[fo\\]obar]"],
|
||||
["regex", "~r{fo\\}obar}"],
|
||||
["regex", "~R<fo\\>obar>"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for regexes.
|
@ -0,0 +1,115 @@
|
||||
~s/foobar/
|
||||
~s/foo#{42}bar/
|
||||
~S|foobar|
|
||||
~c"foobar"
|
||||
~c"foo#{42}bar"
|
||||
~C'foobar'
|
||||
~w(foobar)c
|
||||
~w(foo#{42}bar)s
|
||||
~W[foobar]a
|
||||
~s{foobar}
|
||||
~s{foo#{42}bar}
|
||||
~S<foobar>
|
||||
|
||||
"""
|
||||
Foo bar
|
||||
"""
|
||||
|
||||
'''
|
||||
Foo bar
|
||||
'''
|
||||
|
||||
~S"""
|
||||
Foo bar
|
||||
"""
|
||||
|
||||
~c"""
|
||||
Foo bar
|
||||
"""
|
||||
|
||||
~w"""
|
||||
Foo bar
|
||||
"""
|
||||
|
||||
""
|
||||
"foo"
|
||||
"fo\"o\
|
||||
#{42}bar"
|
||||
''
|
||||
'foo'
|
||||
'fo\'o\
|
||||
bar'
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", ["~s/foobar/"]],
|
||||
["string", [
|
||||
"~s/foo",
|
||||
["interpolation", [
|
||||
["delimiter", "#{"],
|
||||
["number", "42"],
|
||||
["delimiter", "}"]
|
||||
]],
|
||||
"bar/"
|
||||
]],
|
||||
["string", ["~S|foobar|"]],
|
||||
["string", ["~c\"foobar\""]],
|
||||
["string", [
|
||||
"~c\"foo",
|
||||
["interpolation", [
|
||||
["delimiter", "#{"],
|
||||
["number", "42"],
|
||||
["delimiter", "}"]
|
||||
]],
|
||||
"bar\""
|
||||
]],
|
||||
["string", ["~C'foobar'"]],
|
||||
["string", ["~w(foobar)c"]],
|
||||
["string", [
|
||||
"~w(foo",
|
||||
["interpolation", [
|
||||
["delimiter", "#{"],
|
||||
["number", "42"],
|
||||
["delimiter", "}"]
|
||||
]],
|
||||
"bar)s"
|
||||
]],
|
||||
["string", ["~W[foobar]a"]],
|
||||
["string", ["~s{foobar}"]],
|
||||
["string", [
|
||||
"~s{foo",
|
||||
["interpolation", [
|
||||
["delimiter", "#{"],
|
||||
["number", "42"],
|
||||
["delimiter", "}"]
|
||||
]],
|
||||
"bar}"
|
||||
]],
|
||||
["string", ["~S<foobar>"]],
|
||||
|
||||
["string", ["\"\"\"\r\nFoo bar\r\n\"\"\""]],
|
||||
["string", ["'''\r\nFoo bar\r\n'''"]],
|
||||
["string", ["~S\"\"\"\r\nFoo bar\r\n\"\"\""]],
|
||||
["string", ["~c\"\"\"\r\nFoo bar\r\n\"\"\""]],
|
||||
["string", ["~w\"\"\"\r\nFoo bar\r\n\"\"\""]],
|
||||
|
||||
["string", ["\"\""]],
|
||||
["string", ["\"foo\""]],
|
||||
["string", [
|
||||
"\"fo\\\"o\\\r\n",
|
||||
["interpolation", [
|
||||
["delimiter", "#{"],
|
||||
["number", "42"],
|
||||
["delimiter", "}"]
|
||||
]],
|
||||
"bar\""
|
||||
]],
|
||||
["string", ["''"]],
|
||||
["string", ["'foo'"]],
|
||||
["string", ["'fo\\'o\\\r\nbar'"]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for strings.
|
Reference in New Issue
Block a user