Repository: eslint/doctrine (js)

Issue:
Reported line numbers are sometimes incorrect
```
let comment = `
/**
 * Test class
 * @extends {BaseClass}
 * @constructor
 * @param {string} name
 */
`;

doctrine.parse(comment, {unwrap: true, lineNumbers: true});


{ description: '/**\nTest class',
  tags: 
   [ { title: 'extends',
       description: null,
       lineNumber: 3,
       type: [Object],
       name: null },
     { title: 'constructor',
       description: null,
       lineNumber: 5,
       type: null,
       name: null },
     { title: 'param',
       description: '/',
       lineNumber: 7,
       type: [Object],
       name: 'name' } ] }
```

Constructor's lineNumber is 5, but should be 4. 
Param's lineNumber is 7. Should be 5

Also, notice the param's description.

Pull request:
Fix: fixing line numbers
Fixes #138

Replacing skip when parsing tags.

Patch:
diff --git a/lib/doctrine.js b/lib/doctrine.js
index cbfadae..d7ba412 100644
--- a/lib/doctrine.js
+++ b/lib/doctrine.js
@@ -206,7 +206,6 @@
             while (last < length) {
                 ch = source.charCodeAt(last);
                 if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D  /* '\r' */ && source.charCodeAt(last + 1) === 0x0A  /* '\n' */)) {
-                    lineNumber += 1;
                     waiting = true;
                 } else if (waiting) {
                     if (ch === 0x40  /* '@' */) {
@@ -709,13 +708,11 @@
                 }
             }
 
-            // Seek global index to end of this tag.
-            index = this._last;
             return this._tag;
         };
 
         function parseTag(options) {
-            var title, parser;
+            var title, parser, tag;
 
             // skip to tag
             if (!skipToTag()) {
@@ -727,7 +724,13 @@
 
             // construct tag parser
             parser = new TagParser(options, title);
-            return parser.parse();
+            tag = parser.parse();
+
+            // Seek global index to end of this tag.
+            while (index < parser._last) {
+                advance();
+            }
+            return tag;
         }
 
         //


Test patch:
diff --git a/test/parse.js b/test/parse.js
index 4ecbf8c..cd0f823 100644
--- a/test/parse.js
+++ b/test/parse.js
@@ -1947,6 +1947,7 @@ describe('optional params', function() {
         var res = doctrine.parse(
             [
                 "/**",
+                " * @constructor",
                 " * @param {string} foo",
                 " * @returns {string}",
                 " *",
@@ -1959,7 +1960,8 @@ describe('optional params', function() {
 
         res.tags[0].should.have.property('lineNumber', 1);
         res.tags[1].should.have.property('lineNumber', 2);
-        res.tags[2].should.have.property('lineNumber', 4);
+        res.tags[2].should.have.property('lineNumber', 3);
+        res.tags[3].should.have.property('lineNumber', 5);
     });
 
     it('should handle \\r\\n line endings correctly', function() {