Stop reading symbols at @

This commit is contained in:
Tony Garnock-Jones 2019-08-23 22:06:07 +01:00
parent a817fed40d
commit a34a4cd20e
2 changed files with 5 additions and 1 deletions

View File

@ -411,7 +411,7 @@
(match (peek-char i)
[(or (? eof-object?)
(? char? (or #\( #\) #\{ #\} #\[ #\] #\< #\>
#\" #\; #\, #\# #\: (== PIPE)
#\" #\; #\, #\@ #\# #\: (== PIPE)
(? char-whitespace?))))
(if (null? acc)
(parse-error "Invalid character ~v at start of value" (peek-char i))
@ -978,6 +978,7 @@
(hash 'a 1 'b 2))
'annotation5 (asymmetric (annotate `#s(R ,(annotate 'f 'af)) 'ar) `#s(R f))
'annotation6 (asymmetric (record (annotate 'R 'ar) (list (annotate 'f 'af))) `#s(R f))
'annotation7 (asymmetric (annotate '() 'a 'b 'c) '())
))
(define (run-test-case variety t-name loc binary-form annotated-text-form)

View File

@ -13,6 +13,9 @@
{@ak a: @av 1 @bk b: @bv 2}>
annotation5: <Test #hex{05726172827152057261667166} @ar <R @af f>>
annotation6: <Test #hex{82057261727152057261667166} <@ar R @af f>>
annotation7:
@"Stop reading symbols at @ -- this test has three separate annotations"
<Test #hex{05716105716205716390} @a@b@c[]>
bytes1: <StreamingTest #hex{26626865626c6c616f04} #"hello">
bytes2: <Test #hex{6568656c6c6f} #"hello">
bytes3: <Test #hex{63414243} #"ABC">