Sha256: d27d5b22d3f9a9c0ad2a05ded4bdfed60ea10b9b92f41415c7c1be7f008de610
Contents?: true
Size: 1.15 KB
Versions: 19
Compression:
Stored size: 1.15 KB
Contents
module SlimLint # Generates a {SlimLint::Sexp} suitable for consumption by the # {RubyExtractor}. # # This is mostly copied from Slim::Engine, with some filters and generators # omitted. class RubyExtractEngine < Temple::Engine filter :Encoding filter :RemoveBOM # Parse into S-expression using Slim parser use Slim::Parser # Perform additional processing so extracting Ruby code in {RubyExtractor} # is easier. We don't do this for regular linters because some information # about the original syntax tree is lost in the process, but that doesn't # matter in this case. use Slim::Embedded use Slim::Interpolation use SlimLint::Filters::SplatProcessor use Slim::DoInserter use Slim::EndInserter use SlimLint::Filters::ControlProcessor use SlimLint::Filters::AttributeProcessor filter :MultiFlattener filter :StaticMerger # Converts Array-based S-expressions into SlimLint::Sexp objects, and gives # them line numbers so we can easily map from the Ruby source to the # original source use SlimLint::Filters::SexpConverter use SlimLint::Filters::InjectLineNumbers end end
Version data entries
19 entries across 19 versions & 1 rubygems