Sha256: 066352c6fcc696b6b584dd92bc8d6bc2b2701a593321338a3255cff96656fc22
Contents?: true
Size: 1.24 KB
Versions: 26
Compression:
Stored size: 1.24 KB
Contents
Prism.languages.ruby = { 'comment': /#[^\r\n]*(\r?\n|$)/g, 'string': /("|')(\\?.)*?\1/g, 'regex': { pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g, lookbehind: true }, 'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/g, 'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/, 'boolean': /\b(true|false)\b/g, 'number': /\b-?(0x)?\d*\.?\d+\b/g, 'instance-variable': /[@$]\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g, 'const': { 'pattern': /\b[A-Z][a-zA-Z_0-9]*\b/, 'inside': { 'separator': /:{2}/, }, }, 'literals': /%[wWqQriIx][\[\({]([a-zA-Z_0-9\s]+)[\]\)}]/g, 'symbol': /:\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g, 'ignore': /&(lt|gt|amp);/gi, 'punctuation': /[{}[\];(),.:]/g, 'method': /.?[a-zA-Z0-9_?]+/g, 'operator': /[-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\//g, };
Version data entries
26 entries across 26 versions & 1 rubygems