-
Notifications
You must be signed in to change notification settings - Fork 20
allow nonspace operators. sys command args. dict use: #103
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
base: main
Are you sure you want to change the base?
Conversation
tested with the following cases:echo allow whitespace be skipped on operator;
echo
echo 0 testing negtive number ;
echo -1 ;
echo 3 + -1 ;
5 * -1 ;
echo;
echo 1 testing operator;
let a=10;
echo a+1 a-1 a*3 a//2 ;
let b=a+3-4*5//2 ;
echo b;
echo a%2 ;
echo;
echo 2 tesing lambda;
let add=x->x+100;
echo add a;
echo;
echo 3 testing overload;
let ++ =x->x+1;
++ a;
echo;
echo 4 testing command;
ls -l --color=auto ;
ls -l --color=auto /tmp ;
echo "--testing dict with : " ;
let z = {x:1,y:3} ;
echo z;
echo z@x;
let z = {x=11,y=13} ;
echo z;
echo z@y;
echo finished.
|
Wow, thank you so so much!! I really appreciate the effort!! I'll take a look in the morning and merge if everything is in order! |
Hmm the one issue I see with this is the |
paths was recognized when : / folling a space and followed by some latter. (see parse_argument). operator / was recognized when: / with space surround. or letters surround. eg:
|
this branch fix symbols:
such as
let a=2+3;
a>3
let add=x->x+1
but space is needed when you need to differ negtive numbers with operator:
such as
let a=2+ -3
allow args in command.
such as
ls -l --color=auto /tmp
-c
--chars
./dir
or/dir
or..
but unfortunlately, single
/
is not added currently, as this may be used as operator someday.single
.
was ignored and default to cwd.allow
:
to define dict.let dict={x:1,y:2}
as well as the old one :let dict={x=1,y=2}