blob: 052bccf27cc5c068e48163c160aa282c15bc9edf [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 enums are columnized separately from their surrounding structure.
bits Foo:
0 [+5] enum bler:
XXX = 0 # comment
YY = 1
ZZZZZZZZZZZ = 2
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] enum bler:
XXX = 0 # comment
YY = 1
ZZZZZZZZZZZ = 2