Skip to content

Commit 2bfb6ef

Browse files
author
robertDurst
committed
still errors in transpiler, however it is now moved to its own class
1 parent 799a06e commit 2bfb6ef

File tree

7 files changed

+674
-253
lines changed

7 files changed

+674
-253
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set(CMAKE_CXX_STANDARD 17)
77
ADD_LIBRARY(SailfishcLibs
88
./src/lexar/Lexar.cpp
99
./src/lexar/Token.cpp
10+
./src/transpiler/transpiler.cpp
1011
./src/sailfish/sailfishc.cpp
1112
./src/errorhandler/ParserErrorHandler.cpp
1213
./src/errorhandler/SemanticAnalyzerErrorHandler.cpp

examples/test.fish

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import Foo : "../examples/Foo.fish"
22

33
start {
4-
dec int i = 10
5-
dec Foo f = new Foo {i: 10, s: empty}
6-
dec Foo b = new Foo {i: 11, s: f}
4+
dec int i = 8
5+
dec Foo f = new Foo {i: 1, s: empty}
6+
dec Foo a = new Foo {i: 2, s: f}
7+
dec Foo b = new Foo {i: 3, s: a}
8+
dec Foo c = new Foo {i: 4, s: b}
9+
dec Foo d = new Foo {i: 5, s: c}
710

8-
f.i = b.s.i
11+
f = b.s.s
12+
printInt(f...bar(f...bar(10)))
13+
printInt(b.s...bar(9))
14+
printInt(b.s...bar(i))
15+
#printInt(b.s...bar(d.s.i))
916
}

src/main/CommandLine.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ fullCompilation(const std::string& filename)
8686
<< filename << "\n"
8787
<< normal;
8888

89-
sfc->transpile();
90-
9189
std::cout << green << "Successfully wrote compiled code to: " << normal
9290
<< blue << " out.c\n"
9391
<< normal;

0 commit comments

Comments
 (0)