aboutsummaryrefslogtreecommitdiff
path: root/example/test.py
blob: 20c1c7ef1d76c4c10cdedab788bdfb78285d9b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3

# This module is called @{name()}

import @{module}

print("@{function()
  return "Hello World"
end}")

print("@{function()
  local a = { "asdf", "1234" }
  return a[1]
end}")

print(@{function()
  local a = { "asdf", "1234" } -- {
  return a[2]
end})

print("@{function()
  local a = "asdf{asdf"
  return a:sub(1)
end}")

print("@{function()
  local a = "asdf"
  --[[
      some comment }
  --]]
  return a
end}")

print("@{function()
  local a = [[
      some comment }
  ]]
  return a:sub(2, 8)
end}")