mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-10 13:48:40 +01:00
There's a lot of changes here and surely some rough edges to iron out. Also, I need to update the docs. But I want to get closer to landing this so I can build on it.
18 lines
529 B
Plaintext
18 lines
529 B
Plaintext
import "meta" for Meta
|
|
|
|
var variables = Meta.getModuleVariables("./test/meta/get_module_variables")
|
|
|
|
// Includes implicitly imported core stuff.
|
|
System.print(variables.contains("Object")) // expect: true
|
|
System.print(variables.contains("Bool")) // expect: true
|
|
|
|
// Includes top level variables.
|
|
System.print(variables.contains("variables")) // expect: true
|
|
|
|
// Even ones declared later.
|
|
System.print(variables.contains("later")) // expect: true
|
|
|
|
var later = "values"
|
|
|
|
System.print(variables.contains("unknown")) // expect: false
|