filetype: crystal detect: filename: "\\.cr$|Gemfile|config.ru|Rakefile|Capfile|Vagrantfile" header: "^#!.*/(env +)?crystal( |$)" rules: - statement: "\\b(BEGIN|END|abstract|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|enum|false|for|fun|if|in|include|lib|loop|macro|module|next|nil|not|of|or|pointerof|private|protected|raise|redo|require|rescue|retry|return|self|sizeof|spawn|struct|super|then|true|type|undef|union|uninitialized|unless|until|when|while|yield)\\b" - constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*" - constant.number: "\\b[0-9]+\\b" - constant: "([ ]|^):[0-9A-Z_]+\\b" - constant: "\\b(__FILE__|__LINE__)\\b" - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*" - constant.string: "`[^`]*`|%x\\{[^}]*\\}" - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!" - special: "#\\{[^}]*\\}" - constant.string.char: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!" - comment: "#[^{].*$|#$" - comment.bright: "##[^{].*$|##$" - constant: start: "<<-?'?EOT'?" end: "^EOT" rules: [] - todo: "(XXX|TODO|FIXME|\\?\\?\\?)"