Ignore:
Timestamp:
Mar 7, 2010, 6:54:59 PM (15 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d64f963
Parents:
2d232ed
git-author:
David Benjamin <davidben@mit.edu> (02/27/10 22:16:24)
git-committer:
David Benjamin <davidben@mit.edu> (03/07/10 18:54:59)
Message:
Add function for point-less parses

Often, you don't care very much about the point when you do the parse.
We rename existing tokenize to tokenize_with_point and add tokenize that
does point-less parses.

Signed-off-by: David Benjamin <davidben@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Completion/Context.pm

    r2d232ed r30c5aab  
    4141use base qw(Class::Accessor::Fast);
    4242use Carp qw(croak);
    43 use BarnOwl::Parse qw(tokenize);
     43use BarnOwl::Parse qw(tokenize_with_point);
    4444
    4545__PACKAGE__->mk_ro_accessors(qw(line point words word word_point
     
    5454    my $point = length ($before_point);
    5555    my ($words, $word, $word_point,
    56         $word_start, $word_end) = tokenize($line, $point);
     56        $word_start, $word_end) = tokenize_with_point($line, $point);
    5757    push @$words, '' if scalar @$words <= $word;
    5858
Note: See TracChangeset for help on using the changeset viewer.