blob: 407d646ea72924fd33eb2659801b02f294ffcff0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# frozen_string_literal: true
require 'set'
module Rouge
module Lexers
load_lexer 'yaml.rb'
class Digdag < YAML
title 'digdag'
desc 'A simple, open source, multi-cloud workflow engine (https://www.digdag.io/)'
tag 'digdag'
filenames '*.dig'
mimetypes 'application/x-digdag'
# http://docs.digdag.io/operators.html
# as of digdag v0.9.10
KEYWORD_PATTERN = Regexp.union(%w(
call
require
loop
for_each
if
fail
echo
td
td_run
td_ddl
td_load
td_for_each
td_wait
td_wait_table
td_partial_delete
td_table_export
pg
mail
http
s3_wait
redshift
redshift_load
redshift_unload
emr
gcs_wait
bq
bq_ddl
bq_extract
bq_load
sh
py
rb
embulk
).map { |name| "#{name}>"} + %w(
_do
_parallel
))
prepend :block_nodes do
rule %r/(#{KEYWORD_PATTERN})(:)(?=\s|$)/ do |m|
groups Keyword::Reserved, Punctuation::Indicator
set_indent m[0], :implicit => true
end
end
end
end
end
|