summaryrefslogtreecommitdiff
path: root/Compiler/CType.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
commit18868128e18d38b706e7df14e8e683e1a9739c17 (patch)
tree6f0e0e5eee646f10cbad9c0c89c24d330bc58cc6 /Compiler/CType.cs
parentd87ab8af4c86a3fc6ee237444e372d87e536e3ef (diff)
chore: Initial commit
Diffstat (limited to 'Compiler/CType.cs')
-rw-r--r--Compiler/CType.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/Compiler/CType.cs b/Compiler/CType.cs
deleted file mode 100644
index 61b5108..0000000
--- a/Compiler/CType.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-namespace Q1.Compiler.visitors;
-
-public class CType
-{
- public string Name;
- public int Size;
-
- public CType(string name, int size)
- {
- this.Name = name;
- this.Size = size;
-
- if (size > 2)
- throw new CompilerException("Types that take up more than 2 bytes are not supported");
- }
-
- public override string ToString() => this.Name;
-
- public static readonly CType Int = new("int", 2);
- public static readonly CType Char = new("char", 1);
-}
-
-public class CTypePtr : CType
-{
- public CType Sub;
-
- public CTypePtr(CType sub) : base($"{sub.Name}*",2)
- {
- this.Sub = sub;
- }
-} \ No newline at end of file