diff options
| author | Joel Martin <github@martintribe.org> | 2014-12-18 20:33:49 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-09 16:16:50 -0600 |
| commit | b8ee29b22fbaa7a01f2754b4d6dd9af52e02017c (patch) | |
| tree | f4d977ed220e9a3f665cfbf4f68770a81e4c2095 /bash/reader.sh | |
| parent | aaba249304b184e12e2445ab22d66df1f39a51a5 (diff) | |
| download | mal-b8ee29b22fbaa7a01f2754b4d6dd9af52e02017c.tar.gz mal-b8ee29b22fbaa7a01f2754b4d6dd9af52e02017c.zip | |
All: add keywords.
Also, fix nth and count to match cloure.
Diffstat (limited to 'bash/reader.sh')
| -rw-r--r-- | bash/reader.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/reader.sh b/bash/reader.sh index ee7e505..a00e7a1 100644 --- a/bash/reader.sh +++ b/bash/reader.sh @@ -15,6 +15,7 @@ READ_ATOM () { \"*) token="${token:1:-1}" token="${token//\\\"/\"}" _string "${token}" ;; + :*) _keyword "${token:1}" ;; nil) r="${__nil}" ;; true) r="${__true}" ;; false) r="${__false}" ;; @@ -135,7 +136,7 @@ READ_STR () { declare -a __reader_tokens TOKENIZE "${*}" || return 1 # sets __reader_tokens #set | grep ^__reader_tokens - if [ -z "${__reader_tokens[k]}" ]; then + if [ -z "${__reader_tokens[0]}" ]; then r= return 1 # No tokens fi |
