class AdLint::Cc1::ScanfFormat::Whitespace

Public Class Methods

scan(fmt_str) click to toggle source
# File lib/adlint/cc1/format.rb, line 1901
def self.scan(fmt_str)
  # NOTE: The ISO C99 standard says;
  #
  # 7.19.6.2 The fscanf function
  #
  # 3 The format shall be a multibyte character sequence, beginning and
  #   ending in its initial shift state.  The format is composed of zero
  #   or more directives: one or more white-space characters, an ordinary
  #   multibyte character (neither % nor a white-space character), or a
  #   conversion specification.  Each conversion specification is
  #   introduced by the character %.  After the %, the following appear
  #   in sequence:
  #
  #   -- An optional assignment-suppressing character *.
  #   -- An optional decimal integer greater than zero that specifies the
  #      maximum field width (in characters).
  #   -- An optional length modifier that specifies the size of the
  #      receiving object.
  #   -- A conversion specifier character that specifies the type of
  #      conversion to be applied.
  fmt_str.slice!(/\A\s+/)
end

Public Instance Methods

acceptable?() click to toggle source

DESCRIPTION

Checks whether types of arguments match this directive.

RETURN VALUE

Boolean – True if types of arguments match this directive.

# File lib/adlint/cc1/format.rb, line 1945
def acceptable?
  true
end
assignment_suppressing_character() click to toggle source
# File lib/adlint/cc1/format.rb, line 1987
def assignment_suppressing_character
  nil
end
complete?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1959
def complete?
  true
end
consume_arguments?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1936
def consume_arguments?
  false
end
conversion_specifier?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1932
def conversion_specifier?
  false
end
conversion_specifier_character() click to toggle source
# File lib/adlint/cc1/format.rb, line 1999
def conversion_specifier_character
  nil
end
field_width() click to toggle source
# File lib/adlint/cc1/format.rb, line 1991
def field_width
  nil
end
length_modifier() click to toggle source
# File lib/adlint/cc1/format.rb, line 1995
def length_modifier
  nil
end
ordinary?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1928
def ordinary?
  false
end
scanset() click to toggle source
# File lib/adlint/cc1/format.rb, line 2003
def scanset
  nil
end
undefined?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1963
def undefined?
  false
end
valid_assignment_suppressing_character?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1967
def valid_assignment_suppressing_character?
  false
end
valid_conversion_specifier_character?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1979
def valid_conversion_specifier_character?
  false
end
valid_field_width?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1971
def valid_field_width?
  false
end
valid_length_modifier?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1975
def valid_length_modifier?
  false
end
valid_scanset?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1983
def valid_scanset?
  false
end
wellformed?() click to toggle source

DESCRIPTION

Checks whether the format string of this directive is the ISO C99 compliant.

RETURN VALUE

Boolean – True if the format string is wellformed.

# File lib/adlint/cc1/format.rb, line 1955
def wellformed?
  true
end
whitespace?() click to toggle source
# File lib/adlint/cc1/format.rb, line 1924
def whitespace?
  true
end