app/controllers/preprocessor/python/augmentation.rb
def possibly_add_trace_info_calls(line)
    # If the current line does not start a logical line, don't bother
    if not @state[:ll_start]
      return line
    end

    # We will be making decisions based on the first word on the line
    line_words = line.split
    if line_words.empty?
      # The line is empty, so we disregard it
      return line
    end
    first_word = line_words[0]

    # Extract first word and check if it makes us want to refrain from adding a line number call
    if KEYWORDS_WITHOUT_LINE_NUMBERS.include?(first_word)
      # It's one of the statements we don't want
      return line

    elsif ["'", '"', "#"].include?(first_word[0])
      # The line starts with a string or with a comment
      return line
    end

    # Do include a line number call
    return "#{@state[:indent_string]}garbledwebpiratenlibraryname.debug(locals(), globals())\n" +
           "#{@state[:indent_string]}garbledwebpiratenlibraryname.line(#{@state[:line_number]})\n" +
           "#{line}"
  end
# Returns a version of the line with calls to the tracing methods prepended. These
# are calls to send the current line number and values of watched variables back to
# the server. If this line shouldn't have these calles added, simply returns the line
# as is.
Returns a version of the line with calls to the tracing methods prepended. These
are calls to send the current line number and values of watched variables back to
the server. If this line shouldn't have these calles added, simply returns the line
as is.
Returns a version of the line with calls to the tracing methods prepended . These are calls to send the current line number and values of watched variables back to the server . If this line shouldn ' t have these calles added simply returns the line as is .
def possibly_add_trace_info_calls(line)
    if not @state[:ll_start]
      return line
    end
    line_words = line.split
    if line_words.empty?
      return line
    end
    first_word = line_words[0]
    if KEYWORDS_WITHOUT_LINE_NUMBERS.include?(first_word)
      return line
    elsif ["'", '"', "#"].include?(first_word[0])
      return line
    end
    return "#{@state[:indent_string]}garbledwebpiratenlibraryname.debug(locals(), globals())\n" +
           "#{@state[:indent_string]}garbledwebpiratenlibraryname.line(#{@state[:line_number]})\n" +
           "#{line}"
  end
def possibly_add_trace_info_calls ( line ) if not @state [ :ll_start ] return line end line_words = line . split if line_words . empty? return line end first_word = line_words [ 0 ] if KEYWORDS_WITHOUT_LINE_NUMBERS . include? ( first_word ) return line elsif [ "'" , '"' , "#" ] . include? ( first_word [ 0 ] ) return line end return "#{@state[:indent_string]}garbledwebpiratenlibraryname.debug(locals(), globals())\n" + "#{@state[:indent_string]}garbledwebpiratenlibraryname.line(#{@state[:line_number]})\n" + "#{line}" end
Returns a version of the line with calls to the tracing methods prepended.
Returns a version of the line with calls to the tracing methods prepended .
# If the current line does not start a logical line, don't bother # We will be making decisions based on the first word on the line # The line is empty, so we disregard it # Extract first word and check if it makes us want to refrain from adding a line number call # It's one of the statements we don't want # The line starts with a string or with a comment # Do include a line number call
line