From 30f3c67e32c796aba68747701a44fcad8e0cb0b6 Mon Sep 17 00:00:00 2001 From: Kagura Date: Wed, 30 Oct 2024 13:16:08 +0800 Subject: [PATCH] fix --- src/main/CTests/test.c | 8 ++++++++ src/main/kotlin/core/SourceFile.kt | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/main/CTests/test.c b/src/main/CTests/test.c index 12dacf0..25d0302 100644 --- a/src/main/CTests/test.c +++ b/src/main/CTests/test.c @@ -1,10 +1,18 @@ int main(){ int a = 0,b=1; int k = add(a,b); + int j = munis(a,k); print(k) } int add(int a, int b){ int c = a+b; return c; +} + +short munis(int a,int b){ + int l = a; + int f = b; + int k = l - f; + return k; } \ No newline at end of file diff --git a/src/main/kotlin/core/SourceFile.kt b/src/main/kotlin/core/SourceFile.kt index a92138b..debc35b 100644 --- a/src/main/kotlin/core/SourceFile.kt +++ b/src/main/kotlin/core/SourceFile.kt @@ -60,6 +60,10 @@ class SourceFile { .toString() .replace(";;",";") .replace(";",";\n") + .replace("{","{\n") + .replace("}","}\n") + .replace(" =","=") + .replace("= ","=") } }