mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Ruby: Fix imports in extractor
This commit is contained in:
BIN
ruby/extractor/Cargo.lock
generated
BIN
ruby/extractor/Cargo.lock
generated
Binary file not shown.
@@ -8,7 +8,6 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
flate2 = "1.0"
|
||||
node-types = { path = "../node-types" }
|
||||
tree-sitter = "0.20"
|
||||
tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "203f7bd3c1bbfbd98fc19add4b8fcb213c059205" }
|
||||
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "206c7077164372c596ffa8eaadb9435c28941364" }
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
mod dbscheme;
|
||||
mod language;
|
||||
mod ql;
|
||||
mod ql_gen;
|
||||
|
||||
use clap::arg;
|
||||
use language::Language;
|
||||
use std::collections::BTreeMap as Map;
|
||||
use std::collections::BTreeSet as Set;
|
||||
use std::fs::File;
|
||||
@@ -12,6 +6,9 @@ use std::io::LineWriter;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use ruby_extractor::generator::{dbscheme, language::Language, ql, ql_gen};
|
||||
use ruby_extractor::node_types;
|
||||
|
||||
/// Given the name of the parent node, and its field information, returns a pair,
|
||||
/// the first of which is the field's type. The second is an optional dbscheme
|
||||
/// entry that should be added.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::diagnostics;
|
||||
use crate::file_paths;
|
||||
use crate::trap;
|
||||
use node_types::{EntryKind, Field, NodeTypeMap, Storage, TypeName};
|
||||
use crate::node_types::{self, EntryKind, Field, NodeTypeMap, Storage, TypeName};
|
||||
use std::collections::BTreeMap as Map;
|
||||
use std::collections::BTreeSet as Set;
|
||||
use std::fmt;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use crate::ql;
|
||||
use std::collections::BTreeSet as Set;
|
||||
use std::fmt;
|
||||
|
||||
use crate::generator::ql;
|
||||
|
||||
/// Represents a distinct entry in the database schema.
|
||||
pub enum Entry<'a> {
|
||||
/// An entry defining a database table.
|
||||
|
||||
4
ruby/extractor/src/generator/mod.rs
Normal file
4
ruby/extractor/src/generator/mod.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
pub mod dbscheme;
|
||||
pub mod language;
|
||||
pub mod ql;
|
||||
pub mod ql_gen;
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::ql;
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use crate::{node_types, generator::ql};
|
||||
|
||||
/// Creates the hard-coded `AstNode` class that acts as a supertype of all
|
||||
/// classes we generate.
|
||||
pub fn create_ast_node_class<'a>(ast_node: &'a str, node_info_table: &'a str) -> ql::Class<'a> {
|
||||
|
||||
6
ruby/extractor/src/lib.rs
Normal file
6
ruby/extractor/src/lib.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
pub mod generator;
|
||||
pub mod node_types;
|
||||
pub mod trap;
|
||||
pub mod diagnostics;
|
||||
pub mod extractor;
|
||||
pub mod file_paths;
|
||||
@@ -1,8 +1,3 @@
|
||||
mod diagnostics;
|
||||
mod extractor;
|
||||
mod file_paths;
|
||||
mod trap;
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate num_cpus;
|
||||
@@ -16,6 +11,8 @@ use std::io::BufRead;
|
||||
use std::path::{Path, PathBuf};
|
||||
use tree_sitter::{Language, Parser, Range};
|
||||
|
||||
use ruby_extractor::{diagnostics, extractor, file_paths, trap, node_types};
|
||||
|
||||
/**
|
||||
* Gets the number of threads the extractor should use, by reading the
|
||||
* CODEQL_THREADS environment variable and using it as described in the
|
||||
|
||||
Reference in New Issue
Block a user