Implemented $ references for functions and parameters, which are also parsed for real now, along with the result. Setup for locals added, but not it's backend. Added pretty interesting add-dict-to-env function to collections.kp, which has also been added to put collections stuff in one place.
This commit is contained in:
@@ -182,7 +182,7 @@
|
||||
(array (quote number) (array "(0(x|X)([0-9]|[a-f]|[A-F])+)|(-?[0-9]+)") (lambda (x) (string-to-int x)))
|
||||
(array (quote string) (array "\"([#-[]| |[]-~]|(\\\\\\\\)|(\\\\n)|(\\\\t)|(\\*)|(\\\\0)|
|
||||
|[ -!]|(\\\\\"))*\"") (lambda (x) (unescape-str x)))
|
||||
(array (quote bool_nil_symbol) (array "-|(([a-z]|[A-Z]|_|\\*|/|\\?|\\+|!|=|&|\\||<|>|%)([a-z]|[A-Z]|_|[0-9]|\\*|\\?|\\+|-|!|=|&|\\||<|>|%|\\.)*)") (lambda (x) (cond (= "true" x) true
|
||||
(array (quote bool_nil_symbol) (array "-|(([a-z]|[A-Z]|_|\\*|/|\\?|\\+|!|=|&|\\||<|>|%|$)([a-z]|[A-Z]|_|[0-9]|\\*|\\?|\\+|-|!|=|&|\\||<|>|%|$|\\.)*)") (lambda (x) (cond (= "true" x) true
|
||||
(= "false" x) false
|
||||
(= "nil" x) nil
|
||||
true (str-to-symbol x))))
|
||||
@@ -192,6 +192,7 @@
|
||||
(flat_map (lambda (item) (array item (array quote (eval item de)))) items)))
|
||||
scope_let_sans_import_gram (provide
|
||||
root_env
|
||||
current-env
|
||||
lambda
|
||||
rec-lambda
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user