mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Issue #17 Updated datarefs for X-Plane 11.50
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,19 @@ unless (open $fh, '<', $filename)
|
||||
usage();
|
||||
}
|
||||
|
||||
our @keywords = qw(
|
||||
alignas alignof and and_eq asm atomic_cancel atomic_commit atomic_noexcept
|
||||
auto bitand bitor bool break case catch char char8_t char16_t char32_t class
|
||||
compl concept const consteval constexpr constinit const_cast continue
|
||||
co_await co_return co_yield decltype default delete do double dynamic_cast
|
||||
else enum explicit export extern false float for friend goto if inline int
|
||||
long mutable namespace new noexcept not not_eq nullptr operator or or_eq
|
||||
private protected public reflexpr register reinterpret_cast requires return
|
||||
short signed sizeof static static_assert static_cast struct switch
|
||||
synchronized template this thread_local throw true try typedef typeid
|
||||
typename union unsigned using virtual void volatile wchar_t while xor xor_eq
|
||||
);
|
||||
|
||||
my %hierarchy;
|
||||
|
||||
while (<$fh>)
|
||||
@@ -57,7 +70,7 @@ while (<$fh>)
|
||||
my $size;
|
||||
$type =~ m"(\w+)\[(\d+)\]" and ($type, $size) = ($1, $2);
|
||||
|
||||
my @namespaces = split '/', $dataref;
|
||||
my @namespaces = map sanitize($_), split '/', $dataref;
|
||||
my $class = pop @namespaces;
|
||||
$class =~ s(\])()g;
|
||||
$class =~ s(\[)(_)g;
|
||||
@@ -153,4 +166,11 @@ ${in}};
|
||||
EOF
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub sanitize
|
||||
{
|
||||
my ($name) = @_;
|
||||
$name .= '_' if grep $_ eq $name, @keywords;
|
||||
return $name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user