mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
core: add todo macro
This commit is contained in:
parent
7d1d16dd53
commit
f60f72f4b4
@ -21,7 +21,9 @@
|
||||
(register dec (λ [Long] Long))
|
||||
(register to-int (λ [Long] Int))
|
||||
(register from-int (λ [Int] Long))
|
||||
(register copy (λ [&Long] Long)) ;; TODO: Should not be needed when refs to value types are auto-converted to non-refs.
|
||||
(todo copy "Should not be needed when refs to value types are auto-converted
|
||||
to non-refs.")
|
||||
(register copy (λ [&Long] Long))
|
||||
|
||||
(defn /= [x y]
|
||||
(not (Long.= x y)))
|
||||
|
@ -24,13 +24,19 @@
|
||||
(defmacro private [name]
|
||||
(list 'meta-set! name "private" true))
|
||||
|
||||
(doc todo "sets the todo property for a binding.")
|
||||
(defmacro todo [name value]
|
||||
(list 'meta-set! name "todo" value))
|
||||
|
||||
(doc private? "Is this binding private?")
|
||||
(todo private? "This is buggy, will report true when meta is set to 'false'!")
|
||||
(defmacro private? [name]
|
||||
(list 'not (list '= () (list 'meta name "private")))) ;; TODO: This is buggy, will report true when meta is set to 'false'!
|
||||
(list 'not (list '= () (list 'meta name "private"))))
|
||||
|
||||
(doc hidden? "Is this binding hidden?")
|
||||
(todo hidden? "This is buggy, will report true when meta is set to 'false'!")
|
||||
(defmacro hidden? [name]
|
||||
(list 'not (list '= () (list 'meta name "hidden")))) ;; TODO: This is buggy, will report true when meta is set to 'false'!
|
||||
(list 'not (list '= () (list 'meta name "hidden"))))
|
||||
|
||||
(defndynamic annotate-helper [name annotation]
|
||||
(cons annotation (meta name "annotations")))
|
||||
|
Loading…
Reference in New Issue
Block a user