Skip to content

Commit

Permalink
Mavschema: Allow enum values to be powers of 2
Browse files Browse the repository at this point in the history
  • Loading branch information
shancock884 authored and tridge committed Feb 21, 2024
1 parent a751679 commit f4e45e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generator/mavschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,20}"/> <!-- base 10 int -->
<xs:pattern value="0[xX][0-9a-fA-F]{1,16}"/> <!-- base 16 -->
<xs:pattern value="0[bB][0-1]{1,64}"/> <!-- base 1 -->
<xs:pattern value="0[bB][0-1]{1,64}"/> <!-- base 2 -->
<xs:pattern value="2\*\*\d{1,2}"/> <!-- power of 2 -->
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand All @@ -38,7 +39,8 @@
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,20}"/> <!-- base 10 int -->
<xs:pattern value="0[xX][0-9a-fA-F]{1,16}"/> <!-- base 16 -->
<xs:pattern value="0[bB][0-1]{1,64}"/> <!-- base 1 -->
<xs:pattern value="0[bB][0-1]{1,64}"/> <!-- base 2 -->
<xs:pattern value="2\*\*\d{1,2}"/> <!-- power of 2 -->
<xs:pattern value="NaN"/> <!-- Allow not-a-number as a default (for params) -->
</xs:restriction>
</xs:simpleType>
Expand Down

0 comments on commit f4e45e4

Please sign in to comment.