Sha256: e41562379250ec7e0879299aac852c4c9e0b8b43e5fc38595a17360501927ae3

Contents?: true

Size: 1.23 KB

Versions: 44

Compression:

Stored size: 1.23 KB

Contents

# 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

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
rouge-4.5.1 lib/rouge/lexers/digdag.rb
rouge-4.5.0 lib/rouge/lexers/digdag.rb
rouge-4.4.0 lib/rouge/lexers/digdag.rb
rouge-4.3.0 lib/rouge/lexers/digdag.rb
rouge-4.2.1 lib/rouge/lexers/digdag.rb
rouge-4.2.0 lib/rouge/lexers/digdag.rb
rouge-4.1.3 lib/rouge/lexers/digdag.rb
rouge-4.1.2 lib/rouge/lexers/digdag.rb
rouge-4.1.1 lib/rouge/lexers/digdag.rb
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/rouge-3.30.0/lib/rouge/lexers/digdag.rb
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/rouge-3.30.0/lib/rouge/lexers/digdag.rb
rouge-4.1.0 lib/rouge/lexers/digdag.rb
rouge-4.0.1 lib/rouge/lexers/digdag.rb
rouge-4.0.0 lib/rouge/lexers/digdag.rb
rouge-3.30.0 lib/rouge/lexers/digdag.rb
rouge-3.29.0 lib/rouge/lexers/digdag.rb
rouge-3.28.0 lib/rouge/lexers/digdag.rb
rouge-3.27.0 lib/rouge/lexers/digdag.rb
rouge-3.26.1 lib/rouge/lexers/digdag.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/rouge-3.26.0/lib/rouge/lexers/digdag.rb