mirror of
https://github.com/ziglang/zig.git
synced 2025-02-04 12:01:18 +00:00
parent
6d73f89bf1
commit
3ef34feaeb
@ -9,47 +9,47 @@ class TypePrinter:
|
||||
# Keep in sync with src/type.zig
|
||||
# Types which have no payload do not need to be entered here.
|
||||
payload_type_names = {
|
||||
'array_u8': 'type.Len',
|
||||
'array_u8_sentinel_0': 'Len',
|
||||
'array_u8': 'Type.Payload.Len',
|
||||
'array_u8_sentinel_0': 'Type.Payload.Len',
|
||||
|
||||
'single_const_pointer': 'ElemType',
|
||||
'single_mut_pointer': 'ElemType',
|
||||
'many_const_pointer': 'ElemType',
|
||||
'many_mut_pointer': 'ElemType',
|
||||
'c_const_pointer': 'ElemType',
|
||||
'c_mut_pointer': 'ElemType',
|
||||
'const_slice': 'ElemType',
|
||||
'mut_slice': 'ElemType',
|
||||
'optional': 'ElemType',
|
||||
'optional_single_mut_pointer': 'ElemType',
|
||||
'optional_single_const_pointer': 'ElemType',
|
||||
'anyframe_T': 'ElemType',
|
||||
'single_const_pointer': 'Type.Payload.ElemType',
|
||||
'single_mut_pointer': 'Type.Payload.ElemType',
|
||||
'many_const_pointer': 'Type.Payload.ElemType',
|
||||
'many_mut_pointer': 'Type.Payload.ElemType',
|
||||
'c_const_pointer': 'Type.Payload.ElemType',
|
||||
'c_mut_pointer': 'Type.Payload.ElemType',
|
||||
'const_slice': 'Type.Payload.ElemType',
|
||||
'mut_slice': 'Type.Payload.ElemType',
|
||||
'optional': 'Type.Payload.ElemType',
|
||||
'optional_single_mut_pointer': 'Type.Payload.ElemType',
|
||||
'optional_single_const_pointer': 'Type.Payload.ElemType',
|
||||
'anyframe_T': 'Type.Payload.ElemType',
|
||||
|
||||
'int_signed': 'Bits',
|
||||
'int_unsigned': 'Bits',
|
||||
'int_signed': 'Type.Payload.Bits',
|
||||
'int_unsigned': 'Type.Payload.Bits',
|
||||
|
||||
'error_set': 'ErrorSet',
|
||||
'error_set_inferred': 'ErrorSetInferred',
|
||||
'error_set_merged': 'ErrorSetMerged',
|
||||
'error_set': 'Type.Payload.ErrorSet',
|
||||
'error_set_inferred': 'Type.Payload.ErrorSetInferred',
|
||||
'error_set_merged': 'Type.Payload.ErrorSetMerged',
|
||||
|
||||
'array': 'Array',
|
||||
'vector': 'Array',
|
||||
'array': 'Type.Payload.Array',
|
||||
'vector': 'Type.Payload.Array',
|
||||
|
||||
'array_sentinel': 'ArraySentinel',
|
||||
'pointer': 'Pointer',
|
||||
'function': 'Function',
|
||||
'error_union': 'ErrorUnion',
|
||||
'error_set_single': 'Name',
|
||||
'opaque': 'Opaque',
|
||||
'struct': 'Struct',
|
||||
'union': 'Union',
|
||||
'union_tagged': 'Union',
|
||||
'enum_full, .enum_nonexhaustive': 'EnumFull',
|
||||
'enum_simple': 'EnumSimple',
|
||||
'enum_numbered': 'EnumNumbered',
|
||||
'empty_struct': 'ContainerScope',
|
||||
'tuple': 'Tuple',
|
||||
'anon_struct': 'AnonStruct',
|
||||
'array_sentinel': 'Type.Payload.ArraySentinel',
|
||||
'pointer': 'Type.Payload.Pointer',
|
||||
'function': 'Type.Payload.Function',
|
||||
'error_union': 'Type.Payload.ErrorUnion',
|
||||
'error_set_single': 'Type.Payload.Name',
|
||||
'opaque': 'Type.Payload.Opaque',
|
||||
'struct': 'Type.Payload.Struct',
|
||||
'union': 'Type.Payload.Union',
|
||||
'union_tagged': 'Type.Payload.Union',
|
||||
'enum_full, .enum_nonexhaustive': 'Type.Payload.EnumFull',
|
||||
'enum_simple': 'Type.Payload.EnumSimple',
|
||||
'enum_numbered': 'Type.Payload.EnumNumbered',
|
||||
'empty_struct': 'Type.Payload.ContainerScope',
|
||||
'tuple': 'Type.Payload.Tuple',
|
||||
'anon_struct': 'Type.Payload.AnonStruct',
|
||||
}
|
||||
|
||||
def __init__(self, val):
|
||||
@ -98,48 +98,48 @@ class ValuePrinter:
|
||||
# Keep in sync with src/value.zig
|
||||
# Values which have no payload do not need to be entered here.
|
||||
payload_type_names = {
|
||||
'big_int_positive': 'BigInt',
|
||||
'big_int_negative': 'BigInt',
|
||||
'big_int_positive': 'Value.Payload.BigInt',
|
||||
'big_int_negative': 'Value.Payload.BigInt',
|
||||
|
||||
'extern_fn': 'ExternFn',
|
||||
'extern_fn': 'Value.Payload.ExternFn',
|
||||
|
||||
'decl_ref': 'Decl',
|
||||
'decl_ref': 'Value.Payload.Decl',
|
||||
|
||||
'repeated': 'SubValue',
|
||||
'eu_payload': 'SubValue',
|
||||
'opt_payload': 'SubValue',
|
||||
'empty_array_sentinel': 'SubValue',
|
||||
'repeated': 'Value.Payload.SubValue',
|
||||
'eu_payload': 'Value.Payload.SubValue',
|
||||
'opt_payload': 'Value.Payload.SubValue',
|
||||
'empty_array_sentinel': 'Value.Payload.SubValue',
|
||||
|
||||
'eu_payload_ptr': 'PayloadPtr',
|
||||
'opt_payload_ptr': 'PayloadPtr',
|
||||
'eu_payload_ptr': 'Value.Payload.PayloadPtr',
|
||||
'opt_payload_ptr': 'Value.Payload.PayloadPtr',
|
||||
|
||||
'bytes': 'Bytes',
|
||||
'enum_literal': 'Bytes',
|
||||
'bytes': 'Value.Payload.Bytes',
|
||||
'enum_literal': 'Value.Payload.Bytes',
|
||||
|
||||
'slice': 'Slice',
|
||||
'slice': 'Value.Payload.Slice',
|
||||
|
||||
'enum_field_index': 'U32',
|
||||
'enum_field_index': 'Value.Payload.U32',
|
||||
|
||||
'ty': 'Ty',
|
||||
'int_type': 'IntType',
|
||||
'int_u64': 'U64',
|
||||
'int_i64': 'I64',
|
||||
'function': 'Function',
|
||||
'variable': 'Variable',
|
||||
'decl_ref_mut': 'DeclRefMut',
|
||||
'elem_ptr': 'ElemPtr',
|
||||
'field_ptr': 'FieldPtr',
|
||||
'float_16': 'Float_16',
|
||||
'float_32': 'Float_32',
|
||||
'float_64': 'Float_64',
|
||||
'float_80': 'Float_80',
|
||||
'float_128': 'Float_128',
|
||||
'error': 'Error',
|
||||
'inferred_alloc': 'InferredAlloc',
|
||||
'inferred_alloc_comptime': 'InferredAllocComptime',
|
||||
'aggregate': 'Aggregate',
|
||||
'union': 'Union',
|
||||
'bound_fn': 'BoundFn',
|
||||
'ty': 'Value.Payload.Ty',
|
||||
'int_type': 'Value.Payload.IntType',
|
||||
'int_u64': 'Value.Payload.U64',
|
||||
'int_i64': 'Value.Payload.I64',
|
||||
'function': 'Value.Payload.Function',
|
||||
'variable': 'Value.Payload.Variable',
|
||||
'decl_ref_mut': 'Value.Payload.DeclRefMut',
|
||||
'elem_ptr': 'Value.Payload.ElemPtr',
|
||||
'field_ptr': 'Value.Payload.FieldPtr',
|
||||
'float_16': 'Value.Payload.Float_16',
|
||||
'float_32': 'Value.Payload.Float_32',
|
||||
'float_64': 'Value.Payload.Float_64',
|
||||
'float_80': 'Value.Payload.Float_80',
|
||||
'float_128': 'Value.Payload.Float_128',
|
||||
'error': 'Value.Payload.Error',
|
||||
'inferred_alloc': 'Value.Payload.InferredAlloc',
|
||||
'inferred_alloc_comptime': 'Value.Payload.InferredAllocComptime',
|
||||
'aggregate': 'Value.Payload.Aggregate',
|
||||
'union': 'Value.Payload.Union',
|
||||
'bound_fn': 'Value.Payload.BoundFn',
|
||||
}
|
||||
|
||||
def __init__(self, val):
|
||||
|
Loading…
Reference in New Issue
Block a user