1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.TSDocParser = void 0;
|
4 | var TextRange_1 = require("./TextRange");
|
5 | var ParserContext_1 = require("./ParserContext");
|
6 | var LineExtractor_1 = require("./LineExtractor");
|
7 | var Tokenizer_1 = require("./Tokenizer");
|
8 | var NodeParser_1 = require("./NodeParser");
|
9 | var TSDocConfiguration_1 = require("../configuration/TSDocConfiguration");
|
10 | var ParagraphSplitter_1 = require("./ParagraphSplitter");
|
11 |
|
12 |
|
13 |
|
14 | var TSDocParser = (function () {
|
15 | function TSDocParser(configuration) {
|
16 | if (configuration) {
|
17 | this.configuration = configuration;
|
18 | }
|
19 | else {
|
20 | this.configuration = new TSDocConfiguration_1.TSDocConfiguration();
|
21 | }
|
22 | }
|
23 | TSDocParser.prototype.parseString = function (text) {
|
24 | return this.parseRange(TextRange_1.TextRange.fromString(text));
|
25 | };
|
26 | TSDocParser.prototype.parseRange = function (range) {
|
27 | var parserContext = new ParserContext_1.ParserContext(this.configuration, range);
|
28 | if (LineExtractor_1.LineExtractor.extract(parserContext)) {
|
29 | parserContext.tokens = Tokenizer_1.Tokenizer.readTokens(parserContext.lines);
|
30 | var nodeParser = new NodeParser_1.NodeParser(parserContext);
|
31 | nodeParser.parse();
|
32 | ParagraphSplitter_1.ParagraphSplitter.splitParagraphs(parserContext.docComment);
|
33 | }
|
34 | return parserContext;
|
35 | };
|
36 | return TSDocParser;
|
37 | }());
|
38 | exports.TSDocParser = TSDocParser;
|
39 |
|
\ | No newline at end of file |