lib/tap/support/lazydoc.rb in bahuvrihi-tap-0.10.1 vs lib/tap/support/lazydoc.rb in bahuvrihi-tap-0.10.2

- old
+ new

@@ -120,19 +120,28 @@ # # ['def method', 'comment lines for the method'], # # ['def another_method', 'as in RDoc, the comment can be separated from the method']] # class Lazydoc - # A regexp matching an attribute start or end. For the match: + # A regexp matching an attribute start or end. After a match: # # $1:: const_name # $3:: key # $4:: end flag # ATTRIBUTE_REGEXP = /([A-Z][A-z]*(::[A-Z][A-z]*)*)?::([a-z_]+)(-?)/ # A regexp matching constants from the ATTRIBUTE_REGEXP leader CONSTANT_REGEXP = /#.*?([A-Z][A-z]*(::[A-Z][A-z]*)*)?$/ + + # A regexp matching a caller line, to extract the calling file + # and line number. After a match: + # + # $1:: file + # $3:: line number (as a string, obviously) + # + # Note that line numbers in caller start at 1, not 0. + CALLER_REGEXP = /^(([A-z]:)?[^:]+):(\d+)/ class << self # A hash of (source_file, lazydoc) pairs tracking the # Lazydoc instance for the given source file. \ No newline at end of file