~ok2/retro-language/arduino

« back to all changes in this revision

Viewing changes to image/kernel.rx

  • Committer: crc
  • Date: 2012-03-31 21:25:27 UTC
  • Revision ID: crc@questor-20120331212527-48fzzszdrwztvc48
tighter ^strings'split and ^strings'splitAtChar: and use withClass with __^ prefix

Show diffs side-by-side

added added

removed removed

Lines of Context:
762
762
    [ dup @ add 1- ] times drop
763
763
    start tempString ;
764
764
  : split ( $n-$$ )
765
 
    2over 0 swap getSubset [ + ] dip ;
 
765
    2over 0 swap getSubset &+ dip ;
766
766
  : splitAtChar ( $c-$$ )
767
767
    2over over swap findChar over - 1+ 0 swap getSubset [ findChar 1+ ] dip ;
768
768
  : splitAtChar: ( $"-$$ )
769
 
    32 accept tib @ .data ` splitAtChar ; immediate
 
769
    @getToken .data ` splitAtChar ; immediate
770
770
;chain
771
771
without
772
772
 
774
774
with strings'
775
775
: __^  ( "- )
776
776
  splitAtChar: ' find
777
 
  [ @d->xt findInChain [ [ @d->xt ] [ @d->class ] bi do ] &drop if ]
 
777
  [ @d->xt findInChain [ [ @d->xt ] [ @d->class ] bi withClass ] &drop if ]
778
778
  &drop if ; parsing
779
779
 
780
780
: needs  ( "- )