summaryrefslogtreecommitdiffstats
path: root/tools/sed-types
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sed-types')
-rw-r--r--tools/sed-types7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/sed-types b/tools/sed-types
index 52a7252..730d597 100644
--- a/tools/sed-types
+++ b/tools/sed-types
@@ -1,3 +1,10 @@
+# eat all comments
+/^\s*\/\*/ {
+ :comment
+ /\*\/\s*$/ { n; b nocomment }
+ n; b comment
+}
+:nocomment
# drop if don't start with typedef
/^\s*typedef/ ! b
# read one line typedef (struct)? (word*)? (*)? word;