Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-09 07:06:03 +0300
committerAdam Langley <agl@google.com>2015-04-14 01:07:28 +0300
commit71485af5e8cbca7dbe96f351582f1d7158995728 (patch)
tree4e1cc64a6cdf06bc65c0041aa84b20470b218d1b /util
parent0d8a758938094d6b064b6e4e3eb87f13d076be0c (diff)
Skip #if lines in getNameFromDecl.
Otherwise we get all these 'defined' symbols everywhere. Change-Id: I4c21a4df8963146a79af3511a400f06698f1078a Reviewed-on: https://boringssl-review.googlesource.com/4292 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'util')
-rw-r--r--util/doc.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/doc.go b/util/doc.go
index 70630367..20feae54 100644
--- a/util/doc.go
+++ b/util/doc.go
@@ -200,7 +200,18 @@ func skipPast(s, skip string) string {
return s
}
+func skipLine(s string) string {
+ i := strings.Index(s, "\n")
+ if i > 0 {
+ return s[i:]
+ }
+ return ""
+}
+
func getNameFromDecl(decl string) (string, bool) {
+ for strings.HasPrefix(decl, "#if") {
+ decl = skipLine(decl)
+ }
if strings.HasPrefix(decl, "struct ") {
return "", false
}