Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------------------
- CODE:
- -----------------------------------------------------
- static var globall : int32 = 1;
- class data1
- {
- var name : string;
- var value : int32;
- func both(){ return name $ value; }
- }
- func _test() : int32
- {
- return 0;
- }
- -----------------------------------------------------
- COMPILE UNIT (TODO) AST:
- -----------------------------------------------------
- VAR (struct=2 op=54 opsub=0)
- {
- name = 'globall'
- orig_datatype = 'int32'
- datatype = ''
- orig_typeinfo:
- IDENT (struct=12 op=1 opsub=0)
- name = 'int32'
- typeinfo: <null>
- value:
- int(1) (struct=0 op=3 opsub=0)
- }
- FUNC (struct=6 op=30 opsub=0)
- {
- name = 'data1.both'
- orig_datatype = ''
- datatype = ''
- orig_typeinfo: <null>
- typeinfo: <null>
- params: <null>
- code:
- BLOCK (struct=4 op=21 opsub=0)
- {
- locals: <null>
- code:
- RETURN (struct=7 op=18 opsub=0)
- {
- arg:
- $ (struct=7 op=4 opsub=0)
- {
- arg:
- {
- IDENT (struct=12 op=1 opsub=0)
- name = 'name'
- IDENT (struct=12 op=1 opsub=0)
- name = 'value'
- }
- }
- }
- }
- }
- CLASS (struct=5 op=52 opsub=0)
- {
- name = 'data1'
- items:
- {
- MEMBER (struct=2 op=55 opsub=0)
- {
- name = 'name'
- orig_datatype = 'string'
- datatype = ''
- orig_typeinfo:
- IDENT (struct=12 op=1 opsub=0)
- name = 'string'
- typeinfo: <null>
- value: <null>
- }
- MEMBER (struct=2 op=55 opsub=0)
- {
- name = 'value'
- orig_datatype = 'int32'
- datatype = ''
- orig_typeinfo:
- IDENT (struct=12 op=1 opsub=0)
- name = 'int32'
- typeinfo: <null>
- value: <null>
- }
- }
- }
- FUNC (struct=6 op=30 opsub=0)
- {
- name = '_test'
- orig_datatype = 'int32'
- datatype = ''
- orig_typeinfo:
- IDENT (struct=12 op=1 opsub=0)
- name = 'int32'
- typeinfo: <null>
- params: <null>
- code:
- BLOCK (struct=4 op=21 opsub=0)
- {
- locals: <null>
- code:
- RETURN (struct=7 op=18 opsub=0)
- {
- arg:
- int(0) (struct=0 op=3 opsub=0)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement