Sha256: 221951b4ef375dbaaf23cad5a910b61dd2acb470467b496911207fcb560586f7
Contents?: true
Size: 595 Bytes
Versions: 5
Compression:
Stored size: 595 Bytes
Contents
# frozen_string_literal: true def is_single_space(token) token.type == :WHITESPACE && token.value == ' ' end def new_single_space PuppetLint::Lexer::Token.new(:WHITESPACE, ' ', 0, 0) end def after_bracket_tokens %i[RBRACK RPAREN SEMIC COMMA COLON DOT NEWLINE DQMID DQPOST LBRACK] end def prev_non_space_token(token) while token = token.prev_token return token unless %i[WHITESPACE INDENT NEWLINE].include?(token.type) end end def next_non_space_token(token) while token = token.next_token return token unless %i[WHITESPACE INDENT NEWLINE].include?(token.type) end end
Version data entries
5 entries across 5 versions & 1 rubygems