Current File : //home/tradevaly/prioyshi.com/project/vendor/scrivo/highlight.php/Highlight/languages/ruby.json |
{
"aliases": [
"rb",
"gemspec",
"podspec",
"thor",
"irb"
],
"keywords": {
"keyword": "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",
"literal": "true false nil"
},
"illegal": "\\\/\\*",
"contains": [
{
"className": "comment",
"begin": "#",
"end": "$",
"contains": [
{
"className": "doctag",
"begin": "@[A-Za-z]+"
},
{
"begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
},
{
"className": "doctag",
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
"relevance": 0
}
]
},
{
"className": "comment",
"begin": "^\\=begin",
"end": "^\\=end",
"contains": [
{
"$ref": "#contains.0.contains.0"
},
{
"$ref": "#contains.0.contains.1"
},
{
"className": "doctag",
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
"relevance": 0
}
],
"relevance": 10
},
{
"className": "comment",
"begin": "^__END__",
"end": "\\n$",
"contains": [
{
"$ref": "#contains.0.contains.1"
},
{
"className": "doctag",
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
"relevance": 0
}
]
},
{
"begin": "^\\s*=>",
"starts": {
"end": "$",
"contains": [
{
"className": "string",
"contains": [
{
"begin": "\\\\[\\s\\S]",
"relevance": 0
},
{
"className": "subst",
"begin": "#\\{",
"end": "}",
"keywords": {
"$ref": "#keywords"
},
"contains": {
"$ref": "#contains.3.starts.contains"
}
}
],
"variants": [
{
"begin": "'",
"end": "'"
},
{
"begin": "\"",
"end": "\""
},
{
"begin": "`",
"end": "`"
},
{
"begin": "%[qQwWx]?\\(",
"end": "\\)"
},
{
"begin": "%[qQwWx]?\\[",
"end": "\\]"
},
{
"begin": "%[qQwWx]?{",
"end": "}"
},
{
"begin": "%[qQwWx]?<",
"end": ">"
},
{
"begin": "%[qQwWx]?\/",
"end": "\/"
},
{
"begin": "%[qQwWx]?%",
"end": "%"
},
{
"begin": "%[qQwWx]?-",
"end": "-"
},
{
"begin": "%[qQwWx]?\\|",
"end": "\\|"
},
{
"begin": "\\B\\?(\\\\\\d{1,3}|\\\\x[A-Fa-f0-9]{1,2}|\\\\u[A-Fa-f0-9]{4}|\\\\?\\S)\\b"
},
{
"begin": "<<[-~]?'?(\\w+)(?:.|\\n)*?\\n\\s*\\1\\b",
"returnBegin": true,
"contains": [
{
"begin": "<<[-~]?'?"
},
{
"begin": "\\w+",
"endSameAsBegin": true,
"contains": [
{
"$ref": "#contains.3.starts.contains.0.contains.0"
},
{
"$ref": "#contains.3.starts.contains.0.contains.1"
}
]
}
]
}
]
},
{
"begin": "#<",
"end": ">"
},
{
"className": "class",
"beginKeywords": "class module",
"end": "$|;",
"illegal": "=",
"contains": [
{
"className": "title",
"begin": "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",
"relevance": 0
},
{
"begin": "<\\s*",
"contains": [
{
"begin": "([a-zA-Z]\\w*::)?[a-zA-Z]\\w*"
}
]
},
{
"$ref": "#contains.0"
},
{
"$ref": "#contains.1"
},
{
"$ref": "#contains.2"
}
]
},
{
"className": "function",
"beginKeywords": "def",
"end": "$|;",
"contains": [
{
"className": "title",
"begin": "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-\/+%^&*~`|]|\\[\\]=?",
"relevance": 0
},
{
"className": "params",
"begin": "\\(",
"end": "\\)",
"endsParent": true,
"keywords": {
"$ref": "#keywords"
},
"contains": {
"$ref": "#contains.3.starts.contains"
}
},
{
"$ref": "#contains.0"
},
{
"$ref": "#contains.1"
},
{
"$ref": "#contains.2"
}
]
},
{
"begin": "[a-zA-Z]\\w*::"
},
{
"className": "symbol",
"begin": "[a-zA-Z_]\\w*(\\!|\\?)?:",
"relevance": 0
},
{
"className": "symbol",
"begin": ":(?!\\s)",
"contains": [
{
"$ref": "#contains.3.starts.contains.0"
},
{
"begin": "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-\/+%^&*~`|]|\\[\\]=?"
}
],
"relevance": 0
},
{
"className": "number",
"begin": "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
"relevance": 0
},
{
"begin": "(\\$\\W)|((\\$|\\@\\@?)(\\w+))"
},
{
"className": "params",
"begin": "\\|",
"end": "\\|",
"keywords": {
"$ref": "#keywords"
}
},
{
"begin": "(!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|\/=|\/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~|unless)\\s*",
"keywords": "unless",
"contains": [
{
"$ref": "#contains.3.starts.contains.1"
},
{
"className": "regexp",
"contains": [
{
"$ref": "#contains.3.starts.contains.0.contains.0"
},
{
"$ref": "#contains.3.starts.contains.0.contains.1"
}
],
"illegal": "\\n",
"variants": [
{
"begin": "\/",
"end": "\/[a-z]*"
},
{
"begin": "%r{",
"end": "}[a-z]*"
},
{
"begin": "%r\\(",
"end": "\\)[a-z]*"
},
{
"begin": "%r!",
"end": "![a-z]*"
},
{
"begin": "%r\\[",
"end": "\\][a-z]*"
}
]
},
{
"$ref": "#contains.0"
},
{
"$ref": "#contains.1"
},
{
"$ref": "#contains.2"
}
],
"relevance": 0
},
{
"$ref": "#contains.0"
},
{
"$ref": "#contains.1"
},
{
"$ref": "#contains.2"
}
]
}
},
{
"className": "meta",
"begin": "^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",
"starts": {
"end": "$",
"contains": {
"$ref": "#contains.3.starts.contains"
}
}
},
{
"$ref": "#contains.3.starts.contains.0"
},
{
"$ref": "#contains.3.starts.contains.1"
},
{
"$ref": "#contains.3.starts.contains.2"
},
{
"$ref": "#contains.3.starts.contains.3"
},
{
"$ref": "#contains.3.starts.contains.4"
},
{
"$ref": "#contains.3.starts.contains.5"
},
{
"$ref": "#contains.3.starts.contains.6"
},
{
"$ref": "#contains.3.starts.contains.7"
},
{
"$ref": "#contains.3.starts.contains.8"
},
{
"$ref": "#contains.3.starts.contains.9"
},
{
"$ref": "#contains.3.starts.contains.10"
},
{
"$ref": "#contains.0"
},
{
"$ref": "#contains.1"
},
{
"$ref": "#contains.2"
}
]
}