Reflection/Get source: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 595:
{{libheader|Wren-pattern}}
Wren doesn't have reflection as such but the command line version (Wren CLI) does have an easy way to obtain a script's own source code which can then be searched for where an object is defined
<syntaxhighlight lang="
import "io" for File
import "/.pattern" for Pattern
var getSourceLines = Fn.new {
Line 629:
{{out}}
<pre>
File name :
Function name : getSourceLines
Line number : 5
|