mirror of
https://github.com/peklaiho/madlisp.git
synced 2024-11-26 07:04:27 +00:00
remove ability to call env with argument
This commit is contained in:
parent
dc6c206f4e
commit
487a4fa345
@ -206,15 +206,11 @@ class Evaller
|
|||||||
$ast = $astData[$astLength - 1];
|
$ast = $astData[$astLength - 1];
|
||||||
continue; // tco
|
continue; // tco
|
||||||
} elseif ($symbolName == 'env') {
|
} elseif ($symbolName == 'env') {
|
||||||
if ($astLength >= 2) {
|
if ($astLength != 1) {
|
||||||
if (!($astData[1] instanceof Symbol)) {
|
throw new MadLispException("env does not take arguments");
|
||||||
throw new MadLispException("first argument to env is not symbol");
|
|
||||||
}
|
|
||||||
|
|
||||||
return $env->get($astData[1]->getName());
|
|
||||||
} else {
|
|
||||||
return $env;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $env;
|
||||||
} elseif ($symbolName == 'eval') {
|
} elseif ($symbolName == 'eval') {
|
||||||
if ($astLength == 1) {
|
if ($astLength == 1) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user