Documentation ¶
Overview ¶
Package astproto is a generated protocol buffer package.
It is generated from these files:
tufile.proto
It has these top-level messages:
FileRef IntAttr NodeRef OpNodeRef NumberedNodeRef Attr Node File
Index ¶
- Variables
- type AccessType
- type Attr
- func (*Attr) Descriptor() ([]byte, []int)
- func (m *Attr) GetAccess() AccessType
- func (m *Attr) GetAddrAttr() string
- func (m *Attr) GetAttrName() Field
- func (m *Attr) GetIntAttr() *IntAttr
- func (m *Attr) GetLinkAttr() LinkType
- func (m *Attr) GetNodeAttr() *NodeRef
- func (m *Attr) GetNodeOpAttr() *OpNodeRef
- func (m *Attr) GetNodeType() TuNodeType
- func (m *Attr) GetNoteAttr() string
- func (m *Attr) GetNumberedNodeRef() *NumberedNodeRef
- func (m *Attr) GetQualAttr() QualType
- func (m *Attr) GetRandomSpec() bool
- func (m *Attr) GetSignAttr() SignType
- func (m *Attr) GetSignedIntAttr() int32
- func (m *Attr) GetSourceAttr() *FileRef
- func (m *Attr) GetSpecAttr() Spec
- func (m *Attr) GetStringAttr() string
- func (m *Attr) GetTagAttr() TagType
- func (*Attr) ProtoMessage()
- func (m *Attr) Reset()
- func (m *Attr) String() string
- type Field
- type File
- type FileRef
- type IntAttr
- type LinkType
- type Node
- func (t *Node) AddAccess(val AccessType)
- func (t *Node) AddFileRef(file string, line int32)
- func (t *Node) AddGeneric(field string, val *Attr)
- func (t *Node) AddHexField(field string, val string)
- func (t *Node) AddIntField(field string, val string)
- func (t *Node) AddIntStringField(field string, val string)
- func (t *Node) AddLink(val LinkType)
- func (t *Node) AddLowIntField(field string, val string)
- func (t *Node) AddNodeRef(field string, node int32)
- func (t *Node) AddNote(val string)
- func (t *Node) AddOpNodeRef(field string, opn int32, node int32)
- func (t *Node) AddQual(val QualType)
- func (t *Node) AddSign(val SignType)
- func (t *Node) AddSpec(spec Spec)
- func (t *Node) AddStringField(field string, val string)
- func (t *Node) AddTag(val TagType)
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetAttrs() []*Attr
- func (m *Node) GetNodeID() int32
- func (m *Node) GetNodeType() NodeType
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- type NodeRef
- type NodeType
- type NumberedNodeRef
- type OpNodeRef
- type QualType
- type SignType
- type Spec
- type TagType
- type TuNodeType
Constants ¶
This section is empty.
Variables ¶
View Source
var AccessType_name = map[int32]string{
0: "ACC_priv",
2: "ACC_pub",
3: "ACC_prot",
}
View Source
var AccessType_value = map[string]int32{
"ACC_priv": 0,
"ACC_pub": 2,
"ACC_prot": 3,
}
View Source
var Field_name = map[int32]string{
14: "accs",
9: "addr",
8: "algn",
20: "args",
24: "argt",
21: "base",
2: "bases",
46: "binf",
11: "body",
55: "bpos",
54: "chain",
34: "chan",
39: "cls",
30: "cnst",
40: "csts",
26: "dcls",
25: "decl",
51: "domn",
52: "elts",
27: "expr",
37: "flds",
29: "fn",
28: "fncs",
7: "high",
57: "idx",
53: "init",
41: "labl",
12: "link",
61: "lngt",
3: "low",
45: "max",
44: "min",
48: "mngl",
47: "name_field",
13: "note",
22: "orig",
5: "prec",
18: "prms",
38: "ptd",
35: "purp",
15: "qual",
36: "refd",
17: "retn",
50: "scpe",
16: "sign",
56: "size",
60: "spec",
1: "srcp",
62: "strg",
10: "tag",
42: "type",
43: "unql",
4: "used",
58: "val",
33: "valu",
31: "vars",
32: "vfld",
23: "OP0",
63: "cond",
64: "rslt",
101: "OPN",
}
View Source
var Field_value = map[string]int32{
"accs": 14,
"addr": 9,
"algn": 8,
"args": 20,
"argt": 24,
"base": 21,
"bases": 2,
"binf": 46,
"body": 11,
"bpos": 55,
"chain": 54,
"chan": 34,
"cls": 39,
"cnst": 30,
"csts": 40,
"dcls": 26,
"decl": 25,
"domn": 51,
"elts": 52,
"expr": 27,
"flds": 37,
"fn": 29,
"fncs": 28,
"high": 7,
"idx": 57,
"init": 53,
"labl": 41,
"link": 12,
"lngt": 61,
"low": 3,
"max": 45,
"min": 44,
"mngl": 48,
"name_field": 47,
"note": 13,
"orig": 22,
"prec": 5,
"prms": 18,
"ptd": 38,
"purp": 35,
"qual": 15,
"refd": 36,
"retn": 17,
"scpe": 50,
"sign": 16,
"size": 56,
"spec": 60,
"srcp": 1,
"strg": 62,
"tag": 10,
"type": 42,
"unql": 43,
"used": 4,
"val": 58,
"valu": 33,
"vars": 31,
"vfld": 32,
"OP0": 23,
"cond": 63,
"rslt": 64,
"OPN": 101,
}
View Source
var LinkType_name = map[int32]string{
0: "extern",
1: "static",
}
View Source
var LinkType_value = map[string]int32{
"extern": 0,
"static": 1,
}
View Source
var NodeType_name = map[int32]string{
1: "addr_expr",
2: "array_type",
3: "asm_expr",
4: "binfo",
5: "boolean_type",
6: "component_ref",
7: "constructor",
8: "enumeral_type",
9: "error_mark",
10: "field_decl",
11: "function_decl",
12: "function_type",
13: "identifier_node",
14: "indirect_ref",
15: "integer_cst",
16: "integer_type",
17: "lshift_expr",
18: "mem_ref",
19: "namespace_decl",
20: "offset_type",
21: "parm_decl",
22: "pointer_type",
23: "real_type",
24: "record_type",
25: "reference_type",
26: "result_decl",
27: "save_expr",
28: "string_cst",
29: "template_type_parm",
30: "translation_unit_decl",
31: "tree_list",
32: "truth_andif_expr",
33: "type_decl",
34: "typename_type",
35: "var_decl",
36: "void_type",
}
View Source
var NodeType_value = map[string]int32{
"addr_expr": 1,
"array_type": 2,
"asm_expr": 3,
"binfo": 4,
"boolean_type": 5,
"component_ref": 6,
"constructor": 7,
"enumeral_type": 8,
"error_mark": 9,
"field_decl": 10,
"function_decl": 11,
"function_type": 12,
"identifier_node": 13,
"indirect_ref": 14,
"integer_cst": 15,
"integer_type": 16,
"lshift_expr": 17,
"mem_ref": 18,
"namespace_decl": 19,
"offset_type": 20,
"parm_decl": 21,
"pointer_type": 22,
"real_type": 23,
"record_type": 24,
"reference_type": 25,
"result_decl": 26,
"save_expr": 27,
"string_cst": 28,
"template_type_parm": 29,
"translation_unit_decl": 30,
"tree_list": 31,
"truth_andif_expr": 32,
"type_decl": 33,
"typename_type": 34,
"var_decl": 35,
"void_type": 36,
}
View Source
var QualType_name = map[int32]string{
0: "c",
1: "v",
2: "r",
}
View Source
var QualType_value = map[string]int32{
"c": 0,
"v": 1,
"r": 2,
}
View Source
var SignType_name = map[int32]string{
0: "signed",
1: "unsigned",
}
View Source
var SignType_value = map[string]int32{
"signed": 0,
"unsigned": 1,
}
View Source
var Spec_name = map[int32]string{
1: "mutable",
2: "bitfield",
3: "pure",
4: "virt",
5: "register",
}
View Source
var Spec_value = map[string]int32{
"mutable": 1,
"bitfield": 2,
"pure": 3,
"virt": 4,
"register": 5,
}
View Source
var TagType_name = map[int32]string{
0: "struct",
1: "union",
}
View Source
var TagType_value = map[string]int32{
"struct": 0,
"union": 1,
}
View Source
var TuNodeType_name = map[int32]string{
0: "TUFILE",
1: "OpAttr",
6: "NTSourceAttr",
7: "NTIntAttr",
8: "NTIntAttr3",
9: "NTIntAttr2",
10: "NTSignedIntAttr",
11: "NTAddr",
12: "NTHex",
13: "NTAddrAttr",
14: "NTTagAttr",
15: "NTBodyAttr",
16: "NTLinkAttr",
17: "NTNoteAttr",
18: "NTAccsAttr",
19: "NTQualAttr",
20: "NTSignAttr",
21: "NTNodeName",
22: "NTNodeAttr",
23: "NTSpecValue",
24: "NTLngtAttr",
25: "NTStringAttr",
27: "NTRandomSpec",
28: "NTOneAttr",
29: "NTAttrs",
30: "NTAttr",
31: "NTStatement",
32: "NTNode",
33: "NTInteger",
34: "NTNodeType",
35: "NTNumberedNodeRef",
}
View Source
var TuNodeType_value = map[string]int32{
"TUFILE": 0,
"OpAttr": 1,
"NTSourceAttr": 6,
"NTIntAttr": 7,
"NTIntAttr3": 8,
"NTIntAttr2": 9,
"NTSignedIntAttr": 10,
"NTAddr": 11,
"NTHex": 12,
"NTAddrAttr": 13,
"NTTagAttr": 14,
"NTBodyAttr": 15,
"NTLinkAttr": 16,
"NTNoteAttr": 17,
"NTAccsAttr": 18,
"NTQualAttr": 19,
"NTSignAttr": 20,
"NTNodeName": 21,
"NTNodeAttr": 22,
"NTSpecValue": 23,
"NTLngtAttr": 24,
"NTStringAttr": 25,
"NTRandomSpec": 27,
"NTOneAttr": 28,
"NTAttrs": 29,
"NTAttr": 30,
"NTStatement": 31,
"NTNode": 32,
"NTInteger": 33,
"NTNodeType": 34,
"NTNumberedNodeRef": 35,
}
Functions ¶
This section is empty.
Types ¶
type AccessType ¶
type AccessType int32
const ( AccessType_ACC_priv AccessType = 0 AccessType_ACC_pub AccessType = 2 AccessType_ACC_prot AccessType = 3 )
func (AccessType) Enum ¶
func (x AccessType) Enum() *AccessType
func (AccessType) EnumDescriptor ¶
func (AccessType) EnumDescriptor() ([]byte, []int)
func (AccessType) String ¶
func (x AccessType) String() string
func (*AccessType) UnmarshalJSON ¶
func (x *AccessType) UnmarshalJSON(data []byte) error
type Attr ¶
type Attr struct { NodeType *TuNodeType `` /* 143-byte string literal not displayed */ AttrName *Field `` /* 138-byte string literal not displayed */ // and one of these values, dependant on the type of node SourceAttr *FileRef `protobuf:"bytes,6,opt,name=SourceAttr,json=sourceAttr" json:"SourceAttr,omitempty"` IntAttr *IntAttr `protobuf:"bytes,7,opt,name=IntAttr,json=intAttr" json:"IntAttr,omitempty"` Access *AccessType `` /* 138-byte string literal not displayed */ AddrAttr *string `protobuf:"bytes,13,opt,name=AddrAttr,json=addrAttr" json:"AddrAttr,omitempty"` NodeAttr *NodeRef `protobuf:"bytes,22,opt,name=NodeAttr,json=nodeAttr" json:"NodeAttr,omitempty"` NumberedNodeRef *NumberedNodeRef `protobuf:"bytes,35,opt,name=NumberedNodeRef,json=numberedNodeRef" json:"NumberedNodeRef,omitempty"` NodeOpAttr *OpNodeRef `protobuf:"bytes,26,opt,name=NodeOpAttr,json=nodeOpAttr" json:"NodeOpAttr,omitempty"` // optional NodeRef BodyAttr=15; body is a standard node ref LinkAttr *LinkType `` /* 142-byte string literal not displayed */ // optional NodeAttr NodeAttr=22; NoteAttr *string `protobuf:"bytes,17,opt,name=NoteAttr,json=noteAttr" json:"NoteAttr,omitempty"` QualAttr *QualType `` /* 142-byte string literal not displayed */ RandomSpec *bool `protobuf:"varint,27,opt,name=RandomSpec,json=randomSpec" json:"RandomSpec,omitempty"` SignAttr *SignType `` /* 142-byte string literal not displayed */ SignedIntAttr *int32 `protobuf:"varint,10,opt,name=SignedIntAttr,json=signedIntAttr" json:"SignedIntAttr,omitempty"` StringAttr *string `protobuf:"bytes,25,opt,name=StringAttr,json=stringAttr" json:"StringAttr,omitempty"` TagAttr *TagType `` /* 138-byte string literal not displayed */ SpecAttr *Spec `` /* 138-byte string literal not displayed */ XXX_unrecognized []byte `json:"-"` }
func (*Attr) Descriptor ¶
func (*Attr) GetAccess ¶
func (m *Attr) GetAccess() AccessType
func (*Attr) GetAddrAttr ¶
func (*Attr) GetAttrName ¶
func (*Attr) GetIntAttr ¶
func (*Attr) GetLinkAttr ¶
func (*Attr) GetNodeAttr ¶
func (*Attr) GetNodeOpAttr ¶
func (*Attr) GetNodeType ¶
func (m *Attr) GetNodeType() TuNodeType
func (*Attr) GetNoteAttr ¶
func (*Attr) GetNumberedNodeRef ¶
func (m *Attr) GetNumberedNodeRef() *NumberedNodeRef
func (*Attr) GetQualAttr ¶
func (*Attr) GetRandomSpec ¶
func (*Attr) GetSignAttr ¶
func (*Attr) GetSignedIntAttr ¶
func (*Attr) GetSourceAttr ¶
func (*Attr) GetSpecAttr ¶
func (*Attr) GetStringAttr ¶
func (*Attr) GetTagAttr ¶
func (*Attr) ProtoMessage ¶
func (*Attr) ProtoMessage()
type Field ¶
type Field int32
const ( Field_accs Field = 14 Field_addr Field = 9 Field_algn Field = 8 Field_args Field = 20 Field_argt Field = 24 Field_base Field = 21 Field_bases Field = 2 Field_binf Field = 46 Field_body Field = 11 Field_bpos Field = 55 Field_chain Field = 54 Field_chan Field = 34 Field_cls Field = 39 Field_cnst Field = 30 Field_csts Field = 40 Field_dcls Field = 26 Field_decl Field = 25 Field_domn Field = 51 Field_elts Field = 52 Field_expr Field = 27 Field_flds Field = 37 Field_fn Field = 29 Field_fncs Field = 28 Field_high Field = 7 Field_idx Field = 57 Field_init Field = 53 Field_labl Field = 41 Field_link Field = 12 Field_lngt Field = 61 Field_low Field = 3 Field_max Field = 45 Field_min Field = 44 Field_mngl Field = 48 Field_name_field Field = 47 Field_note Field = 13 Field_orig Field = 22 Field_prec Field = 5 Field_prms Field = 18 Field_ptd Field = 38 Field_purp Field = 35 Field_qual Field = 15 Field_refd Field = 36 Field_retn Field = 17 Field_scpe Field = 50 Field_sign Field = 16 Field_size Field = 56 Field_spec Field = 60 Field_srcp Field = 1 Field_strg Field = 62 Field_tag Field = 10 Field_type Field = 42 Field_unql Field = 43 Field_used Field = 4 Field_val Field = 58 Field_valu Field = 33 Field_vars Field = 31 Field_vfld Field = 32 Field_OP0 Field = 23 Field_cond Field = 63 Field_rslt Field = 64 // all indexed after this Field_OPN Field = 101 )
func (Field) EnumDescriptor ¶
func (*Field) UnmarshalJSON ¶
type File ¶
type File struct { Filename *string `protobuf:"bytes,1,req,name=Filename,json=filename" json:"Filename,omitempty"` Nodes []*Node `protobuf:"bytes,2,rep,name=nodes" json:"nodes,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*File) Descriptor ¶
func (*File) GetFilename ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
type FileRef ¶
type FileRef struct { FileName *string `protobuf:"bytes,1,req,name=FileName,json=fileName" json:"FileName,omitempty"` LineNumber *int32 `protobuf:"varint,2,req,name=LineNumber,json=lineNumber" json:"LineNumber,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*FileRef) Descriptor ¶
func (*FileRef) GetFileName ¶
func (*FileRef) GetLineNumber ¶
func (*FileRef) ProtoMessage ¶
func (*FileRef) ProtoMessage()
type IntAttr ¶
type IntAttr struct { // required int64 LValue = 1; Value *string `protobuf:"bytes,2,req,name=Value,json=value" json:"Value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*IntAttr) Descriptor ¶
func (*IntAttr) ProtoMessage ¶
func (*IntAttr) ProtoMessage()
type LinkType ¶
type LinkType int32
func (LinkType) EnumDescriptor ¶
func (*LinkType) UnmarshalJSON ¶
type Node ¶
type Node struct { NodeID *int32 `protobuf:"varint,1,req,name=NodeID,json=nodeID" json:"NodeID,omitempty"` NodeType *NodeType `` /* 141-byte string literal not displayed */ Attrs []*Attr `protobuf:"bytes,3,rep,name=attrs" json:"attrs,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Node) AddAccess ¶
func (t *Node) AddAccess(val AccessType)
func (*Node) AddFileRef ¶
func (*Node) AddGeneric ¶
func (*Node) AddHexField ¶
func (*Node) AddIntField ¶
func (*Node) AddIntStringField ¶
func (*Node) AddLowIntField ¶
func (*Node) AddNodeRef ¶
func (*Node) AddStringField ¶
func (*Node) Descriptor ¶
func (*Node) GetNodeType ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type NodeRef ¶
type NodeRef struct { NodeId *int32 `protobuf:"varint,1,req,name=NodeId,json=nodeId" json:"NodeId,omitempty"` XXX_unrecognized []byte `json:"-"` }
message AccsAttr {}
func (*NodeRef) Descriptor ¶
func (*NodeRef) ProtoMessage ¶
func (*NodeRef) ProtoMessage()
type NodeType ¶
type NodeType int32
const ( NodeType_addr_expr NodeType = 1 NodeType_array_type NodeType = 2 NodeType_asm_expr NodeType = 3 NodeType_binfo NodeType = 4 NodeType_boolean_type NodeType = 5 NodeType_component_ref NodeType = 6 NodeType_constructor NodeType = 7 NodeType_enumeral_type NodeType = 8 NodeType_error_mark NodeType = 9 NodeType_field_decl NodeType = 10 NodeType_function_decl NodeType = 11 NodeType_function_type NodeType = 12 NodeType_identifier_node NodeType = 13 NodeType_indirect_ref NodeType = 14 NodeType_integer_cst NodeType = 15 NodeType_integer_type NodeType = 16 NodeType_lshift_expr NodeType = 17 NodeType_mem_ref NodeType = 18 NodeType_namespace_decl NodeType = 19 NodeType_offset_type NodeType = 20 NodeType_parm_decl NodeType = 21 NodeType_pointer_type NodeType = 22 NodeType_real_type NodeType = 23 NodeType_record_type NodeType = 24 NodeType_reference_type NodeType = 25 NodeType_result_decl NodeType = 26 NodeType_save_expr NodeType = 27 NodeType_string_cst NodeType = 28 NodeType_template_type_parm NodeType = 29 NodeType_translation_unit_decl NodeType = 30 NodeType_tree_list NodeType = 31 NodeType_truth_andif_expr NodeType = 32 NodeType_type_decl NodeType = 33 NodeType_typename_type NodeType = 34 NodeType_var_decl NodeType = 35 NodeType_void_type NodeType = 36 )
func (NodeType) EnumDescriptor ¶
func (*NodeType) UnmarshalJSON ¶
type NumberedNodeRef ¶
type NumberedNodeRef struct { Number *int32 `protobuf:"varint,1,req,name=Number,json=number" json:"Number,omitempty"` NodeId *int32 `protobuf:"varint,2,req,name=NodeId,json=nodeId" json:"NodeId,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*NumberedNodeRef) Descriptor ¶
func (*NumberedNodeRef) Descriptor() ([]byte, []int)
func (*NumberedNodeRef) GetNodeId ¶
func (m *NumberedNodeRef) GetNodeId() int32
func (*NumberedNodeRef) GetNumber ¶
func (m *NumberedNodeRef) GetNumber() int32
func (*NumberedNodeRef) ProtoMessage ¶
func (*NumberedNodeRef) ProtoMessage()
func (*NumberedNodeRef) Reset ¶
func (m *NumberedNodeRef) Reset()
func (*NumberedNodeRef) String ¶
func (m *NumberedNodeRef) String() string
type OpNodeRef ¶
type OpNodeRef struct { OpNo *int32 `protobuf:"varint,1,req,name=OpNo,json=opNo" json:"OpNo,omitempty"` NodeId *int32 `protobuf:"varint,2,req,name=NodeId,json=nodeId" json:"NodeId,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*OpNodeRef) Descriptor ¶
func (*OpNodeRef) ProtoMessage ¶
func (*OpNodeRef) ProtoMessage()
type QualType ¶
type QualType int32
func (QualType) EnumDescriptor ¶
func (*QualType) UnmarshalJSON ¶
type SignType ¶
type SignType int32
func (SignType) EnumDescriptor ¶
func (*SignType) UnmarshalJSON ¶
type TuNodeType ¶
type TuNodeType int32
const ( TuNodeType_TUFILE TuNodeType = 0 TuNodeType_OpAttr TuNodeType = 1 TuNodeType_NTSourceAttr TuNodeType = 6 TuNodeType_NTIntAttr TuNodeType = 7 TuNodeType_NTIntAttr3 TuNodeType = 8 TuNodeType_NTIntAttr2 TuNodeType = 9 TuNodeType_NTSignedIntAttr TuNodeType = 10 TuNodeType_NTAddr TuNodeType = 11 TuNodeType_NTHex TuNodeType = 12 TuNodeType_NTAddrAttr TuNodeType = 13 TuNodeType_NTTagAttr TuNodeType = 14 TuNodeType_NTBodyAttr TuNodeType = 15 TuNodeType_NTLinkAttr TuNodeType = 16 TuNodeType_NTNoteAttr TuNodeType = 17 TuNodeType_NTAccsAttr TuNodeType = 18 TuNodeType_NTQualAttr TuNodeType = 19 TuNodeType_NTSignAttr TuNodeType = 20 TuNodeType_NTNodeName TuNodeType = 21 TuNodeType_NTNodeAttr TuNodeType = 22 TuNodeType_NTSpecValue TuNodeType = 23 TuNodeType_NTLngtAttr TuNodeType = 24 TuNodeType_NTStringAttr TuNodeType = 25 TuNodeType_NTRandomSpec TuNodeType = 27 TuNodeType_NTOneAttr TuNodeType = 28 TuNodeType_NTAttrs TuNodeType = 29 TuNodeType_NTAttr TuNodeType = 30 TuNodeType_NTStatement TuNodeType = 31 TuNodeType_NTNode TuNodeType = 32 TuNodeType_NTInteger TuNodeType = 33 TuNodeType_NTNodeType TuNodeType = 34 TuNodeType_NTNumberedNodeRef TuNodeType = 35 )
func (TuNodeType) Enum ¶
func (x TuNodeType) Enum() *TuNodeType
func (TuNodeType) EnumDescriptor ¶
func (TuNodeType) EnumDescriptor() ([]byte, []int)
func (TuNodeType) String ¶
func (x TuNodeType) String() string
func (*TuNodeType) UnmarshalJSON ¶
func (x *TuNodeType) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.