Skip to content

Commit 232c23e

Browse files
committed
rust: semantic crate is part of bear
1 parent 3445a2f commit 232c23e

File tree

15 files changed

+13
-52
lines changed

15 files changed

+13
-52
lines changed

rust/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[workspace]
22
members = [
33
"bear",
4-
"intercept",
5-
"semantic"
4+
"intercept"
65
]
76
resolver = "2"
87

rust/bear/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ path = "src/bin/main.rs"
1919

2020
[dependencies]
2121
intercept = { path = "../intercept" }
22-
semantic = { path = "../semantic" }
2322
thiserror.workspace = true
2423
anyhow.workspace = true
2524
lazy_static.workspace = true
@@ -33,3 +32,5 @@ log.workspace = true
3332
env_logger.workspace = true
3433
path-absolutize.workspace = true
3534
shell-words.workspace = true
35+
nom.workspace = true
36+
regex.workspace = true

rust/bear/src/bin/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ use std::process::ExitCode;
2020

2121
use bear::input::EventFileReader;
2222
use bear::output::OutputWriter;
23-
use bear::{args, config};
23+
use bear::{args, config, semantic};
2424
use intercept::Execution;
2525
use log;
26-
use semantic;
2726

2827
/// Driver function of the application.
2928
fn main() -> anyhow::Result<ExitCode> {

rust/bear/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pub mod config;
33
mod fixtures;
44
pub mod input;
55
pub mod output;
6+
pub mod semantic;

rust/bear/src/output/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ use std::fs::{File, OpenOptions};
2020
use std::io::{BufReader, BufWriter};
2121
use std::path::{Path, PathBuf};
2222

23-
use super::{args, config};
23+
use super::{args, config, semantic};
2424
use anyhow::{anyhow, Context, Result};
2525
use clang::Entry;
2626
use path_absolutize::Absolutize;
27-
use semantic;
2827
use serde_json::Error;
2928

3029
pub mod clang;

rust/semantic/src/lib.rs renamed to rust/bear/src/semantic/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
You should have received a copy of the GNU General Public License
1717
along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
19-
20-
mod fixtures;
2119
pub mod tools;
2220

2321
use intercept::Execution;

rust/semantic/src/tools/combinators.rs renamed to rust/bear/src/semantic/tools/combinators.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
use crate::{RecognitionResult, Tool};
20+
use super::super::{RecognitionResult, Tool};
2121
use intercept::Execution;
2222

2323
/// Represents a set of tools, where any of them can recognize the semantic.

rust/semantic/src/tools/gcc.rs renamed to rust/bear/src/semantic/tools/gcc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use nom::multi::many1;
2222
use nom::sequence::preceded;
2323

2424
use super::super::{Meaning, RecognitionResult, Tool};
25-
use super::gcc::internal::Argument;
25+
use internal::Argument;
2626
use intercept::Execution;
2727

2828
pub struct Gcc {}
@@ -66,8 +66,8 @@ mod internal {
6666
use regex::Regex;
6767
use std::path::PathBuf;
6868

69-
use crate::tools::matchers::source::looks_like_a_source_file;
70-
use crate::CompilerPass;
69+
use super::super::super::CompilerPass;
70+
use super::super::matchers::source::looks_like_a_source_file;
7171

7272
#[derive(Debug, PartialEq)]
7373
enum Language {
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)