File tree 3 files changed +0
-57
lines changed 3 files changed +0
-57
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ shlex = "0.1"
46
46
47
47
[dependencies ]
48
48
bitflags = " 1.0.3"
49
- cexpr = " 0.4"
50
49
cfg-if = " 0.1.0"
51
50
# This kinda sucks: https://github.com/rust-lang/cargo/issues/1982
52
51
clap = { version = " 2" , optional = true }
Original file line number Diff line number Diff line change 5
5
6
6
7
7
use crate :: ir:: context:: BindgenContext ;
8
- use cexpr;
9
8
use clang_sys:: * ;
10
9
use regex;
11
10
use std:: ffi:: { CStr , CString } ;
@@ -696,35 +695,6 @@ impl Cursor {
696
695
RawTokens :: new ( self )
697
696
}
698
697
699
- /// Gets the tokens that correspond to that cursor as `cexpr` tokens.
700
- pub fn cexpr_tokens ( self ) -> Vec < cexpr:: token:: Token > {
701
- use cexpr:: token;
702
-
703
- self . tokens ( )
704
- . iter ( )
705
- . filter_map ( |token| {
706
- let kind = match token. kind {
707
- CXToken_Punctuation => token:: Kind :: Punctuation ,
708
- CXToken_Literal => token:: Kind :: Literal ,
709
- CXToken_Identifier => token:: Kind :: Identifier ,
710
- CXToken_Keyword => token:: Kind :: Keyword ,
711
- // NB: cexpr is not too happy about comments inside
712
- // expressions, so we strip them down here.
713
- CXToken_Comment => return None ,
714
- _ => {
715
- error ! ( "Found unexpected token kind: {:?}" , token) ;
716
- return None ;
717
- }
718
- } ;
719
-
720
- Some ( token:: Token {
721
- kind,
722
- raw : token. spelling ( ) . to_vec ( ) . into_boxed_slice ( ) ,
723
- } )
724
- } )
725
- . collect ( )
726
- }
727
-
728
698
/// Gets the tokens that correspond to that cursor as `rcc` tokens.
729
699
pub fn rcc_tokens < ' a > ( self ) -> Vec < rcc:: Locatable < rcc:: Token > > {
730
700
use rcc:: { Files , Lexer } ;
You can’t perform that action at this time.
0 commit comments