SHOW:
|
|
- or go back to the newest paste.
| 1 | module test2; | |
| 2 | ||
| 3 | class A | |
| 4 | {
| |
| 5 | public | |
| 6 | {
| |
| 7 | void foo(); | |
| 8 | int bar(); | |
| 9 | } | |
| 10 | } | |
| 11 | ||
| 12 | extern(C) | |
| 13 | {
| |
| 14 | void baz(); | |
| 15 | } | |
| 16 | ||
| 17 | // ast tree | |
| 18 | module | |
| 19 | module declaration | |
| 20 | name: test2, packages: | |
| 21 | class declaration | |
| 22 | name: A | |
| 23 | members: | |
| 24 | protection attribute declaration | |
| 25 | protection: Public | |
| 26 | function declaration | |
| 27 | name: foo | |
| 28 | return type: IdentTypeNode | |
| 29 | parameters: | |
| 30 | empty statement | |
| 31 | function declaration | |
| 32 | name: bar | |
| 33 | return type: IdentTypeNode | |
| 34 | parameters: | |
| 35 | empty statement | |
| 36 | linkage attribute declaration | |
| 37 | linkage: C | |
| 38 | function declaration | |
| 39 | name: baz | |
| 40 | return type: IdentTypeNode | |
| 41 | parameters: | |
| 42 | empty statement | |
| 43 | ||
| 44 | // sema tree | |
| 45 | Module test2 | |
| 46 | {
| |
| 47 | Import amber; | |
| 48 | Import Core; | |
| 49 | Class test2.A : amber.Core.Object | |
| 50 | {
| |
| 51 | Function test2.A.foo : void function() | |
| 52 | {
| |
| 53 | vtblIndex: 0 | |
| 54 | } | |
| 55 | Function test2.A.bar : int32 function() | |
| 56 | {
| |
| 57 | vtblIndex: 1 | |
| 58 | } | |
| 59 | } | |
| 60 | Function test2.baz : extern(C) void function() | |
| 61 | {
| |
| 62 | } | |
| 63 | } |