| { |
| "name": "test.consts", |
| "library_dependencies": [ |
| { |
| "name": "zx", |
| "declarations": { |
| "zx/rights": { |
| "kind": "bits" |
| }, |
| "zx/CHANNEL_MAX_MSG_BYTES": { |
| "kind": "const" |
| }, |
| "zx/CHANNEL_MAX_MSG_HANDLES": { |
| "kind": "const" |
| }, |
| "zx/DEFAULT_CHANNEL_RIGHTS": { |
| "kind": "const" |
| }, |
| "zx/DEFAULT_EVENT_RIGHTS": { |
| "kind": "const" |
| }, |
| "zx/MAX_CPUS": { |
| "kind": "const" |
| }, |
| "zx/MAX_NAME_LEN": { |
| "kind": "const" |
| }, |
| "zx/RIGHTS_BASIC": { |
| "kind": "const" |
| }, |
| "zx/RIGHTS_IO": { |
| "kind": "const" |
| }, |
| "zx/RIGHTS_POLICY": { |
| "kind": "const" |
| }, |
| "zx/RIGHTS_PROPERTY": { |
| "kind": "const" |
| }, |
| "zx/obj_type": { |
| "kind": "enum" |
| }, |
| "zx/handle": { |
| "kind": "experimental_resource" |
| }, |
| "zx/duration": { |
| "kind": "type_alias" |
| }, |
| "zx/gpaddr": { |
| "kind": "type_alias" |
| }, |
| "zx/koid": { |
| "kind": "type_alias" |
| }, |
| "zx/off": { |
| "kind": "type_alias" |
| }, |
| "zx/paddr": { |
| "kind": "type_alias" |
| }, |
| "zx/paddr32": { |
| "kind": "type_alias" |
| }, |
| "zx/procarg": { |
| "kind": "type_alias" |
| }, |
| "zx/signals": { |
| "kind": "type_alias" |
| }, |
| "zx/status": { |
| "kind": "type_alias" |
| }, |
| "zx/ticks": { |
| "kind": "type_alias" |
| }, |
| "zx/time": { |
| "kind": "type_alias" |
| }, |
| "zx/vaddr": { |
| "kind": "type_alias" |
| } |
| } |
| } |
| ], |
| "bits_declarations": [ |
| { |
| "name": "test.consts/BitsType", |
| "naming_context": [ |
| "BitsType" |
| ], |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 29, |
| "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": "3", |
| "members": [ |
| { |
| "name": "VALUE", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 30, |
| "column": 5, |
| "length": 5 |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "1", |
| "expression": "0x00000001", |
| "literal": { |
| "kind": "numeric", |
| "value": "1", |
| "expression": "0x00000001" |
| } |
| } |
| }, |
| { |
| "name": "true", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 31, |
| "column": 5, |
| "length": 4 |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "2", |
| "expression": "2", |
| "literal": { |
| "kind": "numeric", |
| "value": "2", |
| "expression": "2" |
| } |
| } |
| } |
| ], |
| "strict": true |
| } |
| ], |
| "const_declarations": [ |
| { |
| "name": "test.consts/ANSWER", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 7, |
| "column": 7, |
| "length": 6 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint16", |
| "type_shape_v1": { |
| "inline_size": 2, |
| "alignment": 2, |
| "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": 2, |
| "alignment": 2, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "42", |
| "expression": "42", |
| "literal": { |
| "kind": "numeric", |
| "value": "42", |
| "expression": "42" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/ANSWER_IN_BINARY", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 8, |
| "column": 7, |
| "length": 16 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint16", |
| "type_shape_v1": { |
| "inline_size": 2, |
| "alignment": 2, |
| "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": 2, |
| "alignment": 2, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "42", |
| "expression": "0b101010", |
| "literal": { |
| "kind": "numeric", |
| "value": "42", |
| "expression": "0b101010" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/CONVERSION_FACTOR", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 14, |
| "column": 7, |
| "length": 17 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "float64", |
| "type_shape_v1": { |
| "inline_size": 8, |
| "alignment": 8, |
| "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": 8, |
| "alignment": 8, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "1.41421", |
| "expression": "1.41421358", |
| "literal": { |
| "kind": "numeric", |
| "value": "1.41421", |
| "expression": "1.41421358" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/DIAMOND", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 10, |
| "column": 7, |
| "length": 7 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint64", |
| "type_shape_v1": { |
| "inline_size": 8, |
| "alignment": 8, |
| "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": 8, |
| "alignment": 8, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "1746410393481133080", |
| "expression": "0x183c7effff7e3c18", |
| "literal": { |
| "kind": "numeric", |
| "value": "1746410393481133080", |
| "expression": "0x183c7effff7e3c18" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/ENABLED_FLAG", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 5, |
| "column": 7, |
| "length": 12 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "bool", |
| "type_shape_v1": { |
| "inline_size": 1, |
| "alignment": 1, |
| "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": 1, |
| "alignment": 1, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "true", |
| "expression": "true", |
| "literal": { |
| "kind": "bool", |
| "value": "true", |
| "expression": "true" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/FUCHSIA", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 11, |
| "column": 7, |
| "length": 7 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint64", |
| "type_shape_v1": { |
| "inline_size": 8, |
| "alignment": 8, |
| "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": 8, |
| "alignment": 8, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "4054509061583223046", |
| "expression": "4054509061583223046", |
| "literal": { |
| "kind": "numeric", |
| "value": "4054509061583223046", |
| "expression": "4054509061583223046" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/MIN_TEMP", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 13, |
| "column": 7, |
| "length": 8 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "float32", |
| "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": "literal", |
| "value": "-273.15", |
| "expression": "-273.15", |
| "literal": { |
| "kind": "numeric", |
| "value": "-273.15", |
| "expression": "-273.15" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/OFFSET", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 6, |
| "column": 7, |
| "length": 6 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "int8", |
| "type_shape_v1": { |
| "inline_size": 1, |
| "alignment": 1, |
| "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": 1, |
| "alignment": 1, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "-33", |
| "expression": "-33", |
| "literal": { |
| "kind": "numeric", |
| "value": "-33", |
| "expression": "-33" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/POPULATION_USA_2018", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 9, |
| "column": 7, |
| "length": 19 |
| }, |
| "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 |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "330000000", |
| "expression": "330000000", |
| "literal": { |
| "kind": "numeric", |
| "value": "330000000", |
| "expression": "330000000" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/USERNAME", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 12, |
| "column": 7, |
| "length": 8 |
| }, |
| "type": { |
| "kind": "string", |
| "nullable": false, |
| "type_shape_v1": { |
| "inline_size": 16, |
| "alignment": 8, |
| "depth": 1, |
| "max_handles": 0, |
| "max_out_of_line": 4294967295, |
| "has_padding": true, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| }, |
| "type_shape_v2": { |
| "inline_size": 16, |
| "alignment": 8, |
| "depth": 1, |
| "max_handles": 0, |
| "max_out_of_line": 4294967295, |
| "has_padding": true, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "\"squeenze\"", |
| "expression": "\"\\\"squeenze\\\"\"", |
| "literal": { |
| "kind": "string", |
| "value": "\"squeenze\"", |
| "expression": "\"\\\"squeenze\\\"\"" |
| } |
| } |
| }, |
| { |
| "name": "test.consts/ZX_CONST", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 18, |
| "column": 7, |
| "length": 8 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint64", |
| "type_shape_v1": { |
| "inline_size": 8, |
| "alignment": 8, |
| "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": 8, |
| "alignment": 8, |
| "depth": 0, |
| "max_handles": 0, |
| "max_out_of_line": 0, |
| "has_padding": false, |
| "has_envelope": false, |
| "has_flexible_envelope": false |
| } |
| }, |
| "value": { |
| "kind": "identifier", |
| "value": "65536", |
| "expression": "zx.CHANNEL_MAX_MSG_BYTES", |
| "identifier": "zx/CHANNEL_MAX_MSG_BYTES" |
| } |
| }, |
| { |
| "name": "test.consts/ZX_OBJ_VAL", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 16, |
| "column": 7, |
| "length": 10 |
| }, |
| "type": { |
| "kind": "identifier", |
| "identifier": "zx/obj_type", |
| "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": "4", |
| "expression": "zx.obj_type.CHANNEL", |
| "identifier": "zx/obj_type.CHANNEL" |
| } |
| }, |
| { |
| "name": "test.consts/ZX_RIGHTS_VAL", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 17, |
| "column": 7, |
| "length": 13 |
| }, |
| "type": { |
| "kind": "identifier", |
| "identifier": "zx/rights", |
| "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": "4", |
| "expression": "zx.rights.READ", |
| "identifier": "zx/rights.READ" |
| } |
| }, |
| { |
| "name": "test.consts/bitsPrimitiveTrue", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 36, |
| "column": 7, |
| "length": 17 |
| }, |
| "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 |
| } |
| }, |
| "value": { |
| "kind": "identifier", |
| "value": "2", |
| "expression": "BitsType.true", |
| "identifier": "test.consts/BitsType.true" |
| } |
| }, |
| { |
| "name": "test.consts/bitsPrimitiveVal", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 34, |
| "column": 7, |
| "length": 16 |
| }, |
| "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 |
| } |
| }, |
| "value": { |
| "kind": "identifier", |
| "value": "1", |
| "expression": "BitsType.VALUE", |
| "identifier": "test.consts/BitsType.VALUE" |
| } |
| }, |
| { |
| "name": "test.consts/bitsTrue", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 35, |
| "column": 7, |
| "length": 8 |
| }, |
| "type": { |
| "kind": "identifier", |
| "identifier": "test.consts/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": "2", |
| "expression": "BitsType.true", |
| "identifier": "test.consts/BitsType.true" |
| } |
| }, |
| { |
| "name": "test.consts/bitsVal", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 33, |
| "column": 7, |
| "length": 7 |
| }, |
| "type": { |
| "kind": "identifier", |
| "identifier": "test.consts/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.VALUE", |
| "identifier": "test.consts/BitsType.VALUE" |
| } |
| }, |
| { |
| "name": "test.consts/enumPrimitiveTrue", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 27, |
| "column": 7, |
| "length": 17 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "int32", |
| "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": "2", |
| "expression": "EnumType.true", |
| "identifier": "test.consts/EnumType.true" |
| } |
| }, |
| { |
| "name": "test.consts/enumPrimitiveVal", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 25, |
| "column": 7, |
| "length": 16 |
| }, |
| "type": { |
| "kind": "primitive", |
| "subtype": "int32", |
| "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": "EnumType.VALUE", |
| "identifier": "test.consts/EnumType.VALUE" |
| } |
| }, |
| { |
| "name": "test.consts/enumTrue", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 26, |
| "column": 7, |
| "length": 8 |
| }, |
| "type": { |
| "kind": "identifier", |
| "identifier": "test.consts/EnumType", |
| "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": "2", |
| "expression": "EnumType.true", |
| "identifier": "test.consts/EnumType.true" |
| } |
| }, |
| { |
| "name": "test.consts/enumVal", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 24, |
| "column": 7, |
| "length": 7 |
| }, |
| "type": { |
| "kind": "identifier", |
| "identifier": "test.consts/EnumType", |
| "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": "EnumType.VALUE", |
| "identifier": "test.consts/EnumType.VALUE" |
| } |
| } |
| ], |
| "enum_declarations": [ |
| { |
| "name": "test.consts/EnumType", |
| "naming_context": [ |
| "EnumType" |
| ], |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 20, |
| "column": 6, |
| "length": 8 |
| }, |
| "type": "int32", |
| "members": [ |
| { |
| "name": "VALUE", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 21, |
| "column": 5, |
| "length": 5 |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "1", |
| "expression": "1", |
| "literal": { |
| "kind": "numeric", |
| "value": "1", |
| "expression": "1" |
| } |
| } |
| }, |
| { |
| "name": "true", |
| "location": { |
| "filename": "../../tools/fidl/fidlc/testdata/consts.test.fidl", |
| "line": 22, |
| "column": 5, |
| "length": 4 |
| }, |
| "value": { |
| "kind": "literal", |
| "value": "2", |
| "expression": "2", |
| "literal": { |
| "kind": "numeric", |
| "value": "2", |
| "expression": "2" |
| } |
| } |
| } |
| ], |
| "strict": true |
| } |
| ], |
| "experimental_resource_declarations": [], |
| "protocol_declarations": [], |
| "service_declarations": [], |
| "struct_declarations": [], |
| "external_struct_declarations": [], |
| "table_declarations": [], |
| "union_declarations": [], |
| "type_alias_declarations": [], |
| "declaration_order": [ |
| "test.consts/ZX_RIGHTS_VAL", |
| "test.consts/ZX_OBJ_VAL", |
| "test.consts/ZX_CONST", |
| "test.consts/USERNAME", |
| "test.consts/POPULATION_USA_2018", |
| "test.consts/OFFSET", |
| "test.consts/MIN_TEMP", |
| "test.consts/FUCHSIA", |
| "test.consts/EnumType", |
| "test.consts/enumVal", |
| "test.consts/enumTrue", |
| "test.consts/enumPrimitiveVal", |
| "test.consts/enumPrimitiveTrue", |
| "test.consts/ENABLED_FLAG", |
| "test.consts/DIAMOND", |
| "test.consts/CONVERSION_FACTOR", |
| "test.consts/BitsType", |
| "test.consts/bitsVal", |
| "test.consts/bitsTrue", |
| "test.consts/bitsPrimitiveVal", |
| "test.consts/bitsPrimitiveTrue", |
| "test.consts/ANSWER_IN_BINARY", |
| "test.consts/ANSWER" |
| ], |
| "declarations": { |
| "test.consts/BitsType": "bits", |
| "test.consts/ANSWER": "const", |
| "test.consts/ANSWER_IN_BINARY": "const", |
| "test.consts/CONVERSION_FACTOR": "const", |
| "test.consts/DIAMOND": "const", |
| "test.consts/ENABLED_FLAG": "const", |
| "test.consts/FUCHSIA": "const", |
| "test.consts/MIN_TEMP": "const", |
| "test.consts/OFFSET": "const", |
| "test.consts/POPULATION_USA_2018": "const", |
| "test.consts/USERNAME": "const", |
| "test.consts/ZX_CONST": "const", |
| "test.consts/ZX_OBJ_VAL": "const", |
| "test.consts/ZX_RIGHTS_VAL": "const", |
| "test.consts/bitsPrimitiveTrue": "const", |
| "test.consts/bitsPrimitiveVal": "const", |
| "test.consts/bitsTrue": "const", |
| "test.consts/bitsVal": "const", |
| "test.consts/enumPrimitiveTrue": "const", |
| "test.consts/enumPrimitiveVal": "const", |
| "test.consts/enumTrue": "const", |
| "test.consts/enumVal": "const", |
| "test.consts/EnumType": "enum" |
| } |
| } |