Tools__TagList.st
changeset 14669 c2dcc9d3e1d2
parent 14579 3c1230b28239
child 14681 7e1e6251f549
equal deleted inserted replaced
14668:2f6b48f6902a 14669:c2dcc9d3e1d2
  3542     "
  3542     "
  3543 
  3543 
  3544     |l nm lineStream|
  3544     |l nm lineStream|
  3545 
  3545 
  3546     l := line withoutSeparators.
  3546     l := line withoutSeparators.
       
  3547     (l startsWith:'public ') ifTrue:[ l := (l copyFrom:'public ' size + 1) withoutSeparators ].
  3547 
  3548 
  3548     (l startsWith:'var ') ifTrue:[
  3549     (l startsWith:'var ') ifTrue:[
  3549         lineStream := (l copyFrom:4) readStream.
  3550         lineStream := (l copyFrom:'var ' size) readStream.
  3550         lineStream skipSeparators.
  3551         lineStream skipSeparators.
  3551         lineStream peek == $$ ifTrue:[
  3552         lineStream peek == $$ ifTrue:[
  3552             lineStream next.
  3553             lineStream next.
  3553             nm := lineStream 
  3554             nm := lineStream 
  3554                     nextMatching:[:c | c isLetter] 
  3555                     nextMatching:[:c | c isLetter] 
  3559                         type:nil
  3560                         type:nil
  3560                         lineNumber:lineNr).
  3561                         lineNumber:lineNr).
  3561         ]
  3562         ]
  3562     ] ifFalse:[
  3563     ] ifFalse:[
  3563         (l startsWith:'class ') ifTrue:[
  3564         (l startsWith:'class ') ifTrue:[
  3564             lineStream := (l copyFrom:6) readStream.
  3565             lineStream := (l copyFrom:'class ' size) readStream.
  3565             lineStream skipSeparators.
  3566             lineStream skipSeparators.
  3566             nm := lineStream 
  3567             nm := lineStream 
  3567                     nextMatching:[:c | c isLetter] 
  3568                     nextMatching:[:c | c isLetter] 
  3568                     thenMatching:[:c | c isLetterOrDigit or:[c == $_]].
  3569                     thenMatching:[:c | c isLetterOrDigit or:[c == $_]].
  3569             ^ (Tag::TClass 
  3570             ^ (Tag::TClass 
  3571                             pattern:nil
  3572                             pattern:nil
  3572                             type:nil
  3573                             type:nil
  3573                             lineNumber:lineNr).
  3574                             lineNumber:lineNr).
  3574         ] ifFalse:[
  3575         ] ifFalse:[
  3575             (l startsWith:'function ') ifTrue:[
  3576             (l startsWith:'function ') ifTrue:[
  3576                 lineStream := (l copyFrom:9) readStream.
  3577                 lineStream := (l copyFrom:'function ' size) readStream.
  3577                 lineStream skipSeparators.
  3578                 lineStream skipSeparators.
  3578                 nm := lineStream 
  3579                 nm := lineStream 
  3579                         nextMatching:[:c | c isLetter] 
  3580                         nextMatching:[:c | c isLetter or:[c == $_]] 
  3580                         thenMatching:[:c | c isLetterOrDigit or:[c == $_]].
  3581                         thenMatching:[:c | c isLetterOrDigit or:[c == $_]].
  3581                  ^ (Tag::TFunction
  3582                  ^ (Tag::TFunction
  3582                                 label:nm 
  3583                                 label:nm 
  3583                                 pattern:nil
  3584                                 pattern:nil
  3584                                 type:nil
  3585                                 type:nil
  3964 ! !
  3965 ! !
  3965 
  3966 
  3966 !TagList class methodsFor:'documentation'!
  3967 !TagList class methodsFor:'documentation'!
  3967 
  3968 
  3968 version
  3969 version
  3969     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.61 2014-07-04 10:24:52 cg Exp $'
  3970     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.62 2014-07-22 17:21:09 cg Exp $'
  3970 !
  3971 !
  3971 
  3972 
  3972 version_CVS
  3973 version_CVS
  3973     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.61 2014-07-04 10:24:52 cg Exp $'
  3974     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.62 2014-07-22 17:21:09 cg Exp $'
  3974 !
  3975 !
  3975 
  3976 
  3976 version_SVN
  3977 version_SVN
  3977     ^ '$Id: Tools__TagList.st,v 1.61 2014-07-04 10:24:52 cg Exp $'
  3978     ^ '$Id: Tools__TagList.st,v 1.62 2014-07-22 17:21:09 cg Exp $'
  3978 ! !
  3979 ! !
  3979 
  3980