aboutsummaryrefslogtreecommitdiff
path: root/res/test_sample_ok.tpc
diff options
context:
space:
mode:
authorpacien2018-06-06 14:14:55 +0200
committerpacien2018-06-06 14:14:55 +0200
commit01406ad25ff49d5c5f722f34187d2063cefea5ed (patch)
tree4d96a701aa1986abe79f2469ffd641c4123749bb /res/test_sample_ok.tpc
parent64d73526bf9d39ad9d3f04509f6656abde2240fd (diff)
downloadtpc-compiler-01406ad25ff49d5c5f722f34187d2063cefea5ed.tar.gz
require main func and rename tests
Diffstat (limited to 'res/test_sample_ok.tpc')
-rw-r--r--res/test_sample_ok.tpc22
1 files changed, 22 insertions, 0 deletions
diff --git a/res/test_sample_ok.tpc b/res/test_sample_ok.tpc
new file mode 100644
index 0000000..c8d3d9d
--- /dev/null
+++ b/res/test_sample_ok.tpc
@@ -0,0 +1,22 @@
1/**
2 * UPEM / Compilation / Projet TPC
3 * Exemple de fichier source TPC valide
4 * Pacien TRAN-GIRARD, Adam NAILI
5 */
6
7const special = 'b';
8
9entier funky_func(entier arg) {
10 return !arg;
11}
12
13void main(void) {
14 entier ret;
15 ret = 1 + funky_func(0) * 2;
16
17 while (1) {
18 reade(ret);
19 print(ret);
20 }
21}
22