source: main.cfa @ 9a83ccd

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since 9a83ccd was 9a83ccd, checked in by Dmitry Kobets <dkobets@…>, 2 years ago

Add sout override for vec2

  • Property mode set to 100644
File size: 662 bytes
Line 
1/* #include <iostream.hfa> */
2#include <fstream.hfa>
3#include "libcfa/src/vector.hfa"
4
5/* [float, float] tuple(const vec2& v) { */
6/*     return [v.x, v.y]; */
7/* } */
8
9
10
11
12
13int main() {
14    vec2 v1 = {1,2};
15    sout | true;
16    sout | v1;
17    sout | "wot";
18    sout | ((vec2){1,2} - (vec2){3,2});
19    sout | "a" | "b";
20    /* sout | nlOff; */
21    /* sout | sepOff; */
22    /* sout | nlOff; */
23    /* #<{(| sout | nlOff; |)}># */
24    /*  */
25    /* vec2 v1 = {1,2}; */
26    /* sout | "w" | 2.2 | "at" | v1; */
27    /* sout | length(v1); */
28    /*  */
29    /* vec2 v2 = {1,1}; */
30    /* sout | dot(v1, v2); */
31    /*  */
32    /* sout | (v2 - v1) | " " | (v1 - v2); */
33}
Note: See TracBrowser for help on using the repository browser.