Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--eval from examples just gives out EVAL, not the value #14

Open
barracuda156 opened this issue Jan 26, 2023 · 0 comments
Open

--eval from examples just gives out EVAL, not the value #14

barracuda156 opened this issue Jan 26, 2023 · 0 comments

Comments

@barracuda156
Copy link

barracuda156 commented Jan 26, 2023

@Z-Shang Could you take a look?

macmini:LoLi-Lang-LoLi-9306a53 svacchanda$ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_loli/loli/work/LoLi-Lang-LoLi-9306a53/src/LoLi2/currentg --version
LoLi Interpreter: version Dev alpha 2

macmini:LoLi-Lang-LoLi-9306a53 svacchanda$ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_loli/loli/work/LoLi-Lang-LoLi-9306a53/src/LoLi2/currentg  --eval "(def foo (x) (.\ (y) (+ y x))) (def bar (foo 2)) (bar  3)"
EVAL

macmini:LoLi-Lang-LoLi-9306a53 svacchanda$ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_loli/loli/work/LoLi-Lang-LoLi-9306a53/src/LoLi2/currentg --eval "(+ 1 2)"
EVAL

There are two concerns with the build process:

  1. ulong is not defined anywhere; I had to add typedef unsigned long ulong;.
  2. There are numerous warnings about unused parameter env:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_loli/loli/work/compwrap/cc/opt/local/bin/gcc-mp-12 -arch ppc -std=gnu++11 -Wall -Og -Wextra -g -o currentg loli_obj.cpp loli_stack.cpp loli_reader.cpp loli_parser.cpp loli_util.cpp loli_env.cpp loli_eval.cpp loli_apply.cpp loli_repl.cpp loli_typeclass.cpp loli_main.cpp -lstdc++
In file included from loli_obj.cpp:23:
include/loli_obj.h: In member function 'virtual loliObj* loliObj::eval(loliObj*)':
include/loli_obj.h:70:40: warning: unused parameter 'env' [-Wunused-parameter]
   70 |         virtual loliObj* eval(loliObj* env){
      |                               ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliNum::eval(loliObj*)':
include/loli_obj.h:101:32: warning: unused parameter 'env' [-Wunused-parameter]
  101 |         loliObj* eval(loliObj* env) override {
      |                       ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliInt::eval(loliObj*)':
include/loli_obj.h:126:32: warning: unused parameter 'env' [-Wunused-parameter]
  126 |         loliObj* eval(loliObj* env){
      |                       ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliFlt::eval(loliObj*)':
include/loli_obj.h:159:32: warning: unused parameter 'env' [-Wunused-parameter]
  159 |         loliObj* eval(loliObj* env){
      |                       ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliKey::eval(loliObj*)':
include/loli_obj.h:224:32: warning: unused parameter 'env' [-Wunused-parameter]
  224 |         loliObj* eval(loliObj* env) override {
      |                       ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliFunction::eval(loliObj*)':
include/loli_obj.h:305:32: warning: unused parameter 'env' [-Wunused-parameter]
  305 |         loliObj* eval(loliObj* env){
      |                       ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliChar::eval(loliObj*)':
include/loli_obj.h:373:32: warning: unused parameter 'env' [-Wunused-parameter]
  373 |         loliObj* eval(loliObj* env){
      |                       ~~~~~~~~~^~~
include/loli_obj.h: In member function 'virtual loliObj* loliString::eval(loliObj*)':
include/loli_obj.h:400:32: warning: unused parameter 'env' [-Wunused-parameter]
  400 |         loliObj* eval(loliObj* env){
      |                       ~~~~~~~~~^~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant