Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clawk.lisp: add symbol macros $NF and $#NF to access the last field

packages.lisp: export $NF and $#NF

darcs-hash:20080204114627-86aef-f9f4aae3f1c89b8691758c20c21510c3b56c9411.gz
  • Loading branch information...
commit b4652df5f2473015dbc134448fb81c032f720bfc 1 parent e6ad037
@michaelw michaelw authored
Showing with 4 additions and 2 deletions.
  1. +2 −0  clawk.lisp
  2. +2 −2 packages.lisp
View
2  clawk.lisp
@@ -148,6 +148,7 @@
(define-symbol-macro $18 ($n 18))
(define-symbol-macro $19 ($n 19))
(define-symbol-macro $20 ($n 20))
+(define-symbol-macro $NF ($n (1- *NF*)))
(define-symbol-macro $#0 ($#n 0))
(define-symbol-macro $#1 ($#n 1))
@@ -170,6 +171,7 @@
(define-symbol-macro $#18 ($#n 18))
(define-symbol-macro $#19 ($#n 19))
(define-symbol-macro $#20 ($#n 20))
+(define-symbol-macro $#NF ($#n (1- *NF*)))
View
4 packages.lisp
@@ -47,10 +47,10 @@
;; still stand out visually, so I think the goal of that convention
;; is still met
"$N" "$0" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10"
- "$11" "$12" "$13" "$14" "$15" "$16" "$17" "$18" "$19" "$20"
+ "$11" "$12" "$13" "$14" "$15" "$16" "$17" "$18" "$19" "$20" "$NF"
;; Fields access, as numbers
"$#N" "$#0" "$#1" "$#2" "$#3" "$#4" "$#5" "$#6" "$#7" "$#8" "$#9" "$#10"
- "$#11" "$#12" "$#13" "$#14" "$#15" "$#16" "$#17" "$#18" "$#19" "$#20"
+ "$#11" "$#12" "$#13" "$#14" "$#15" "$#16" "$#17" "$#18" "$#19" "$#20" "$#NF"
;; Coercion routines, although the generic functions above reduce
;; the need for them.
"STR" "NUM" "INT"
Please sign in to comment.
Something went wrong with that request. Please try again.