clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
include
clang
AST
CommentBriefParser.h
Go to the documentation of this file.
1
//===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file defines a very simple Doxygen comment parser.
11
//
12
//===----------------------------------------------------------------------===//
13
14
15
#ifndef LLVM_CLANG_AST_COMMENTBRIEFPARSER_H
16
#define LLVM_CLANG_AST_COMMENTBRIEFPARSER_H
17
18
#include "
clang/AST/CommentLexer.h
"
19
20
namespace
clang {
21
namespace
comments {
22
23
/// A very simple comment parser that extracts "a brief description".
24
///
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.
30
class
BriefParser
{
31
Lexer
&L;
32
33
const
CommandTraits
&Traits;
34
35
/// Current lookahead token.
36
Token
Tok;
37
38
SourceLocation
ConsumeToken() {
39
SourceLocation
Loc = Tok.
getLocation
();
40
L.
lex
(Tok);
41
return
Loc;
42
}
43
44
public
:
45
BriefParser
(
Lexer
&L,
const
CommandTraits
&Traits);
46
47
/// Return the best "brief description" we can find.
48
std::string
Parse
();
49
};
50
51
}
// end namespace comments
52
}
// end namespace clang
53
54
#endif
55
CommentLexer.h
clang::comments::Lexer::lex
void lex(Token &T)
Definition:
CommentLexer.cpp:730
clang::comments::Token::getLocation
SourceLocation getLocation() const LLVM_READONLY
Definition:
CommentLexer.h:82
clang::comments::CommandTraits
Definition:
CommentCommandTraits.h:128
clang::SourceLocation
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
Definition:
SourceLocation.h:87
clang::comments::Lexer
Comment lexer.
Definition:
CommentLexer.h:222
clang::comments::BriefParser::Parse
std::string Parse()
Return the best "brief description" we can find.
Definition:
CommentBriefParser.cpp:64
clang::comments::Token
Comment token.
Definition:
CommentLexer.h:57
clang::comments::BriefParser
Definition:
CommentBriefParser.h:30
clang::comments::BriefParser::BriefParser
BriefParser(Lexer &L, const CommandTraits &Traits)
Definition:
CommentBriefParser.cpp:58
Generated on Mon Aug 31 2015 10:45:14 for clang by
1.8.6