Skip to content

Commit 73013e1

Browse files
committed
Remove cexpr
1 parent de666c9 commit 73013e1

File tree

3 files changed

+0
-57
lines changed

3 files changed

+0
-57
lines changed

Cargo.lock

Lines changed: 0 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ shlex = "0.1"
4646

4747
[dependencies]
4848
bitflags = "1.0.3"
49-
cexpr = "0.4"
5049
cfg-if = "0.1.0"
5150
# This kinda sucks: https://github.com/rust-lang/cargo/issues/1982
5251
clap = { version = "2", optional = true }

src/clang.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
use crate::ir::context::BindgenContext;
8-
use cexpr;
98
use clang_sys::*;
109
use regex;
1110
use std::ffi::{CStr, CString};
@@ -696,35 +695,6 @@ impl Cursor {
696695
RawTokens::new(self)
697696
}
698697

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-
728698
/// Gets the tokens that correspond to that cursor as `rcc` tokens.
729699
pub fn rcc_tokens<'a>(self) -> Vec<rcc::Locatable<rcc::Token>> {
730700
use rcc::{Files, Lexer};

0 commit comments

Comments
 (0)