diff options
author | thatch <devnull@localhost> | 2009-10-08 10:42:51 -0700 |
---|---|---|
committer | thatch <devnull@localhost> | 2009-10-08 10:42:51 -0700 |
commit | f9eb898e663822ca9dcfd82127c47fe170313735 (patch) | |
tree | a960ab45bd0e8155a37ed49825c65d7afb26d2f1 /tests/examplefiles/test.flx | |
parent | a7b486115dfc6156de426d2dc16f025c184d8cf0 (diff) | |
download | pygments-f9eb898e663822ca9dcfd82127c47fe170313735.tar.gz |
Integrate Felix lexer (#441)
Diffstat (limited to 'tests/examplefiles/test.flx')
-rw-r--r-- | tests/examplefiles/test.flx | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/examplefiles/test.flx b/tests/examplefiles/test.flx new file mode 100644 index 00000000..4c8a667b --- /dev/null +++ b/tests/examplefiles/test.flx @@ -0,0 +1,57 @@ +type tiny = "%i8"; +type int = "%i32"; +typedef bool = 2; +fun add : int*int -> int = "%add"; +fun sub : int*int -> int = "%sub"; +fun eq : int*int -> bool = "%eq"; +fun lnot : bool -> bool = "%lnot"; +proc exit : int = "exit"; + +// comment 1 +/* + /* + foo bar + */ +asdas +*/ + +noinline fun foo (x:int) = { + val y = 6; + return x + y; +} + +noinline proc fake_exit (x:int) { + exit x; + return; +} + +noinline fun bar (x:int) = { + var y = 10; + noinline proc baz () { + y = 20; + return; + } + baz (); + return x + y; +} + +noinline fun x (a:int, b:int, c:tiny) = { + val x1 = a; + val x2 = b; + val x3 = c; + noinline fun y (d:int, e:int, f:tiny) = { + val y1 = x1; + val y2 = x2; + val y3 = f; + noinline fun z (g:int, h:int, i:tiny) = { + val z1 = x1; + val z2 = x2; + val z3 = i; + return z1; + } + return z (y1,y2,y3); + } + return y (x1,x2,x3); +} + +fake_exit $ (foo 2) + (bar 3) + (x (1,2,3t)); |