GDBMIParser.st
changeset 106 12c96f17fc53
parent 101 d8fee2af20b2
child 126 fb73b0af430b
equal deleted inserted replaced
105:1d4ca4370d05 106:12c96f17fc53
   833     self peek == $" ifTrue:[
   833     self peek == $" ifTrue:[
   834         | c |
   834         | c |
   835 
   835 
   836         self expect: $".
   836         self expect: $".
   837         c := self next.
   837         c := self next.
   838         (c ~~ $y and:[ c ~~ $n and:[ c ~~ $1 and:[ c ~~ $0 ]]] ) ifTrue:[ 
   838         (c ~~ $y and:[ c ~~ $n and:[ c ~~ $1 and:[ c ~~ $0 ]]] ) ifTrue:[
   839             ^ self parseCStringRest: c asString.  
   839             | s |
       
   840 
       
   841             s := self parseCStringRest: c asString.  
       
   842             s = 'true' ifTrue:[ ^ true ].
       
   843             s = 'false' ifTrue:[ ^ false ].
       
   844             ^ s
       
   845 
   840         ].
   846         ].
   841         self peek ~~ $" ifTrue:[ 
   847         self peek ~~ $" ifTrue:[ 
   842             ^ self parseCStringRest: c asString.  
   848             | s |
       
   849 
       
   850             s := self parseCStringRest: c asString. 
       
   851             s = 'true' ifTrue:[ ^ true ].
       
   852             s = 'false' ifTrue:[ ^ false ].
       
   853             ^ s
   843         ].
   854         ].
   844         self next.
   855         self next.
   845         ^ (c == $y) or:[ c == $1 ]
   856         ^ (c == $y) or:[ c == $1 ]
   846     ].
   857     ].
   847     ^ self parseValue
   858     ^ self parseValue
   848 
   859 
   849     "Created: / 18-06-2014 / 07:33:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   860     "Created: / 18-06-2014 / 07:33:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   850     "Modified: / 27-01-2018 / 22:43:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   861     "Modified: / 12-02-2018 / 22:21:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   851 !
   862 !
   852 
   863 
   853 parseValueAsInstanceOf: class
   864 parseValueAsInstanceOf: class
   854     | description |
   865     | description |
   855 
   866