From 3a282ffb89f567d182ad7f66dc0bde33ac3676a8 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 27 May 2023 17:46:52 +0200 Subject: [PATCH] flakes --- flake.lock | 26 ++++++ flake.nix | 39 +++++++++ .../parser__parser__tests__decl_stmts.snap | 4 +- .../parser__parser__tests__else_if.snap | 8 +- ...er__tests__empty_function_with_params.snap | 6 +- ...y_funky_attributes_no_params_function.snap | 2 +- .../parser__parser__tests__expr_stmt.snap | 24 +++++- ...__tests__global_variable_declarations.snap | 4 +- .../parser__parser__tests__hello_world.snap | 25 +++++- .../parser__parser__tests__if_else.snap | 6 +- ...ser__parser__tests__if_else_braceless.snap | 6 +- .../parser__parser__tests__integer_types.snap | 82 ++++++------------- .../parser__parser__tests__return_empty.snap | 2 +- .../parser__parser__tests__return_expr.snap | 2 +- ...ser__parser__tests__small_expressions.snap | 6 +- 15 files changed, 159 insertions(+), 83 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f121b62 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1685199731, + "narHash": "sha256-t8I2oEFetISWpY4NUydCNcDJLSBGGyMCeozzVborlZA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3580ac6c65ec97ebccb02c166af8d19045d4d291", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6bfa4f5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "the uwucc c compiler"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; # also valid: "nixpkgs" + }; + + outputs = { self, nixpkgs }: + let + allSystems = [ + "x86_64-linux" # 64-bit Intel/AMD Linux + "aarch64-linux" # 64-bit ARM Linux + "x86_64-darwin" # 64-bit Intel macOS + "aarch64-darwin" # 64-bit ARM macOS + ]; + + # Helper to provide system-specific attributes + forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forAllSystems ({ pkgs }: { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + clang + llvmPackages_16.bintools + rustup + cargo-insta + ]; + + shellHook = '' + export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin + export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/ + ''; + }; + }); + }; +} diff --git a/parser/src/parser/snapshots/parser__parser__tests__decl_stmts.snap b/parser/src/parser/snapshots/parser__parser__tests__decl_stmts.snap index 5bf356c..7b2990a 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__decl_stmts.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__decl_stmts.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -32,7 +32,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ diff --git a/parser/src/parser/snapshots/parser__parser__tests__else_if.snap b/parser/src/parser/snapshots/parser__parser__tests__else_if.snap index d7fb6ce..a1c283f 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__else_if.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__else_if.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -31,13 +31,13 @@ expression: "(parsed_pretty, pretty_printed_source)" ( If { cond: (Atom(Int(1)), 22..23), - then: [(Expr(Atom(String("a"))), 35..37)], + then: [(Expr(Atom(String([97]))), 35..37)], otherwise: Some([ ( If { cond: (Atom(Int(2)), 55..56), - then: [(Expr(Atom(String("b"))), 68..70)], - otherwise: Some([(Expr(Atom(String("c"))), 94..96)]), + then: [(Expr(Atom(String([98]))), 68..70)], + otherwise: Some([(Expr(Atom(String([99]))), 94..96)]), }, 51..70, ), diff --git a/parser/src/parser/snapshots/parser__parser__tests__empty_function_with_params.snap b/parser/src/parser/snapshots/parser__parser__tests__empty_function_with_params.snap index 09c8383..d8f868f 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__empty_function_with_params.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__empty_function_with_params.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -21,7 +21,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionParamDecl { decl_spec: ( DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Long }), + ty: Integer(IntTy(Signed, Long)), attrs: "(empty)", }, 9..13, @@ -37,7 +37,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionParamDecl { decl_spec: ( DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, 19..22, diff --git a/parser/src/parser/snapshots/parser__parser__tests__empty_funky_attributes_no_params_function.snap b/parser/src/parser/snapshots/parser__parser__tests__empty_funky_attributes_no_params_function.snap index be87621..cd4aed1 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__empty_funky_attributes_no_params_function.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__empty_funky_attributes_no_params_function.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "EXTERN | THREAD_LOCAL", }, init_declarators: [ diff --git a/parser/src/parser/snapshots/parser__parser__tests__expr_stmt.snap b/parser/src/parser/snapshots/parser__parser__tests__expr_stmt.snap index ea85c82..7de0448 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__expr_stmt.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__expr_stmt.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -38,7 +38,27 @@ expression: "(parsed_pretty, pretty_printed_source)" ), 18..23, ), - (Expr(Atom(String("hello world!"))), 29..42), + ( + Expr( + Atom( + String([ + 104, + 101, + 108, + 108, + 111, + 32, + 119, + 111, + 114, + 108, + 100, + 33, + ]), + ), + ), + 29..42, + ), ], }), 1..46, diff --git a/parser/src/parser/snapshots/parser__parser__tests__global_variable_declarations.snap b/parser/src/parser/snapshots/parser__parser__tests__global_variable_declarations.snap index 616bb0e..1a14539 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__global_variable_declarations.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__global_variable_declarations.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -64,7 +64,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ diff --git a/parser/src/parser/snapshots/parser__parser__tests__hello_world.snap b/parser/src/parser/snapshots/parser__parser__tests__hello_world.snap index 845e17d..51ec7d1 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__hello_world.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__hello_world.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -32,7 +32,28 @@ expression: "(parsed_pretty, pretty_printed_source)" Expr( Postfix(ExprPostfix { lhs: (Atom(Ident((puts, 18..22))), 18..22), - op: Call([(Atom(String("Hello, world!")), 23..37)]), + op: Call([ + ( + Atom( + String([ + 72, + 101, + 108, + 108, + 111, + 44, + 32, + 119, + 111, + 114, + 108, + 100, + 33, + ]), + ), + 23..37, + ), + ]), }), ), 22..39, diff --git a/parser/src/parser/snapshots/parser__parser__tests__if_else.snap b/parser/src/parser/snapshots/parser__parser__tests__if_else.snap index a3875a3..ec978c3 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__if_else.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__if_else.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -31,8 +31,8 @@ expression: "(parsed_pretty, pretty_printed_source)" ( If { cond: (Atom(Int(1)), 22..23), - then: [(Expr(Atom(String("a"))), 35..37)], - otherwise: Some([(Expr(Atom(String("b"))), 61..63)]), + then: [(Expr(Atom(String([97]))), 35..37)], + otherwise: Some([(Expr(Atom(String([98]))), 61..63)]), }, 18..37, ), diff --git a/parser/src/parser/snapshots/parser__parser__tests__if_else_braceless.snap b/parser/src/parser/snapshots/parser__parser__tests__if_else_braceless.snap index 63af65c..daa5d4b 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__if_else_braceless.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__if_else_braceless.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -31,8 +31,8 @@ expression: "(parsed_pretty, pretty_printed_source)" ( If { cond: (Atom(Int(1)), 22..23), - then: [(Expr(Atom(String("a"))), 33..35)], - otherwise: Some([(Expr(Atom(String("b"))), 55..57)]), + then: [(Expr(Atom(String([97]))), 33..35)], + otherwise: Some([(Expr(Atom(String([98]))), 55..57)]), }, 18..35, ), diff --git a/parser/src/parser/snapshots/parser__parser__tests__integer_types.snap b/parser/src/parser/snapshots/parser__parser__tests__integer_types.snap index b94edc3..381f5c4 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__integer_types.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__integer_types.snap @@ -31,7 +31,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: SChar, + ty: Integer(IntTy(Signed, Char)), attrs: "(empty)", }, init_declarators: [ @@ -54,7 +54,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: UChar, + ty: Integer(IntTy(Unsigned, Char)), attrs: "(empty)", }, init_declarators: [ @@ -77,7 +77,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Short }), + ty: Integer(IntTy(Signed, Short)), attrs: "(empty)", }, init_declarators: [ @@ -100,7 +100,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Short }), + ty: Integer(IntTy(Signed, Short)), attrs: "(empty)", }, init_declarators: [ @@ -123,7 +123,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Short }), + ty: Integer(IntTy(Signed, Short)), attrs: "(empty)", }, init_declarators: [ @@ -146,7 +146,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Short }), + ty: Integer(IntTy(Signed, Short)), attrs: "(empty)", }, init_declarators: [ @@ -169,10 +169,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Unsigned, - kind: Short, - }), + ty: Integer(IntTy(Unsigned, Short)), attrs: "(empty)", }, init_declarators: [ @@ -195,10 +192,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Unsigned, - kind: Short, - }), + ty: Integer(IntTy(Unsigned, Short)), attrs: "(empty)", }, init_declarators: [ @@ -221,7 +215,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -244,7 +238,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -267,7 +261,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -290,7 +284,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Unsigned, kind: Int }), + ty: Integer(IntTy(Unsigned, Int)), attrs: "(empty)", }, init_declarators: [ @@ -313,7 +307,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Unsigned, kind: Int }), + ty: Integer(IntTy(Unsigned, Int)), attrs: "(empty)", }, init_declarators: [ @@ -336,7 +330,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Long }), + ty: Integer(IntTy(Signed, Long)), attrs: "(empty)", }, init_declarators: [ @@ -359,7 +353,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Long }), + ty: Integer(IntTy(Signed, Long)), attrs: "(empty)", }, init_declarators: [ @@ -382,7 +376,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Long }), + ty: Integer(IntTy(Signed, Long)), attrs: "(empty)", }, init_declarators: [ @@ -405,7 +399,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Long }), + ty: Integer(IntTy(Signed, Long)), attrs: "(empty)", }, init_declarators: [ @@ -428,10 +422,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Unsigned, - kind: Long, - }), + ty: Integer(IntTy(Unsigned, Long)), attrs: "(empty)", }, init_declarators: [ @@ -454,10 +445,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Unsigned, - kind: Long, - }), + ty: Integer(IntTy(Unsigned, Long)), attrs: "(empty)", }, init_declarators: [ @@ -480,10 +468,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Signed, - kind: LongLong, - }), + ty: Integer(IntTy(Signed, LongLong)), attrs: "(empty)", }, init_declarators: [ @@ -506,10 +491,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Signed, - kind: LongLong, - }), + ty: Integer(IntTy(Signed, LongLong)), attrs: "(empty)", }, init_declarators: [ @@ -532,10 +514,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Signed, - kind: LongLong, - }), + ty: Integer(IntTy(Signed, LongLong)), attrs: "(empty)", }, init_declarators: [ @@ -558,10 +537,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Signed, - kind: LongLong, - }), + ty: Integer(IntTy(Signed, LongLong)), attrs: "(empty)", }, init_declarators: [ @@ -584,10 +560,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Unsigned, - kind: LongLong, - }), + ty: Integer(IntTy(Unsigned, LongLong)), attrs: "(empty)", }, init_declarators: [ @@ -610,10 +583,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { - sign: Unsigned, - kind: LongLong, - }), + ty: Integer(IntTy(Unsigned, LongLong)), attrs: "(empty)", }, init_declarators: [ @@ -633,5 +603,5 @@ expression: "(parsed_pretty, pretty_printed_source)" 771..795, ), ]), - "char a = 1;\nsigned char b = 2;\nunsigned char c = 3;\nshort d = 4;\nshort e = 6;\nshort f = 5;\nshort g = 7;\nunsigned short h = 8;\nunsigned short i = 9;\nint j = 10;\nint k = 11;\nint l = 12;\nunsigned int m = 13;\nunsigned int n = 14;\nlong o = 15;\nlong p = 16;\nlong q = 17;\nlong r = 18;\nunsigned long s = 19;\nunsigned long t = 20;\nlong long u = 21;\nlong long v = 22;\nlong long w = 23;\nlong long x = 24;\nunsigned long long y = 25;\nunsigned long long z = 26;\n", + "char a = 1;\nchar b = 2;\nunsigned char c = 3;\nshort d = 4;\nshort e = 6;\nshort f = 5;\nshort g = 7;\nunsigned short h = 8;\nunsigned short i = 9;\nint j = 10;\nint k = 11;\nint l = 12;\nunsigned int m = 13;\nunsigned int n = 14;\nlong o = 15;\nlong p = 16;\nlong q = 17;\nlong r = 18;\nunsigned long s = 19;\nunsigned long t = 20;\nlong long u = 21;\nlong long v = 22;\nlong long w = 23;\nlong long x = 24;\nunsigned long long y = 25;\nunsigned long long z = 26;\n", ) diff --git a/parser/src/parser/snapshots/parser__parser__tests__return_empty.snap b/parser/src/parser/snapshots/parser__parser__tests__return_empty.snap index 72990d2..8b0fced 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__return_empty.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__return_empty.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ diff --git a/parser/src/parser/snapshots/parser__parser__tests__return_expr.snap b/parser/src/parser/snapshots/parser__parser__tests__return_expr.snap index 0377550..87b20fc 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__return_expr.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__return_expr.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" FunctionDef(FunctionDef { decl: Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ diff --git a/parser/src/parser/snapshots/parser__parser__tests__small_expressions.snap b/parser/src/parser/snapshots/parser__parser__tests__small_expressions.snap index 9aeaf88..8c2e940 100644 --- a/parser/src/parser/snapshots/parser__parser__tests__small_expressions.snap +++ b/parser/src/parser/snapshots/parser__parser__tests__small_expressions.snap @@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -38,7 +38,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [ @@ -75,7 +75,7 @@ expression: "(parsed_pretty, pretty_printed_source)" Decl( Normal(NormalDecl { decl_spec: DeclSpec { - ty: Integer(IntTy { sign: Signed, kind: Int }), + ty: Integer(IntTy(Signed, Int)), attrs: "(empty)", }, init_declarators: [