mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r23396) -Fix: squirrel export script did not ignore Doxygen blocks, causing funny results in some corner cases
This commit is contained in:
parent
72f8aa94cc
commit
c3ae66089a
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user