Sha256: 7c013a0872890288f5f04b47c1a79675dac66ebe04716c14145a91fe20ff8b9b

Contents?: true

Size: 487 Bytes

Versions: 14

Compression:

Stored size: 487 Bytes

Contents

module Liquidscript
  module Scanner
    class Liquidscript < Base
      module Regexs
        include Base::DSL

        define do
          context :block_regex do
            init { @buffer = [] }

            on(%r{///([a-z]*)}) do |_, m|
              emit :regex, [@buffer.join, m]
              exit
            end
            on(%r{#.*?\n}) { }
            on("\n")       { }
            on(:_)         { |m| @buffer << m }
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
liquidscript-0.10.4 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.10.3 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.10.2 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.10.1 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.10.0 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.9.2 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.9.1 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.9.0 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.8.2 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.8.1 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.8.0 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.7.12 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.7.11 lib/liquidscript/scanner/liquidscript/regexs.rb
liquidscript-0.7.10 lib/liquidscript/scanner/liquidscript/regexs.rb