summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/tosail2.perl9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/tosail2.perl b/etc/tosail2.perl
index 893e2be8..eda6506d 100644
--- a/etc/tosail2.perl
+++ b/etc/tosail2.perl
@@ -53,6 +53,15 @@ while (<>) {
s!\((\w+)\) (\w+)!$2 : $1!g;
}
+ # fix scattered union declaration
+ s!scattered\s+type\s+(\w+)\s+=\s+const\s+union!scattered union $1!;
+
+ # fix scattered union members
+ s!union\s+(\w+)\s+member\s+(\w+)\s+(\w+)!union clause $1 = $3 : $2!;
+
+ # fix scattered function declaration (drops type, assumes separate val dec.)
+ s!scattered\s+function\s+([^\s]+)\s+(\w+)!scattered function $2!;
+
# fix any bits[n]
s!bit\s*\[([^\]]+)\]!bits\($1\)!g;