blob: c6942cba66d001ba8134258aee45b908d370d612 [file] [log] [blame]
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-- Inline bits are columnized separately from their surrounding structure.
bits Foo:
0 [+5] bits bler:
0 [+1] Flag xxx # comment
1 [+1] Flag yy
2 [+1] Flag zzzzzzzzzzz
10 [+6] UInt length
16 [+16] UInt width
if width == 1000:
32 [+10] UInt depth # comment
42 [+6] UInt checksum # other comment
struct Foo2:
8 [+4] UInt length # comment
12 [+4] UInt width # comment
0 [+5] bits bler:
0 [+1] Flag xxx # comment
1 [+1] Flag yy
2 [+1] Flag zzzzzzzzzzz