summaryrefslogtreecommitdiff
path: root/src/script/api/squirrel_export.awk
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-02 23:40:09 +0000
committertruebrain <truebrain@openttd.org>2011-12-02 23:40:09 +0000
commitc3026bc6015d45ae5b6dfd9781bd98938d4a7983 (patch)
tree5a348094b647ca2edb776f8899c190ee038f9a5b /src/script/api/squirrel_export.awk
parent739c315243f55018df8f9b05af0a0477914c7ab7 (diff)
downloadopenttd-c3026bc6015d45ae5b6dfd9781bd98938d4a7983.tar.xz
(svn r23396) -Fix: squirrel export script did not ignore Doxygen blocks, causing funny results in some corner cases
Diffstat (limited to 'src/script/api/squirrel_export.awk')
-rw-r--r--src/script/api/squirrel_export.awk28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk
index 781c452d5..4d044b0e0 100644
--- a/src/script/api/squirrel_export.awk
+++ b/src/script/api/squirrel_export.awk
@@ -102,6 +102,20 @@ BEGIN {
gsub("^" tolower(api) "_", "script_", filename)
}
+# Ignore special doxygen blocks
+/^#ifndef DOXYGEN_API/ { doxygen_skip = "next"; next; }
+/^#ifdef DOXYGEN_API/ { doxygen_skip = "true"; next; }
+/^#endif \/\* DOXYGEN_API \*\// { doxygen_skip = "false"; next; }
+/^#else/ {
+ if (doxygen_skip == "next") {
+ doxygen_skip = "true";
+ } else {
+ doxygen_skip = "false";
+ }
+ next;
+}
+{ if (doxygen_skip == "true") next }
+
/^([ ]*)\* @api/ {
if (api == "Template") {
api_selected = "true"
@@ -169,20 +183,6 @@ BEGIN {
/^( *)protected/ { if (cls_level == 1) public = "false"; next; }
/^( *)private/ { if (cls_level == 1) public = "false"; next; }
-# Ignore special doxygen blocks
-/^#ifndef DOXYGEN_API/ { doxygen_skip = "next"; next; }
-/^#ifdef DOXYGEN_API/ { doxygen_skip = "true"; next; }
-/^#endif \/\* DOXYGEN_API \*\// { doxygen_skip = "false"; next; }
-/^#else/ {
- if (doxygen_skip == "next") {
- doxygen_skip = "true";
- } else {
- doxygen_skip = "false";
- }
- next;
-}
-{ if (doxygen_skip == "true") next }
-
# Ignore the comments
/^#/ { next; }
/\/\*.*\*\// { comment = "false"; next; }