method
comment_out?
v1_8_7_330 -
Show latest stable
- Class:
RDoc::Fortran95parser
comment_out?(line)private
Comment out checker
# File lib/rdoc/parsers/parse_f95.rb, line 1477
def comment_out?(line)
return nil unless line
commentout = false
squote = false ; dquote = false
line.split("").each { |char|
if !(squote) && !(dquote)
case char
when "!" ; commentout = true ; break
when "\""; dquote = true
when "\'"; squote = true
else next
end
elsif squote
case char
when "\'"; squote = false
else next
end
elsif dquote
case char
when "\""; dquote = false
else next
end
end
}
return commentout
end Related methods
- Instance methods
- scan
- Class methods
- new
- Private methods
-
block_end? -
block_start? -
check_external_aliases -
check_public_methods -
collect_first_comment -
comment_out? -
continuous_line? -
definition_info -
find_arguments -
find_comments -
find_namelists -
find_visibility -
initialize_external_method -
initialize_public_method -
parse_program_or_module -
parse_subprogram -
parse_visibility -
progress -
remove_empty_head_lines -
remove_header_marker -
remove_private_comments -
remove_trailing_alias -
semicolon_to_linefeed -
set_visibility -
united_to_one_line