Sha256: a303b514e8fc01c8281c8edf24e2dbcc32c362116d40ccace2d4ae4276347851

Contents?: true

Size: 1.3 KB

Versions: 11

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

module PlatformosCheck
  module LanguageServer
    module VariableLookupFinder
      module Constants
        ANY_STARTING_TAG = /\s*#{Liquid::AnyStartingTag}/
        ANY_ENDING_TAG = /#{Liquid::TagEnd}|#{Liquid::VariableEnd}\s*^/om

        UNCLOSED_SQUARE_BRACKET = /\[[^\]]*\Z/
        ENDS_IN_BRACKET_POSITION_THAT_CANT_BE_COMPLETED = /
          (
            # quotes not preceded by a [
            (?<!\[)['"]|
            # closing ]
            \]|
            # opening [
            \[
          )$
        /x

        VARIABLE_START = /\s*#{Liquid::VariableStart}/
        VARIABLE_LOOKUP_CHARACTERS = /[a-z0-9_.'"\]\[]/i
        VARIABLE_LOOKUP = /#{VARIABLE_LOOKUP_CHARACTERS}+/o
        SYMBOLS_PRECEDING_POTENTIAL_LOOKUPS = /
          (?:
            \s(?:
              if|elsif|unless|and|or|#{Liquid::Condition.operators.keys.join("|")}
              |echo
              |return
              |log
              |paginate
              |case|when
              |cycle
              |in
            )
            |[:,=]
          )
          \s+
        /omix
        ENDS_WITH_BLANK_POTENTIAL_LOOKUP = /#{SYMBOLS_PRECEDING_POTENTIAL_LOOKUPS}$/oimx
        ENDS_WITH_POTENTIAL_LOOKUP = /#{SYMBOLS_PRECEDING_POTENTIAL_LOOKUPS}#{VARIABLE_LOOKUP}$/oimx
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
platformos-check-0.4.14 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.13 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.12 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.11 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.10 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.9 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.8 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.7 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.6 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.5 lib/platformos_check/language_server/variable_lookup_finder/constants.rb
platformos-check-0.4.4 lib/platformos_check/language_server/variable_lookup_finder/constants.rb