Advertisement
snake5

new lang wip compiler output log

Dec 30th, 2014
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. -----------------------------------------------------
  2. CODE:
  3. -----------------------------------------------------
  4.  
  5. static var globall : int32 = 1;
  6.  
  7. class data1
  8. {
  9. var name : string;
  10. var value : int32;
  11.  
  12. func both(){ return name $ value; }
  13. }
  14.  
  15. func _test() : int32
  16. {
  17. return 0;
  18. }
  19.  
  20.  
  21. -----------------------------------------------------
  22. COMPILE UNIT (TODO) AST:
  23. -----------------------------------------------------
  24.  
  25. VAR (struct=2 op=54 opsub=0)
  26. {
  27. name = 'globall'
  28. orig_datatype = 'int32'
  29. datatype = ''
  30. orig_typeinfo:
  31. IDENT (struct=12 op=1 opsub=0)
  32. name = 'int32'
  33. typeinfo: <null>
  34. value:
  35. int(1) (struct=0 op=3 opsub=0)
  36. }
  37. FUNC (struct=6 op=30 opsub=0)
  38. {
  39. name = 'data1.both'
  40. orig_datatype = ''
  41. datatype = ''
  42. orig_typeinfo: <null>
  43. typeinfo: <null>
  44. params: <null>
  45. code:
  46. BLOCK (struct=4 op=21 opsub=0)
  47. {
  48. locals: <null>
  49. code:
  50. RETURN (struct=7 op=18 opsub=0)
  51. {
  52. arg:
  53. $ (struct=7 op=4 opsub=0)
  54. {
  55. arg:
  56. {
  57. IDENT (struct=12 op=1 opsub=0)
  58. name = 'name'
  59. IDENT (struct=12 op=1 opsub=0)
  60. name = 'value'
  61. }
  62. }
  63. }
  64. }
  65. }
  66. CLASS (struct=5 op=52 opsub=0)
  67. {
  68. name = 'data1'
  69. items:
  70. {
  71. MEMBER (struct=2 op=55 opsub=0)
  72. {
  73. name = 'name'
  74. orig_datatype = 'string'
  75. datatype = ''
  76. orig_typeinfo:
  77. IDENT (struct=12 op=1 opsub=0)
  78. name = 'string'
  79. typeinfo: <null>
  80. value: <null>
  81. }
  82. MEMBER (struct=2 op=55 opsub=0)
  83. {
  84. name = 'value'
  85. orig_datatype = 'int32'
  86. datatype = ''
  87. orig_typeinfo:
  88. IDENT (struct=12 op=1 opsub=0)
  89. name = 'int32'
  90. typeinfo: <null>
  91. value: <null>
  92. }
  93. }
  94. }
  95. FUNC (struct=6 op=30 opsub=0)
  96. {
  97. name = '_test'
  98. orig_datatype = 'int32'
  99. datatype = ''
  100. orig_typeinfo:
  101. IDENT (struct=12 op=1 opsub=0)
  102. name = 'int32'
  103. typeinfo: <null>
  104. params: <null>
  105. code:
  106. BLOCK (struct=4 op=21 opsub=0)
  107. {
  108. locals: <null>
  109. code:
  110. RETURN (struct=7 op=18 opsub=0)
  111. {
  112. arg:
  113. int(0) (struct=0 op=3 opsub=0)
  114. }
  115. }
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement