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aAAa,CAAC;IACvB,CAAC;IACH,kBAAC;AAAD,CAAC,AAhCD,IAgCC","sourcesContent":["import { TextRange } from './TextRange';\r\nimport { ParserContext } from './ParserContext';\r\nimport { LineExtractor } from './LineExtractor';\r\nimport { Tokenizer } from './Tokenizer';\r\nimport { NodeParser } from './NodeParser';\r\nimport { TSDocConfiguration } from '../configuration/TSDocConfiguration';\r\nimport { ParagraphSplitter } from './ParagraphSplitter';\r\n\r\n/**\r\n * The main API for parsing TSDoc comments.\r\n */\r\nexport class TSDocParser {\r\n /**\r\n * The configuration that was provided for the TSDocParser.\r\n */\r\n public readonly configuration: TSDocConfiguration;\r\n\r\n public constructor(configuration?: TSDocConfiguration) {\r\n if (configuration) {\r\n this.configuration = configuration;\r\n } else {\r\n this.configuration = new TSDocConfiguration();\r\n }\r\n }\r\n\r\n public parseString(text: string): ParserContext {\r\n return this.parseRange(TextRange.fromString(text));\r\n }\r\n\r\n public parseRange(range: TextRange): ParserContext {\r\n const parserContext: ParserContext = new ParserContext(this.configuration, range);\r\n\r\n if (LineExtractor.extract(parserContext)) {\r\n parserContext.tokens = Tokenizer.readTokens(parserContext.lines);\r\n\r\n const nodeParser: NodeParser = new NodeParser(parserContext);\r\n nodeParser.parse();\r\n\r\n ParagraphSplitter.splitParagraphs(parserContext.docComment);\r\n }\r\n\r\n return parserContext;\r\n }\r\n}\r\n"]}
|