1 //===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines a very simple Doxygen comment parser.
12 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H
16 #define LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H
18 #include "clang/AST/CommentLexer.h"
23 /// A very simple comment parser that extracts "a brief description".
25 /// Due to a variety of comment styles, it considers the following as "a brief
26 /// description", in order of priority:
27 /// \li a \\brief or \\short command,
28 /// \li the first paragraph,
29 /// \li a \\result or \\return or \\returns paragraph.
33 const CommandTraits &Traits;
35 /// Current lookahead token.
38 SourceLocation ConsumeToken() {
39 SourceLocation Loc = Tok.getLocation();
45 BriefParser(Lexer &L, const CommandTraits &Traits);
47 /// Return the best "brief description" we can find.
51 } // end namespace comments
52 } // end namespace clang