X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fsyntax%2Fcoffeescript.yaml;h=d9b374836df37c46ce3d53264eb35fe6cf46a847;hb=3644ef4a5a7b6f50b5f46ad29cd7ebad8d89bcfd;hp=497de389992003e27b8ece9c9b5d03aa12b855d2;hpb=b977bf5cca84f7dc762fe8d9967831502ee5cc87;p=micro.git diff --git a/runtime/syntax/coffeescript.yaml b/runtime/syntax/coffeescript.yaml index 497de389..d9b37483 100644 --- a/runtime/syntax/coffeescript.yaml +++ b/runtime/syntax/coffeescript.yaml @@ -1,21 +1,29 @@ filetype: coffeescript -detect: +detect: filename: "\\.coffee$" - header: "^#!.*/(env +)?coffee" rules: - - symbol.operator: "[!&|=/*+\\-<>]|\\b(and|or|is|isnt|not)\\b" - - identifier.class: "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->" + - symbol.operator: "[!&|=/*+-<>]|\\b(and|or|is|isnt|not)\\b" + - identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)" - symbol.brackets: "[()]" - - statement: "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b" - - statement: "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b" - - statement: "\\b(debugger|switch|while|do|class|extends|super)\\b" - - statement: "\\b(undefined|then|unless|until|loop|of|by|when)\\b" - - constant.bool: "\\b(true|false|yes|no|on|off)\\b" + - statement: "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b" + - statement: "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b" + - statement: "\\b(debugger|switch|while|do|class|extends|super)\\b" + - statement: "\\b(undefined|then|unless|until|loop|of|by|when)\\b" + - constant.bool: "\\b(true|false|yes|no|on|off)\\b" - identifier: "@[A-Za-z0-9_]*" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" - - preproc.shebang: "#!.+$" + + - constant.string: + start: "\"" + end: "\"" + skip: "\\\\." + rules: + - constant.specialChar: "\\\\." + + - comment: + start: "#" + end: "$" + rules: + - todo: "(TODO|XXX|FIXME):?" +