mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
13
samples/Terra/point.t
Normal file
13
samples/Terra/point.t
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
terra bar(a : &int)
|
||||
@a = @a + 1
|
||||
end
|
||||
terra foo(a : int) : int
|
||||
var b : int
|
||||
b = a
|
||||
bar(&b)
|
||||
return b
|
||||
end
|
||||
|
||||
local test = require("test")
|
||||
test.eq(foo(4),5)
|
||||
Reference in New Issue
Block a user