Cheating in the same way, strings!
This commit is contained in:
@@ -702,7 +702,7 @@ fun main(argc: int, argv: **char): int {
|
|||||||
} else if input[i+1] == '\\' || input[i+1] == '"' {
|
} else if input[i+1] == '\\' || input[i+1] == '"' {
|
||||||
to_ret += input[i+1]
|
to_ret += input[i+1]
|
||||||
} else {
|
} else {
|
||||||
return KPResult::Err(kpString(str("bad string escape")))
|
return KPResult::Err(kpString(str("bad string escape: ") + input[i+1]))
|
||||||
}
|
}
|
||||||
// skip
|
// skip
|
||||||
i++
|
i++
|
||||||
|
|||||||
@@ -73,7 +73,8 @@
|
|||||||
|(;[ -~]*
|
|(;[ -~]*
|
||||||
))+") (lambda (x) nil))
|
))+") (lambda (x) nil))
|
||||||
(array (quote atom) (array "-?[0-9]+") (lambda (x) (read-string x)))
|
(array (quote atom) (array "-?[0-9]+") (lambda (x) (read-string x)))
|
||||||
; String here
|
(array (quote atom) (array "\"([#-[]| |[]-~]|(\\\\)|(\\n)|(\\t)|(\\\\*)|(\\0)|
|
||||||
|
|[ -!]|(\\\\\"))*\"") (lambda (x) (read-string x)))
|
||||||
(array (quote atom) (array "-|(([a-z]|[A-Z]|_|\\*|/|\\?|\\+|!|=|&|<|>|%)([a-z]|[A-Z]|_|[0-9]|\\*|\\?|\\+|-|!|=|&|<|>|%)*)") (lambda (x) (cond (= "true" x) true
|
(array (quote atom) (array "-|(([a-z]|[A-Z]|_|\\*|/|\\?|\\+|!|=|&|<|>|%)([a-z]|[A-Z]|_|[0-9]|\\*|\\?|\\+|-|!|=|&|<|>|%)*)") (lambda (x) (cond (= "true" x) true
|
||||||
(= "false" x) false
|
(= "false" x) false
|
||||||
(= "nil" x) nil
|
(= "nil" x) nil
|
||||||
|
|||||||
Reference in New Issue
Block a user