No special handling for math operator tokens.
This commit is contained in:
parent
7a0433aa68
commit
6f82567e41
|
@ -99,7 +99,7 @@ check "BinaryReturn" "0b011010011010011" "13523"
|
|||
|
||||
title "Arithmetic"
|
||||
check "Addition" "(+ 1093 102852)" "103945"
|
||||
check "Multiply" "(*1000 10000)" "10000000"
|
||||
check "Multiply" "(* 1000 10000)" "10000000"
|
||||
check "Division" "(/ 6418425 65)" "98745"
|
||||
check "ChainAdd" "(+ 3917 17304 1293844 400 100000)" "1415465"
|
||||
check "ChainMul" "(* 8263 23 123)" "23376027"
|
||||
|
@ -154,9 +154,8 @@ for _ in {0..25}; do deep_nesting="( $deep_nesting )"; done
|
|||
check "DeepNesting" "$deep_nesting" "$deep_nesting" # Above 25 it starts to stack-smash
|
||||
|
||||
title "Spacing"
|
||||
check "DenseSpc" "(+1093 102852)" "103945"
|
||||
check "WideSpac" "( + 1093 102852 )" "103945"
|
||||
check "VWidwSpc" " ( + 1093 102852 ) " "103945"
|
||||
check "Wide Spacing" "( + 1093 102852 )" "103945"
|
||||
check "Very Wide Spacing" " ( + 1093 102852 ) " "103945"
|
||||
|
||||
title "DemoFunctions"
|
||||
check "Squaring" "(sq 9876)" "97535376"
|
||||
|
@ -188,7 +187,7 @@ check "Factorial" "\
|
|||
)));\
|
||||
(fac 11)" "39916800"
|
||||
check "LambdaClone" "(def y (fn (a) (* 10 a))) (def b y) (def y 12345) ((b 5) y)" "( 50 12345 )"
|
||||
check "Duplicate" "(def dupe (fn (a) (() (a a a))));(dupe (*10 10))" "( 100 100 100 )"
|
||||
check "Duplicate" "(def dupe (fn (a) (() (a a a))));(dupe (* 10 10))" "( 100 100 100 )"
|
||||
|
||||
title "Cat"
|
||||
check "ExplicitCat" '(cat "Big" " Kitty")' "Big Kitty"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
// Is the char a standalone token?
|
||||
static const char singleTokens[] = "()+-*/='?.";
|
||||
static const char singleTokens[] = "()'?.";
|
||||
|
||||
int isSingle(const char c)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue