-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Record Declaration Node for struct and union
- Loading branch information
Showing
15 changed files
with
191 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
int main() { | ||
struct ss; | ||
|
||
struct birth { | ||
int date; | ||
int month; | ||
int year; | ||
}; | ||
|
||
struct { | ||
int quarter; | ||
int dime; | ||
int penny; | ||
}; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ProgramNode <1:1> | ||
FuncDefNode <1:5> main: int () | ||
CompoundStmtNode <1:12> | ||
RecordDeclNode <2:10> struct ss definition | ||
RecordDeclNode <4:10> struct birth definition | ||
FieldNode <5:9> date: int | ||
FieldNode <6:9> month: int | ||
FieldNode <7:9> year: int | ||
RecordDeclNode <10:9> struct definition | ||
FieldNode <11:9> quarter: int | ||
FieldNode <12:9> dime: int | ||
FieldNode <13:9> penny: int | ||
ReturnStmtNode <16:3> | ||
IntConstExprNode <16:10> 0: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
int main() { | ||
union u; | ||
|
||
union shape { | ||
int square; | ||
int circle; | ||
int triangle; | ||
}; | ||
|
||
union { | ||
int a; | ||
int b; | ||
int c; | ||
int d; | ||
int e; | ||
}; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ProgramNode <1:1> | ||
FuncDefNode <1:5> main: int () | ||
CompoundStmtNode <1:12> | ||
RecordDeclNode <2:9> union u definition | ||
RecordDeclNode <4:9> union shape definition | ||
FieldNode <5:9> square: int | ||
FieldNode <6:9> circle: int | ||
FieldNode <7:9> triangle: int | ||
RecordDeclNode <10:8> union definition | ||
FieldNode <11:9> a: int | ||
FieldNode <12:9> b: int | ||
FieldNode <13:9> c: int | ||
FieldNode <14:9> d: int | ||
FieldNode <15:9> e: int | ||
ReturnStmtNode <18:3> | ||
IntConstExprNode <18:10> 0: int |