If you run an import, you only include everything that's part of a scope. This includes, variables, classes, and functions. Anything else should cause a compile error. This cleans up the error by adding a String() method to each Stmt in our AST.
8 lines
135 B
Plaintext
8 lines
135 B
Plaintext
import "fmt"
|
|
import "something.mcl"
|
|
|
|
include something.someclass
|
|
print "p1" {
|
|
msg => fmt.printf("someint: %d", $something.someint),
|
|
}
|