| 1 |
filetype: golo |
| 2 |
|
| 3 |
detect: |
| 4 |
filename: "\\.golo$" |
| 5 |
|
| 6 |
rules: |
| 7 |
- type: "\\b(function|fun|)\\b" |
| 8 |
- type: "\\b(struct|DynamicObject|union|AdapterFabric|Adapter|DynamicVariable|Observable)\\b" |
| 9 |
- type: "\\b(list|set|array|vector|tuple|map)\\b" |
| 10 |
- type: "\\b(Ok|Error|Empty|None|Some|Option|Result|Result.ok|Result.fail|Result.error|Result.empty|Optional.empty|Optional.of)\\b" |
| 11 |
|
| 12 |
- identifier.class: "\\b(augment|pimp)\\b" |
| 13 |
- identifier.class: "\\b(interfaces|implements|extends|overrides|maker|newInstance)\\b" |
| 14 |
- identifier.class: "\\b(isEmpty|isNone|isPresent|isSome|iterator|flattened|toList|flatMap|`and|orElseGet|`or|toResult|apply|either)\\b" |
| 15 |
- identifier.class: "\\b(result|option|trying|raising|nullify|catching)\\b" |
| 16 |
- identifier.class: "\\b(promise|setFuture|failedFuture|all|any)\\b" |
| 17 |
- identifier.class: "\\b(initialize|initializeWithinThread|start|future|fallbackTo|onSet|onFail|cancel|enqueue)\\b" |
| 18 |
- identifier.class: "\\b(println|print|raise|readln|readPassword|secureReadPassword|requireNotNull|require|newTypedArray|range|reversedRange|mapEntry|asInterfaceInstance|asFunctionalInterface|isClosure|fileToText|textToFile|fileExists|currentDir|sleep|uuid|isArray|arrayTypeOf|charValue|intValue|longValue|doubleValue|floatValue|removeByIndex|box)\\b" |
| 19 |
- identifier.class: "\\b(likelySupported|reset|bold|underscore|blink|reverse_video|concealed|fg_black|fg_red|fg_green|fg_yellow|fg_blue|fg_magenta|fg_cyan|fg_white|bg_black|bg_red|bg_green|bg_yellow|bg_blue|bg_magenta|bg_cyan|bg_white|cursor_position|cursor_save_position|cursor_restore_position|cursor_up|cursor_down|cursor_forward|cursor_backward|erase_display|erase_line)\\b" |
| 20 |
- identifier.class: "\\b(emptyList|cons|lazyList|fromIter|generator|repeat|iterate)\\b" |
| 21 |
- identifier.class: "\\b(asLazyList|foldl|foldr|take|takeWhile|drop|dropWhile|subList)\\b" |
| 22 |
- identifier.class: "\\b(import)\\b" |
| 23 |
- identifier.class: "\\b(module)\\b" |
| 24 |
- identifier.class: "\\b(JSON)\\b" |
| 25 |
- identifier.class: "\\b(stringify|parse|toJSON|toDynamicObject|updateFromJSON)\\b" |
| 26 |
- identifier.class: "\\b(newInstance|define|getKey|getValue|properties|fallback)\\b" |
| 27 |
- identifier.class: "\\b(times|upTo|downTo)\\b" |
| 28 |
- identifier.class: "\\b(format|toInt|toInteger|toDouble|toFloat|toLong)\\b" |
| 29 |
- identifier.class: "\\b(head|tail|isEmpty|reduce|each|count|exists)\\b" |
| 30 |
- identifier.class: "\\b(newWithSameType|destruct|append|add|addIfAbsent|prepend|insert|last|unmodifiableView|find|filter|map|join|reverse|reversed|order|ordered|removeAt|include|exclude|remove|delete|has|contains|getOrElse|toArray)\\b" |
| 31 |
- identifier.class: "\\b(add|addTo|succ|pred|mul|neg|sub|rsub|div|rdiv|mod|rmod|pow|rpow|str|lt|gt|eq|ne|ge|le|`and|`or|`not|xor|even|odd|contains|isEmpty|`is|`isnt|`oftype|`orIfNull|fst|snd|getitem|setitem|getter|id|const|False|True|Null|curry|uncurry|unary|spreader|varargs|swapArgs|swapCurry|swapCouple|swap|invokeWith|pipe|compose|io|andThen|until|recur|cond)\\b" |
| 32 |
- identifier.class: "\\b(toUpperCase|equals|startsWith)\\b" |
| 33 |
|
| 34 |
- statement: "\\b(if|else|then|when|case|match|otherwise)\\b" |
| 35 |
- special: "\\b(with|break|continue|return)\\b" |
| 36 |
- error: "\\b(try|catch|finally|throw)\\b" |
| 37 |
- identifier: "\\b(super|this|let|var|local)\\b" |
| 38 |
- symbol.brackets: "[(){}]|\\[|\\]" |
| 39 |
- statement: "\\b(for|while|foreach|in)\\b" |
| 40 |
- constant: "\\b(and|in|is|not|or|isnt|orIfNull)\\b" |
| 41 |
|
| 42 |
- constant.bool: "\\b(true|false)\\b" |
| 43 |
- constant: "\\b(null|undefined)\\b" |
| 44 |
|
| 45 |
- symbol.operator: "[\\-+/*=<>!~%&|^]|:=" |
| 46 |
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'" |
| 47 |
|
| 48 |
- constant.string: |
| 49 |
start: "\"" |
| 50 |
end: "\"" |
| 51 |
skip: "\\\\." |
| 52 |
rules: |
| 53 |
- constant.specialChar: "\\\\." |
| 54 |
|
| 55 |
- constant.string: |
| 56 |
start: "'" |
| 57 |
end: "'" |
| 58 |
skip: "\\\\." |
| 59 |
rules: |
| 60 |
- constant.specialChar: "\\\\." |
| 61 |
|
| 62 |
- comment: |
| 63 |
start: "#" |
| 64 |
end: "$" |
| 65 |
rules: |
| 66 |
- todo: "(TODO|XXX|FIXME):?" |
| 67 |
|
| 68 |
- comment: |
| 69 |
start: "----" |
| 70 |
end: "----" |
| 71 |
rules: |
| 72 |
- todo: "(TODO|XXX|FIXME):?" |
| 73 |
|