Phase 10.7/10.5c: include cycle detection (VM/Interpreter), minimal pyc IR→Nyash, String unification bridge (VM partial), add core plugins: RegexBox/EncodingBox/TOMLBox/PathBox + examples; wire nyash.toml; begin String interop for internal vs plugin boxes; update CURRENT_TASK.md
This commit is contained in:
@ -2,15 +2,15 @@
|
||||
static box PythonParserNy {
|
||||
parse(code) {
|
||||
local src
|
||||
if (code == null || code.toString() == "") {
|
||||
if (code == null || code.length() == 0) {
|
||||
// Fallback: read from env via Python os.getenv
|
||||
local os, getenv
|
||||
local py = new PyRuntimeBox()
|
||||
os = py.import("os")
|
||||
getenv = os.getattr("getenv")
|
||||
src = getenv.call("NYASH_PY_CODE").toString()
|
||||
src = getenv.call("NYASH_PY_CODE").str()
|
||||
} else {
|
||||
src = code.toString()
|
||||
src = code.str()
|
||||
}
|
||||
|
||||
// ast.dump(ast.parse(src))
|
||||
|
||||
Reference in New Issue
Block a user