summaryrefslogtreecommitdiffstats
path: root/src/parsers.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-04-29 18:03:03 (GMT)
committerEvan Martin <martine@danga.com>2011-04-29 18:04:12 (GMT)
commite3168e1d282d6dcac73f710c5deb575613c335b7 (patch)
tree82b8a12cf35a756ff9f32d5d708e2973f256deb7 /src/parsers.h
parentfb7c7827ed22662d7dacc0c7a2dd0d48dc41ee06 (diff)
downloadNinja-e3168e1d282d6dcac73f710c5deb575613c335b7.zip
Ninja-e3168e1d282d6dcac73f710c5deb575613c335b7.tar.gz
Ninja-e3168e1d282d6dcac73f710c5deb575613c335b7.tar.bz2
add doxygen-compatibile comments to most classes
Diffstat (limited to 'src/parsers.h')
-rw-r--r--src/parsers.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/parsers.h b/src/parsers.h
index 055ba79..31fe8a7 100644
--- a/src/parsers.h
+++ b/src/parsers.h
@@ -23,6 +23,7 @@ using namespace std;
struct BindingEnv;
+/// A single parsed token in an input stream.
struct Token {
enum Type {
NONE,
@@ -51,6 +52,7 @@ struct Token {
const char* end_;
};
+/// Processes an input stream into Tokens.
struct Tokenizer {
Tokenizer(bool whitespace_significant)
: whitespace_significant_(whitespace_significant),
@@ -85,6 +87,7 @@ struct Tokenizer {
int last_indent_, cur_indent_;
};
+/// Parses simple Makefiles as generated by gcc.
struct MakefileParser {
MakefileParser();
bool Parse(const string& input, string* err);
@@ -96,6 +99,7 @@ struct MakefileParser {
struct State;
+/// Parses .ninja files.
struct ManifestParser {
struct FileReader {
virtual bool ReadFile(const string& path, string* content, string* err) = 0;
@@ -107,12 +111,12 @@ struct ManifestParser {
bool Parse(const string& input, string* err);
bool ParseRule(string* err);
- // Parse a key=val statement. If expand is true, evaluate variables
- // within the value immediately.
+ /// Parse a key=val statement. If expand is true, evaluate variables
+ /// within the value immediately.
bool ParseLet(string* key, string* val, bool expand, string* err);
bool ParseEdge(string* err);
- // Parse either a 'subninja' or 'include' line.
+ /// Parse either a 'subninja' or 'include' line.
bool ParseFileInclude(Token::Type type, string* err);
State* state_;