fix { reader macro comment error
This commit is contained in:
@@ -77,14 +77,16 @@ class Reader {
|
||||
// Lets you construct key-value pairs for map literals or for-loops
|
||||
readTable["=>"] = (stream:Stream, k) -> KeyValueExp(assertRead(stream, k), assertRead(stream, k));
|
||||
|
||||
readTable[")"] = (stream:Stream, k) -> {
|
||||
stream.putBackString(")");
|
||||
throw new UnmatchedBracketSignal(")", stream.position());
|
||||
};
|
||||
readTable["]"] = (stream:Stream, k) -> {
|
||||
stream.putBackString("]");
|
||||
throw new UnmatchedBracketSignal("]", stream.position());
|
||||
};
|
||||
function unmatchedBracket(b:String) {
|
||||
readTable[b] = (stream:Stream, k) -> {
|
||||
stream.putBackString(b);
|
||||
throw new UnmatchedBracketSignal(b, stream.position());
|
||||
};
|
||||
}
|
||||
|
||||
unmatchedBracket(")");
|
||||
unmatchedBracket("]");
|
||||
unmatchedBracket("}");
|
||||
|
||||
readTable["`"] = (stream:Stream, k) -> Quasiquote(assertRead(stream, k));
|
||||
readTable[","] = (stream:Stream, k) -> Unquote(assertRead(stream, k));
|
||||
|
@@ -30,7 +30,11 @@
|
||||
rassert fluffers
|
||||
(Assert.pass))
|
||||
|
||||
(function _testCommentAtBlockEnd []
|
||||
(function _testCommentAtBlockOrArrayEnd []
|
||||
[
|
||||
(+ 1 2)
|
||||
// Comment
|
||||
]
|
||||
{
|
||||
(+ 1 2)
|
||||
// Comment
|
||||
|
Reference in New Issue
Block a user