blob: a1ccd3559125cd2f541fe1311481f386216f7524 [file] [log] [blame]
{
"name": "test.bitsconstants",
"library_dependencies": [],
"bits_declarations": [
{
"name": "test.bitsconstants/BitsType",
"naming_context": [
"BitsType"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 3,
"column": 6,
"length": 8
},
"type": {
"kind": "primitive",
"subtype": "uint32",
"type_shape_v1": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"mask": "131",
"members": [
{
"name": "A",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 4,
"column": 5,
"length": 1
},
"value": {
"kind": "literal",
"value": "1",
"expression": "0x00000001",
"literal": {
"kind": "numeric",
"value": "1",
"expression": "0x00000001"
}
}
},
{
"name": "B",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 5,
"column": 5,
"length": 1
},
"value": {
"kind": "literal",
"value": "128",
"expression": "0x80",
"literal": {
"kind": "numeric",
"value": "128",
"expression": "0x80"
}
}
},
{
"name": "C",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 6,
"column": 5,
"length": 1
},
"value": {
"kind": "literal",
"value": "2",
"expression": "0x2",
"literal": {
"kind": "numeric",
"value": "2",
"expression": "0x2"
}
}
}
],
"strict": true
}
],
"const_declarations": [
{
"name": "test.bitsconstants/Const1",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 9,
"column": 7,
"length": 6
},
"type": {
"kind": "identifier",
"identifier": "test.bitsconstants/BitsType",
"nullable": false,
"type_shape_v1": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"value": {
"kind": "identifier",
"value": "1",
"expression": "BitsType.A",
"identifier": "test.bitsconstants/BitsType.A"
}
},
{
"name": "test.bitsconstants/Const2",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 10,
"column": 7,
"length": 6
},
"type": {
"kind": "identifier",
"identifier": "test.bitsconstants/BitsType",
"nullable": false,
"type_shape_v1": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"value": {
"kind": "binary_operator",
"value": "129",
"expression": "BitsType.A | BitsType.B"
}
},
{
"name": "test.bitsconstants/Const3",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/bits_constants.test.fidl",
"line": 11,
"column": 7,
"length": 6
},
"type": {
"kind": "identifier",
"identifier": "test.bitsconstants/BitsType",
"nullable": false,
"type_shape_v1": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"value": {
"kind": "binary_operator",
"value": "131",
"expression": "BitsType.A | BitsType.B | BitsType.C"
}
}
],
"enum_declarations": [],
"experimental_resource_declarations": [],
"protocol_declarations": [],
"service_declarations": [],
"struct_declarations": [],
"external_struct_declarations": [],
"table_declarations": [],
"union_declarations": [],
"type_alias_declarations": [],
"declaration_order": [
"test.bitsconstants/BitsType",
"test.bitsconstants/Const3",
"test.bitsconstants/Const2",
"test.bitsconstants/Const1"
],
"declarations": {
"test.bitsconstants/BitsType": "bits",
"test.bitsconstants/Const1": "const",
"test.bitsconstants/Const2": "const",
"test.bitsconstants/Const3": "const"
}
}