mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-16 17:45:11 +01:00
flakes
This commit is contained in:
parent
db219d3d74
commit
3a282ffb89
15 changed files with 159 additions and 83 deletions
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
39
flake.nix
Normal file
39
flake.nix
Normal file
|
|
@ -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/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -32,7 +32,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -31,13 +31,13 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
(
|
(
|
||||||
If {
|
If {
|
||||||
cond: (Atom(Int(1)), 22..23),
|
cond: (Atom(Int(1)), 22..23),
|
||||||
then: [(Expr(Atom(String("a"))), 35..37)],
|
then: [(Expr(Atom(String([97]))), 35..37)],
|
||||||
otherwise: Some([
|
otherwise: Some([
|
||||||
(
|
(
|
||||||
If {
|
If {
|
||||||
cond: (Atom(Int(2)), 55..56),
|
cond: (Atom(Int(2)), 55..56),
|
||||||
then: [(Expr(Atom(String("b"))), 68..70)],
|
then: [(Expr(Atom(String([98]))), 68..70)],
|
||||||
otherwise: Some([(Expr(Atom(String("c"))), 94..96)]),
|
otherwise: Some([(Expr(Atom(String([99]))), 94..96)]),
|
||||||
},
|
},
|
||||||
51..70,
|
51..70,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -21,7 +21,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionParamDecl {
|
FunctionParamDecl {
|
||||||
decl_spec: (
|
decl_spec: (
|
||||||
DeclSpec {
|
DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Long }),
|
ty: Integer(IntTy(Signed, Long)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
9..13,
|
9..13,
|
||||||
|
|
@ -37,7 +37,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionParamDecl {
|
FunctionParamDecl {
|
||||||
decl_spec: (
|
decl_spec: (
|
||||||
DeclSpec {
|
DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
19..22,
|
19..22,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "EXTERN | THREAD_LOCAL",
|
attrs: "EXTERN | THREAD_LOCAL",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -38,7 +38,27 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
),
|
),
|
||||||
18..23,
|
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,
|
1..46,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -64,7 +64,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -32,7 +32,28 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Expr(
|
Expr(
|
||||||
Postfix(ExprPostfix {
|
Postfix(ExprPostfix {
|
||||||
lhs: (Atom(Ident((puts, 18..22))), 18..22),
|
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,
|
22..39,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -31,8 +31,8 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
(
|
(
|
||||||
If {
|
If {
|
||||||
cond: (Atom(Int(1)), 22..23),
|
cond: (Atom(Int(1)), 22..23),
|
||||||
then: [(Expr(Atom(String("a"))), 35..37)],
|
then: [(Expr(Atom(String([97]))), 35..37)],
|
||||||
otherwise: Some([(Expr(Atom(String("b"))), 61..63)]),
|
otherwise: Some([(Expr(Atom(String([98]))), 61..63)]),
|
||||||
},
|
},
|
||||||
18..37,
|
18..37,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -31,8 +31,8 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
(
|
(
|
||||||
If {
|
If {
|
||||||
cond: (Atom(Int(1)), 22..23),
|
cond: (Atom(Int(1)), 22..23),
|
||||||
then: [(Expr(Atom(String("a"))), 33..35)],
|
then: [(Expr(Atom(String([97]))), 33..35)],
|
||||||
otherwise: Some([(Expr(Atom(String("b"))), 55..57)]),
|
otherwise: Some([(Expr(Atom(String([98]))), 55..57)]),
|
||||||
},
|
},
|
||||||
18..35,
|
18..35,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: SChar,
|
ty: Integer(IntTy(Signed, Char)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -54,7 +54,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: UChar,
|
ty: Integer(IntTy(Unsigned, Char)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -77,7 +77,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Short }),
|
ty: Integer(IntTy(Signed, Short)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -100,7 +100,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Short }),
|
ty: Integer(IntTy(Signed, Short)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -123,7 +123,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Short }),
|
ty: Integer(IntTy(Signed, Short)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -146,7 +146,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Short }),
|
ty: Integer(IntTy(Signed, Short)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -169,10 +169,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Unsigned, Short)),
|
||||||
sign: Unsigned,
|
|
||||||
kind: Short,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -195,10 +192,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Unsigned, Short)),
|
||||||
sign: Unsigned,
|
|
||||||
kind: Short,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -221,7 +215,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -244,7 +238,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -267,7 +261,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -290,7 +284,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Unsigned, kind: Int }),
|
ty: Integer(IntTy(Unsigned, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -313,7 +307,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Unsigned, kind: Int }),
|
ty: Integer(IntTy(Unsigned, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -336,7 +330,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Long }),
|
ty: Integer(IntTy(Signed, Long)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -359,7 +353,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Long }),
|
ty: Integer(IntTy(Signed, Long)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -382,7 +376,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Long }),
|
ty: Integer(IntTy(Signed, Long)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -405,7 +399,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Long }),
|
ty: Integer(IntTy(Signed, Long)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -428,10 +422,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Unsigned, Long)),
|
||||||
sign: Unsigned,
|
|
||||||
kind: Long,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -454,10 +445,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Unsigned, Long)),
|
||||||
sign: Unsigned,
|
|
||||||
kind: Long,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -480,10 +468,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Signed, LongLong)),
|
||||||
sign: Signed,
|
|
||||||
kind: LongLong,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -506,10 +491,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Signed, LongLong)),
|
||||||
sign: Signed,
|
|
||||||
kind: LongLong,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -532,10 +514,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Signed, LongLong)),
|
||||||
sign: Signed,
|
|
||||||
kind: LongLong,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -558,10 +537,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Signed, LongLong)),
|
||||||
sign: Signed,
|
|
||||||
kind: LongLong,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -584,10 +560,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Unsigned, LongLong)),
|
||||||
sign: Unsigned,
|
|
||||||
kind: LongLong,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -610,10 +583,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy {
|
ty: Integer(IntTy(Unsigned, LongLong)),
|
||||||
sign: Unsigned,
|
|
||||||
kind: LongLong,
|
|
||||||
}),
|
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -633,5 +603,5 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
771..795,
|
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",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
FunctionDef(FunctionDef {
|
FunctionDef(FunctionDef {
|
||||||
decl: Normal(NormalDecl {
|
decl: Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -38,7 +38,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
@ -75,7 +75,7 @@ expression: "(parsed_pretty, pretty_printed_source)"
|
||||||
Decl(
|
Decl(
|
||||||
Normal(NormalDecl {
|
Normal(NormalDecl {
|
||||||
decl_spec: DeclSpec {
|
decl_spec: DeclSpec {
|
||||||
ty: Integer(IntTy { sign: Signed, kind: Int }),
|
ty: Integer(IntTy(Signed, Int)),
|
||||||
attrs: "(empty)",
|
attrs: "(empty)",
|
||||||
},
|
},
|
||||||
init_declarators: [
|
init_declarators: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue