Ticket #1623 (closed defect: fixed)

Opened 13 months ago

Last modified 9 months ago

string: contract violation expected: char? given: #<eof>

Reported by: baoti Owned by: esilkensen
Priority: major Milestone:
Component: esilkensen/yaml.plt Keywords:
Cc: Version:
Racket Version:

Description

> (string->yaml "!!str &a1 \"foo\":
  !!str bar
&a2 baz : *a1")
string: contract violation
  expected: char?
  given: #<eof>
  context...:
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:681:2: scan-anchor
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:424:2: fetch-alias
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:133:4: loop
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:131:2: check-token?
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/parser.rkt:382:2: parse-block-mapping-value
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/parser.rkt:53:2: check-event?
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/composer.rkt:76:2: compose-node
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/composer.rkt:76:2: compose-node
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/composer.rkt:56:2: get-single-node
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/constructor.rkt:60:2: get-single-data
   /usr/share/racket/collects/racket/private/misc.rkt:87:7

Change History

Changed 13 months ago by baoti

Changed 13 months ago by baoti

> (string->yaml "First occurrence: &anchor Value
Second occurrence: *anchor")
string: contract violation
  expected: char?
  given: #<eof>
  context...:
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:694:8: loop
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:681:2: scan-anchor
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:424:2: fetch-alias
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:133:4: loop
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/scanner.rkt:131:2: check-token?
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/parser.rkt:382:2: parse-block-mapping-value
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/parser.rkt:53:2: check-event?
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/composer.rkt:76:2: compose-node
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/composer.rkt:76:2: compose-node
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/composer.rkt:56:2: get-single-node
   /home/sean/.racket/planet/300/5.3.1/cache/esilkensen/yaml.plt/2/1/private/constructor.rkt:60:2: get-single-data
   /usr/share/racket/collects/racket/private/misc.rkt:87:7
> 

Changed 9 months ago by esilkensen

  • status changed from new to closed
  • resolution set to fixed

Fix pushed to github.

> (string->yaml "!!str &a1 \"foo\":\n  !!str bar\n&a2 baz : *a1")
'#hash(("foo" . "bar") ("baz" . "foo"))
Note: See TracTickets for help on using tickets.