pocketlang/tests/lang/imports/globals.pk
Thakee Nathees 168f365cde import statements are refactored.
- all import statement (native or script file) have the same syntax
- allow relative (including parent directory) imports
- cyclic imports are handled by caching the scripts
- `import foo` can potentially import `<searchpath>/foo/_init.pk`
- * import are not supported anymore
2022-05-06 11:16:48 +05:30

14 lines
173 B
Plaintext

def one_call()
assert(g_2 == null) ## second import cannot run this.
return get_a_value()
end
def get_a_value()
return "foobar"
end
g_1 = 1 + 2
g_2 = one_call()