blob: b81e3e097af4bf13f6cd7d902873aff2c319958d [file] [log] [blame]
{
"version": "0.0.1",
"name": "fidl.test.constants",
"library_dependencies": [],
"bits_declarations": [
{
"name": "fidl.test.constants/BitsType",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 22,
"column": 6,
"length": 8
},
"type": {
"kind": "primitive",
"subtype": "uint32"
},
"mask": "131",
"members": [
{
"name": "VALUE",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 23,
"column": 5,
"length": 5
},
"value": {
"kind": "literal",
"value": "1",
"expression": "0x00000001",
"literal": {
"kind": "numeric",
"value": "1",
"expression": "0x00000001"
}
}
},
{
"name": "SECOND_VALUE",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 24,
"column": 5,
"length": 12
},
"value": {
"kind": "literal",
"value": "128",
"expression": "0x80",
"literal": {
"kind": "numeric",
"value": "128",
"expression": "0x80"
}
}
},
{
"name": "THIRD_VALUE",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 25,
"column": 5,
"length": 11
},
"value": {
"kind": "literal",
"value": "2",
"expression": "0x2",
"literal": {
"kind": "numeric",
"value": "2",
"expression": "0x2"
}
}
}
],
"strict": true
},
{
"name": "fidl.test.constants/Bits",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 37,
"column": 6,
"length": 4
},
"type": {
"kind": "primitive",
"subtype": "uint32"
},
"mask": "8",
"members": [
{
"name": "B",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 38,
"column": 5,
"length": 1
},
"value": {
"kind": "literal",
"value": "8",
"expression": "0x8",
"literal": {
"kind": "numeric",
"value": "8",
"expression": "0x8"
}
}
}
],
"strict": true
}
],
"const_declarations": [
{
"name": "fidl.test.constants/UINT8",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 3,
"column": 13,
"length": 5
},
"type": {
"kind": "primitive",
"subtype": "uint8"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/UINT16",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 4,
"column": 14,
"length": 6
},
"type": {
"kind": "primitive",
"subtype": "uint16"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/UINT32",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 5,
"column": 14,
"length": 6
},
"type": {
"kind": "primitive",
"subtype": "uint32"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/UINT64",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 6,
"column": 14,
"length": 6
},
"type": {
"kind": "primitive",
"subtype": "uint64"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/INT8",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 7,
"column": 12,
"length": 4
},
"type": {
"kind": "primitive",
"subtype": "int8"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/INT16",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 8,
"column": 13,
"length": 5
},
"type": {
"kind": "primitive",
"subtype": "int16"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/INT32",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 9,
"column": 13,
"length": 5
},
"type": {
"kind": "primitive",
"subtype": "int32"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/INT64",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 10,
"column": 13,
"length": 5
},
"type": {
"kind": "primitive",
"subtype": "int64"
},
"value": {
"kind": "literal",
"value": "4",
"expression": "0b100",
"literal": {
"kind": "numeric",
"value": "4",
"expression": "0b100"
}
}
},
{
"name": "fidl.test.constants/FLOAT32",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 11,
"column": 15,
"length": 7
},
"type": {
"kind": "primitive",
"subtype": "float32"
},
"value": {
"kind": "literal",
"value": "3.14159",
"expression": "3.14159",
"literal": {
"kind": "numeric",
"value": "3.14159",
"expression": "3.14159"
}
}
},
{
"name": "fidl.test.constants/FLOAT64",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 12,
"column": 15,
"length": 7
},
"type": {
"kind": "primitive",
"subtype": "float64"
},
"value": {
"kind": "literal",
"value": "3.14159",
"expression": "3.14159",
"literal": {
"kind": "numeric",
"value": "3.14159",
"expression": "3.14159"
}
}
},
{
"name": "fidl.test.constants/BOOL",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 13,
"column": 12,
"length": 4
},
"type": {
"kind": "primitive",
"subtype": "bool"
},
"value": {
"kind": "literal",
"value": "true",
"expression": "true",
"literal": {
"kind": "true",
"value": "true",
"expression": "true"
}
}
},
{
"name": "fidl.test.constants/STRING",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 14,
"column": 14,
"length": 6
},
"type": {
"kind": "string",
"nullable": false
},
"value": {
"kind": "literal",
"value": "string",
"expression": "\"string\"",
"literal": {
"kind": "string",
"value": "string",
"expression": "\"string\""
}
}
},
{
"name": "fidl.test.constants/enumVal",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 19,
"column": 16,
"length": 7
},
"type": {
"kind": "identifier",
"identifier": "fidl.test.constants/EnumType",
"nullable": false
},
"value": {
"kind": "identifier",
"value": "1",
"expression": "EnumType.VALUE",
"identifier": "fidl.test.constants/EnumType.VALUE"
}
},
{
"name": "fidl.test.constants/enumPrimitiveVal",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 20,
"column": 13,
"length": 16
},
"type": {
"kind": "primitive",
"subtype": "int32"
},
"value": {
"kind": "identifier",
"value": "1",
"expression": "EnumType.VALUE",
"identifier": "fidl.test.constants/EnumType.VALUE"
}
},
{
"name": "fidl.test.constants/bitsVal",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 27,
"column": 16,
"length": 7
},
"type": {
"kind": "identifier",
"identifier": "fidl.test.constants/BitsType",
"nullable": false
},
"value": {
"kind": "identifier",
"value": "1",
"expression": "BitsType.VALUE",
"identifier": "fidl.test.constants/BitsType.VALUE"
}
},
{
"name": "fidl.test.constants/bitsPrimitiveVal",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 28,
"column": 13,
"length": 16
},
"type": {
"kind": "primitive",
"subtype": "int32"
},
"value": {
"kind": "identifier",
"value": "1",
"expression": "BitsType.VALUE",
"identifier": "fidl.test.constants/BitsType.VALUE"
}
},
{
"name": "fidl.test.constants/orResult",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 30,
"column": 16,
"length": 8
},
"type": {
"kind": "identifier",
"identifier": "fidl.test.constants/BitsType",
"nullable": false
},
"value": {
"kind": "binary_operator",
"value": "131",
"expression": "BitsType.VALUE | BitsType.SECOND_VALUE | BitsType.THIRD_VALUE"
}
},
{
"name": "fidl.test.constants/orResultPrimitiveVal",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 31,
"column": 13,
"length": 20
},
"type": {
"kind": "primitive",
"subtype": "int32"
},
"value": {
"kind": "binary_operator",
"value": "129",
"expression": "BitsType.VALUE | BitsType.SECOND_VALUE"
}
}
],
"enum_declarations": [
{
"name": "fidl.test.constants/EnumType",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 16,
"column": 6,
"length": 8
},
"type": "int32",
"members": [
{
"name": "VALUE",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 17,
"column": 5,
"length": 5
},
"value": {
"kind": "literal",
"value": "1",
"expression": "1",
"literal": {
"kind": "numeric",
"value": "1",
"expression": "1"
}
}
}
],
"strict": true
},
{
"name": "fidl.test.constants/Enum",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 33,
"column": 6,
"length": 4
},
"type": "uint32",
"members": [
{
"name": "E",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 34,
"column": 5,
"length": 1
},
"value": {
"kind": "literal",
"value": "170",
"expression": "0b10101010",
"literal": {
"kind": "numeric",
"value": "170",
"expression": "0b10101010"
}
}
}
],
"strict": true
}
],
"experimental_resource_declarations": [],
"interface_declarations": [],
"service_declarations": [],
"struct_declarations": [
{
"name": "fidl.test.constants/Struct",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 41,
"column": 8,
"length": 6
},
"anonymous": false,
"members": [
{
"type": {
"kind": "primitive",
"subtype": "int64"
},
"name": "int64_with_default",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 42,
"column": 11,
"length": 18
},
"maybe_default_value": {
"kind": "literal",
"value": "7",
"expression": "007",
"literal": {
"kind": "numeric",
"value": "7",
"expression": "007"
}
},
"field_shape_v1": {
"offset": 0,
"padding": 0
}
},
{
"type": {
"kind": "string",
"nullable": false
},
"name": "string_with_default",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 43,
"column": 12,
"length": 19
},
"maybe_default_value": {
"kind": "literal",
"value": "stuff",
"expression": "\"stuff\"",
"literal": {
"kind": "string",
"value": "stuff",
"expression": "\"stuff\""
}
},
"field_shape_v1": {
"offset": 8,
"padding": 0
}
},
{
"type": {
"kind": "primitive",
"subtype": "bool"
},
"name": "bool_with_default",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 44,
"column": 10,
"length": 17
},
"maybe_default_value": {
"kind": "literal",
"value": "true",
"expression": "true",
"literal": {
"kind": "true",
"value": "true",
"expression": "true"
}
},
"field_shape_v1": {
"offset": 24,
"padding": 3
}
},
{
"type": {
"kind": "identifier",
"identifier": "fidl.test.constants/Enum",
"nullable": false
},
"name": "enum_with_default",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 45,
"column": 10,
"length": 17
},
"maybe_default_value": {
"kind": "identifier",
"value": "170",
"expression": "Enum.E",
"identifier": "fidl.test.constants/Enum.E"
},
"field_shape_v1": {
"offset": 28,
"padding": 0
}
},
{
"type": {
"kind": "identifier",
"identifier": "fidl.test.constants/Bits",
"nullable": false
},
"name": "bits_with_default",
"location": {
"filename": "../../zircon/tools/fidl/testdata/constants.test.fidl",
"line": 46,
"column": 10,
"length": 17
},
"maybe_default_value": {
"kind": "identifier",
"value": "8",
"expression": "Bits.B",
"identifier": "fidl.test.constants/Bits.B"
},
"field_shape_v1": {
"offset": 32,
"padding": 4
}
}
],
"resource": false,
"type_shape_v1": {
"inline_size": 40,
"alignment": 8,
"depth": 1,
"max_handles": 0,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_flexible_envelope": false
}
}
],
"table_declarations": [],
"union_declarations": [],
"type_alias_declarations": [],
"declaration_order": [
"fidl.test.constants/UINT8",
"fidl.test.constants/UINT64",
"fidl.test.constants/UINT32",
"fidl.test.constants/UINT16",
"fidl.test.constants/STRING",
"fidl.test.constants/INT8",
"fidl.test.constants/INT64",
"fidl.test.constants/INT32",
"fidl.test.constants/INT16",
"fidl.test.constants/FLOAT64",
"fidl.test.constants/FLOAT32",
"fidl.test.constants/EnumType",
"fidl.test.constants/enumVal",
"fidl.test.constants/enumPrimitiveVal",
"fidl.test.constants/Enum",
"fidl.test.constants/BitsType",
"fidl.test.constants/orResultPrimitiveVal",
"fidl.test.constants/orResult",
"fidl.test.constants/bitsVal",
"fidl.test.constants/bitsPrimitiveVal",
"fidl.test.constants/Bits",
"fidl.test.constants/Struct",
"fidl.test.constants/BOOL"
],
"declarations": {
"fidl.test.constants/BitsType": "bits",
"fidl.test.constants/Bits": "bits",
"fidl.test.constants/UINT8": "const",
"fidl.test.constants/UINT16": "const",
"fidl.test.constants/UINT32": "const",
"fidl.test.constants/UINT64": "const",
"fidl.test.constants/INT8": "const",
"fidl.test.constants/INT16": "const",
"fidl.test.constants/INT32": "const",
"fidl.test.constants/INT64": "const",
"fidl.test.constants/FLOAT32": "const",
"fidl.test.constants/FLOAT64": "const",
"fidl.test.constants/BOOL": "const",
"fidl.test.constants/STRING": "const",
"fidl.test.constants/enumVal": "const",
"fidl.test.constants/enumPrimitiveVal": "const",
"fidl.test.constants/bitsVal": "const",
"fidl.test.constants/bitsPrimitiveVal": "const",
"fidl.test.constants/orResult": "const",
"fidl.test.constants/orResultPrimitiveVal": "const",
"fidl.test.constants/EnumType": "enum",
"fidl.test.constants/Enum": "enum",
"fidl.test.constants/Struct": "struct"
}
}