[PATCH] First revision of the dynamic ASTMatcher library
Samuel Benzaquen
sbenza at google.com
Tue Apr 23 14:14:24 PDT 2013
================
Comment at: include/clang/ASTMatchers/Dynamic/Parser.h:10-16
@@ +9,9 @@
+//
+// Simple matcher expression parser.
+// The parser understand matcher expressions of the form:
+// MatcherName(Arg0, Arg1, ..., ArgN)
+// as well as simple types like strings.
+// The parser does not know how to process the matchers. It delegates this task
+// to a TokenProcessor object received as an argument.
+//
+//===----------------------------------------------------------------------===//
----------------
Dmitri Gribenko wrote:
> Three slashes, '\file'.
Done.
================
Comment at: include/clang/ASTMatchers/Dynamic/Parser.h:65
@@ +64,3 @@
+ processMatcherToken(llvm::StringRef MatcherName,
+ const llvm::ArrayRef<VariantValue> &Args,
+ const TokenInfo &Info) = 0;
----------------
Dmitri Gribenko wrote:
> ArrayRef is a value type that is conceptually const. So this (and others) should be 'ArrayRef<VariantValue> Args'.
Done. Also changed const llvm::StringRef& to be just llvm::StringRef.
================
Comment at: include/clang/ASTMatchers/Dynamic/Parser.h:11-12
@@ +10,4 @@
+// Simple matcher expression parser.
+// The parser understand matcher expressions of the form:
+// MatcherName(Arg0, Arg1, ..., ArgN)
+// as well as simple types like strings.
----------------
Dmitri Gribenko wrote:
> Manuel Klimek wrote:
> > understand*s*
> It would help a lot to give a formal definition of the grammar in documentation.
Done. I am a little rusty on how to specify grammars, so it might be off a little bit.
http://llvm-reviews.chandlerc.com/D714
More information about the cfe-commits
mailing list