use prism-tomorrow.css
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
foo {
|
||||
bar => bar,
|
||||
* => {}
|
||||
}
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
"foo ", ["punctuation", "{"],
|
||||
["attr-name", "bar"], ["operator", "=>"],
|
||||
" bar", ["punctuation", ","],
|
||||
["attr-name", "*"], ["operator", "=>"],
|
||||
["punctuation", "{"], ["punctuation", "}"],
|
||||
["punctuation", "}"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for attributes.
|
@ -0,0 +1,13 @@
|
||||
true
|
||||
false
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["boolean", "true"],
|
||||
["boolean", "false"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for booleans.
|
@ -0,0 +1,22 @@
|
||||
#
|
||||
# Foobar
|
||||
/* Foo
|
||||
bar */
|
||||
/* @(foo) */
|
||||
# @(foo)
|
||||
# foo /* bar */ baz
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "#"],
|
||||
["comment", "# Foobar"],
|
||||
["multiline-comment", "/* Foo\r\nbar */"],
|
||||
["multiline-comment", "/* @(foo) */"],
|
||||
["comment", "# @(foo)"],
|
||||
["comment", "# foo /* bar */ baz"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for comments.
|
@ -0,0 +1,63 @@
|
||||
Any
|
||||
Array
|
||||
Boolean
|
||||
Callable
|
||||
Catalogentry
|
||||
Class
|
||||
Collection
|
||||
Data
|
||||
Default
|
||||
Enum
|
||||
Float
|
||||
Hash
|
||||
Integer
|
||||
NotUndef
|
||||
Numeric
|
||||
Optional
|
||||
Pattern
|
||||
Regexp
|
||||
Resource
|
||||
Runtime
|
||||
Scalar
|
||||
String
|
||||
Struct
|
||||
Tuple
|
||||
Type
|
||||
Undef
|
||||
Variant
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["datatype", "Any"],
|
||||
["datatype", "Array"],
|
||||
["datatype", "Boolean"],
|
||||
["datatype", "Callable"],
|
||||
["datatype", "Catalogentry"],
|
||||
["datatype", "Class"],
|
||||
["datatype", "Collection"],
|
||||
["datatype", "Data"],
|
||||
["datatype", "Default"],
|
||||
["datatype", "Enum"],
|
||||
["datatype", "Float"],
|
||||
["datatype", "Hash"],
|
||||
["datatype", "Integer"],
|
||||
["datatype", "NotUndef"],
|
||||
["datatype", "Numeric"],
|
||||
["datatype", "Optional"],
|
||||
["datatype", "Pattern"],
|
||||
["datatype", "Regexp"],
|
||||
["datatype", "Resource"],
|
||||
["datatype", "Runtime"],
|
||||
["datatype", "Scalar"],
|
||||
["datatype", "String"],
|
||||
["datatype", "Struct"],
|
||||
["datatype", "Tuple"],
|
||||
["datatype", "Type"],
|
||||
["datatype", "Undef"],
|
||||
["datatype", "Variant"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for data types.
|
@ -0,0 +1,37 @@
|
||||
$foo.foobar
|
||||
foo_bar_42()
|
||||
|
||||
contain
|
||||
debug
|
||||
err
|
||||
fail
|
||||
include
|
||||
info
|
||||
notice
|
||||
realize
|
||||
require
|
||||
tag
|
||||
warning
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["variable", ["$foo"]], ["punctuation", "."], ["function", "foobar"],
|
||||
["function", "foo_bar_42"], ["punctuation", "("], ["punctuation", ")"],
|
||||
|
||||
["function", "contain"],
|
||||
["function", "debug"],
|
||||
["function", "err"],
|
||||
["function", "fail"],
|
||||
["function", "include"],
|
||||
["function", "info"],
|
||||
["function", "notice"],
|
||||
["function", "realize"],
|
||||
["function", "require"],
|
||||
["function", "tag"],
|
||||
["function", "warning"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for functions.
|
@ -0,0 +1,51 @@
|
||||
@("FOO")
|
||||
bar
|
||||
$baz
|
||||
FOO
|
||||
|
||||
@(FOO BAR/)
|
||||
bar
|
||||
$baz
|
||||
| FOO BAR
|
||||
|
||||
@(foo!)
|
||||
bar
|
||||
|-foo!
|
||||
|
||||
@("some text..."/nrts$uL)
|
||||
some text
|
||||
some text..
|
||||
some text...
|
||||
|
||||
$foo = @(FOOBAR) == $bar
|
||||
Foobar
|
||||
-FOOBAR
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["heredoc", ["@(", ["punctuation", "\"FOO\""], ")"]],
|
||||
["heredoc", [
|
||||
"\tbar\r\n\t",
|
||||
["interpolation", ["$baz"]],
|
||||
["punctuation", "FOO"]
|
||||
]],
|
||||
["heredoc", ["@(", ["punctuation", "FOO BAR/"], ")"]],
|
||||
["heredoc", [
|
||||
"\tbar\r\n\t$baz\r\n\t",
|
||||
["punctuation", "| FOO BAR"]
|
||||
]],
|
||||
["heredoc", ["@(", ["punctuation", "foo!"], ")"]],
|
||||
["heredoc", ["bar\r\n", ["punctuation", "|-foo!"]]],
|
||||
["heredoc", ["@(", ["punctuation", "\"some text...\"/nrts$uL"], ")"]],
|
||||
["heredoc", ["some text\r\nsome text..\r\n", ["punctuation", "some text..."]]],
|
||||
["variable", ["$foo"]], ["operator", "="],
|
||||
["heredoc", ["@(", ["punctuation", "FOOBAR"], ")"]],
|
||||
["operator", "=="], ["variable", ["$bar"]],
|
||||
["heredoc", ["\tFoobar\r\n\t", ["punctuation", "-FOOBAR"]]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for heredoc strings.
|
||||
Also checks that string interpolation applies only inside quoted heredoc strings.
|
@ -0,0 +1,54 @@
|
||||
"$foo ${::foo} ${foo::bar.foobar}
|
||||
${foobar(42)} ${::interfaces.split(",")[3]}
|
||||
${[1,20,3].filter |$value| { $value < 10 }}"
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", [["double-quoted", [
|
||||
"\"",
|
||||
["interpolation", ["$foo"]],
|
||||
["interpolation", [
|
||||
["delimiter", "$"], ["punctuation", "{"],
|
||||
["short-variable", [["punctuation", "::"], "foo"]],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["interpolation", [
|
||||
["delimiter", "$"], ["punctuation", "{"],
|
||||
["short-variable", ["foo", ["punctuation", "::"], "bar"]],
|
||||
["punctuation", "."], ["function", "foobar"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["interpolation", [
|
||||
["delimiter", "$"], ["punctuation", "{"],
|
||||
["function", "foobar"], ["punctuation", "("],
|
||||
["number", "42"], ["punctuation", ")"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["interpolation", [
|
||||
["delimiter", "$"], ["punctuation", "{"],
|
||||
["short-variable", [["punctuation", "::"], "interfaces"]],
|
||||
["punctuation", "."], ["function", "split"],
|
||||
["punctuation", "("], ["string", [["double-quoted", ["\",\""]]]],
|
||||
["punctuation", ")"], ["punctuation", "["],
|
||||
["number", "3"], ["punctuation", "]"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["interpolation", [
|
||||
["delimiter", "$"], ["punctuation", "{"],
|
||||
["punctuation", "["], ["number", "1"],
|
||||
["punctuation", ","], ["number", "20"],
|
||||
["punctuation", ","], ["number", "3"], ["punctuation", "]"],
|
||||
["punctuation", "."], ["function", "filter"],
|
||||
["operator", "|"], ["variable", ["$value"]], ["operator", "|"],
|
||||
["punctuation", "{"], ["variable", ["$value"]],
|
||||
["operator", "<"], ["number", "10"], ["punctuation", "}"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
"\""
|
||||
]]]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for interpolation.
|
@ -0,0 +1,47 @@
|
||||
application
|
||||
attr
|
||||
case
|
||||
class
|
||||
consumes
|
||||
default
|
||||
define
|
||||
else
|
||||
elsif
|
||||
function
|
||||
if
|
||||
import
|
||||
inherits
|
||||
node
|
||||
private
|
||||
produces
|
||||
type
|
||||
undef
|
||||
unless
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "application"],
|
||||
["keyword", "attr"],
|
||||
["keyword", "case"],
|
||||
["keyword", "class"],
|
||||
["keyword", "consumes"],
|
||||
["keyword", "default"],
|
||||
["keyword", "define"],
|
||||
["keyword", "else"],
|
||||
["keyword", "elsif"],
|
||||
["keyword", "function"],
|
||||
["keyword", "if"],
|
||||
["keyword", "import"],
|
||||
["keyword", "inherits"],
|
||||
["keyword", "node"],
|
||||
["keyword", "private"],
|
||||
["keyword", "produces"],
|
||||
["keyword", "type"],
|
||||
["keyword", "undef"],
|
||||
["keyword", "unless"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for keywords.
|
@ -0,0 +1,25 @@
|
||||
0
|
||||
42
|
||||
3.14159
|
||||
3e8
|
||||
3.2E-7
|
||||
0777
|
||||
0xBadFace
|
||||
0XBADFACE
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["number", "0"],
|
||||
["number", "42"],
|
||||
["number", "3.14159"],
|
||||
["number", "3e8"],
|
||||
["number", "3.2E-7"],
|
||||
["number", "0777"],
|
||||
["number", "0xBadFace"],
|
||||
["number", "0XBADFACE"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for numbers.
|
@ -0,0 +1,29 @@
|
||||
= == =~ =>
|
||||
! != !~
|
||||
< << <<|
|
||||
<= <~ <| <-
|
||||
> >> >=
|
||||
- ->
|
||||
~>
|
||||
| |> |>>
|
||||
* / % + ?
|
||||
and in or
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["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", "and"], ["operator", "in"], ["operator", "or"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for operators.
|
@ -0,0 +1,32 @@
|
||||
node /f(o)"o"[b]?a\/r/
|
||||
$foo = /foo
|
||||
bar # baz
|
||||
/m
|
||||
$foo = /foo
|
||||
bar # baz
|
||||
/ixm
|
||||
$foo = /@(foo)/
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "node"],
|
||||
["regex", ["/f(o)\"o\"[b]?a\\/r/"]],
|
||||
["variable", ["$foo"]], ["operator", "="],
|
||||
["regex", ["/foo\r\nbar # baz\r\n/m"]],
|
||||
["variable", ["$foo"]], ["operator", "="],
|
||||
["regex", [
|
||||
["extended-regex", [
|
||||
"/foo\r\nbar ",
|
||||
["comment", "# baz"],
|
||||
"\r\n/ixm"
|
||||
]]
|
||||
]],
|
||||
["variable", ["$foo"]], ["operator", "="],
|
||||
["regex", ["/@(foo)/"]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for regular expressions.
|
||||
Also checks that extended-regex accept inline comments.
|
@ -0,0 +1,36 @@
|
||||
''
|
||||
'fo\'obar'
|
||||
'foo
|
||||
$bar
|
||||
baz'
|
||||
""
|
||||
"fo\"obar"
|
||||
"foo
|
||||
$bar
|
||||
baz"
|
||||
" @(foo) "
|
||||
"foo /* bar */ baz"
|
||||
"foo #bar baz"
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", ["''"]],
|
||||
["string", ["'fo\\'obar'"]],
|
||||
["string", ["'foo\r\n$bar\r\nbaz'"]],
|
||||
["string", [["double-quoted", ["\"\""]]]],
|
||||
["string", [["double-quoted", ["\"fo\\\"obar\""]]]],
|
||||
["string", [["double-quoted", [
|
||||
"\"foo\r\n",
|
||||
["interpolation", ["$bar"]],
|
||||
"\r\nbaz\""
|
||||
]]]],
|
||||
["string", [["double-quoted", ["\" @(foo) \""]]]],
|
||||
["string", [["double-quoted", ["\"foo /* bar */ baz\""]]]],
|
||||
["string", [["double-quoted", ["\"foo #bar baz\""]]]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for strings.
|
||||
Also checks that string interpolation only applies to double-quoted strings.
|
@ -0,0 +1,15 @@
|
||||
$foo
|
||||
$::foobar_42
|
||||
$Foo::Bar_42::baz
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["variable", ["$foo"]],
|
||||
["variable", ["$", ["punctuation", "::"], "foobar_42"]],
|
||||
["variable", ["$Foo", ["punctuation", "::"], "Bar_42", ["punctuation", "::"], "baz"]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for variables.
|
Reference in New Issue
Block a user