Sha256: ab8604d118c3ee1e1f97960c33d1c39bc5dee45314bc7b482526ef0536c75dc8

Contents?: true

Size: 323 Bytes

Versions: 7

Compression:

Stored size: 323 Bytes

Contents

module Treetop
  module Compiler
    class AtomicExpression < ParsingExpression
      def inline_modules
        []
      end
      
      def single_quote(string)
        # Double any backslashes, then backslash any single-quotes:
        "'#{string.gsub(/\\/) { '\\\\' }.gsub(/'/) { "\\'"}}'"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
treetop-1.6.12 lib/treetop/compiler/node_classes/atomic_expression.rb
treetop-1.6.11 lib/treetop/compiler/node_classes/atomic_expression.rb
treetop-1.6.10 lib/treetop/compiler/node_classes/atomic_expression.rb
treetop-1.6.9 lib/treetop/compiler/node_classes/atomic_expression.rb
treetop-1.6.8 lib/treetop/compiler/node_classes/atomic_expression.rb
treetop-1.6.7 lib/treetop/compiler/node_classes/atomic_expression.rb
treetop-1.6.6 lib/treetop/compiler/node_classes/atomic_expression.rb