compiler/PPCTrimNode.st
changeset 515 b5316ef15274
parent 452 9f4558b3be66
equal deleted inserted replaced
502:1e45d3c96ec5 515:b5316ef15274
    19 child: anObject
    19 child: anObject
    20     
    20     
    21     children at: 2 put: anObject
    21     children at: 2 put: anObject
    22 !
    22 !
    23 
    23 
    24 prefix
    24 defaultName
    25     ^ #trim
    25     ^ #trim
    26 !
    26 !
    27 
    27 
    28 trimmer
    28 trimmer
    29     ^ children at: 1
    29     ^ children at: 1
    51 
    51 
    52 defaultTrimmer
    52 defaultTrimmer
    53     | message |
    53     | message |
    54     message := PPCMessagePredicateNode new 
    54     message := PPCMessagePredicateNode new 
    55             message: #isSeparator;
    55             message: #isSeparator;
       
    56             predicate: [ :char | char isSeparator ]
    56             yourself.
    57             yourself.
    57     ^ PPCStarNode new
    58     ^ PPCStarNode new
    58         child: message;
    59         child: message;
    59         yourself.
    60         yourself.
    60 !
    61 !