mirror of
https://github.com/Noratrieb/ub.git
synced 2026-01-15 00:55:04 +01:00
something works at least
This commit is contained in:
parent
aa4da62e2c
commit
b1756c7c21
7 changed files with 234 additions and 64 deletions
48
parser/src/snapshots/parser__parser__tests__var_decl.snap
Normal file
48
parser/src/snapshots/parser__parser__tests__var_decl.snap
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
source: parser/src/parser.rs
|
||||
assertion_line: 319
|
||||
expression: r
|
||||
---
|
||||
(
|
||||
Some(
|
||||
File {
|
||||
name: "parser__parser__tests",
|
||||
items: [
|
||||
FnDecl(
|
||||
FnDecl {
|
||||
name: "foo",
|
||||
params: [],
|
||||
ret_ty: Some(
|
||||
Ty {
|
||||
span: 12..15,
|
||||
kind: U64,
|
||||
},
|
||||
),
|
||||
span: 0..2,
|
||||
body: [
|
||||
VarDecl(
|
||||
VarDecl {
|
||||
name: "hello",
|
||||
ty: Ty {
|
||||
span: 18..21,
|
||||
kind: U64,
|
||||
},
|
||||
rhs: Some(
|
||||
Literal(
|
||||
Integer(
|
||||
5,
|
||||
30..31,
|
||||
),
|
||||
),
|
||||
),
|
||||
span: 0..0,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
[],
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue