Fix bugs, add propper tests
This commit is contained in:
66
old_tests/parser/structs.exp
Normal file
66
old_tests/parser/structs.exp
Normal file
@@ -0,0 +1,66 @@
|
||||
Program {
|
||||
ast: Block(
|
||||
[
|
||||
Statement(
|
||||
LocBox {
|
||||
inner: Struct(
|
||||
Struct {
|
||||
name: Ident(
|
||||
"foo_t",
|
||||
),
|
||||
fields: [],
|
||||
},
|
||||
),
|
||||
loc: Loc {
|
||||
file: "parser/structs.mcl",
|
||||
line: 2,
|
||||
col: 7,
|
||||
},
|
||||
},
|
||||
),
|
||||
Statement(
|
||||
LocBox {
|
||||
inner: Struct(
|
||||
Struct {
|
||||
name: Ident(
|
||||
"bar_t",
|
||||
),
|
||||
fields: [
|
||||
(
|
||||
Ident(
|
||||
"a",
|
||||
),
|
||||
LocBox {
|
||||
inner: Ref {
|
||||
inner: Owned(
|
||||
Ident(
|
||||
"bar_t",
|
||||
),
|
||||
),
|
||||
mutable: false,
|
||||
},
|
||||
loc: Loc {
|
||||
file: "parser/structs.mcl",
|
||||
line: 5,
|
||||
col: 9,
|
||||
},
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
loc: Loc {
|
||||
file: "parser/structs.mcl",
|
||||
line: 4,
|
||||
col: 7,
|
||||
},
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
structs: {},
|
||||
enums: {},
|
||||
types: {},
|
||||
functions: {},
|
||||
member_functions: {},
|
||||
}
|
||||
Reference in New Issue
Block a user