mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Remove file column from tokeninfo tables.
This commit is contained in:
@@ -422,7 +422,6 @@ impl Visitor<'_> {
|
||||
vec![
|
||||
Arg::Label(id),
|
||||
Arg::Int(*kind_id),
|
||||
Arg::Label(self.file_label),
|
||||
sliced_source_arg(self.source, node),
|
||||
Arg::Label(loc),
|
||||
],
|
||||
|
||||
@@ -305,13 +305,6 @@ fn create_tokeninfo<'a>(name: &'a str, type_name: &'a str) -> dbscheme::Table<'a
|
||||
ql_type: ql::Type::Int,
|
||||
ql_type_is_ref: true,
|
||||
},
|
||||
dbscheme::Column {
|
||||
unique: false,
|
||||
db_type: dbscheme::DbColumnType::Int,
|
||||
name: "file",
|
||||
ql_type: ql::Type::AtType("file"),
|
||||
ql_type_is_ref: true,
|
||||
},
|
||||
dbscheme::Column {
|
||||
unique: false,
|
||||
db_type: dbscheme::DbColumnType::String,
|
||||
|
||||
@@ -119,14 +119,14 @@ pub fn create_ast_node_class<'a>(ast_node: &'a str, ast_node_parent: &'a str) ->
|
||||
}
|
||||
|
||||
pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Class<'a> {
|
||||
let tokeninfo_arity = 5;
|
||||
let tokeninfo_arity = 4;
|
||||
let get_value = ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the value of this token.")),
|
||||
name: "getValue",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::String),
|
||||
formal_parameters: vec![],
|
||||
body: create_get_field_expr_for_column_storage("result", tokeninfo, 2, tokeninfo_arity),
|
||||
body: create_get_field_expr_for_column_storage("result", tokeninfo, 1, tokeninfo_arity),
|
||||
};
|
||||
let get_location = ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the location of this token.")),
|
||||
@@ -134,7 +134,7 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl
|
||||
overridden: true,
|
||||
return_type: Some(ql::Type::Normal("Location")),
|
||||
formal_parameters: vec![],
|
||||
body: create_get_field_expr_for_column_storage("result", tokeninfo, 3, tokeninfo_arity),
|
||||
body: create_get_field_expr_for_column_storage("result", tokeninfo, 2, tokeninfo_arity),
|
||||
};
|
||||
let to_string = ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
|
||||
@@ -34,10 +34,10 @@ module Ruby {
|
||||
/** A token. */
|
||||
class Token extends @ruby_token, AstNode {
|
||||
/** Gets the value of this token. */
|
||||
string getValue() { ruby_tokeninfo(this, _, _, result, _) }
|
||||
string getValue() { ruby_tokeninfo(this, _, result, _) }
|
||||
|
||||
/** Gets the location of this token. */
|
||||
override Location getLocation() { ruby_tokeninfo(this, _, _, _, result) }
|
||||
override Location getLocation() { ruby_tokeninfo(this, _, _, result) }
|
||||
|
||||
/** Gets a string representation of this element. */
|
||||
override string toString() { result = getValue() }
|
||||
@@ -1875,10 +1875,10 @@ module Erb {
|
||||
/** A token. */
|
||||
class Token extends @erb_token, AstNode {
|
||||
/** Gets the value of this token. */
|
||||
string getValue() { erb_tokeninfo(this, _, _, result, _) }
|
||||
string getValue() { erb_tokeninfo(this, _, result, _) }
|
||||
|
||||
/** Gets the location of this token. */
|
||||
override Location getLocation() { erb_tokeninfo(this, _, _, _, result) }
|
||||
override Location getLocation() { erb_tokeninfo(this, _, _, result) }
|
||||
|
||||
/** Gets a string representation of this element. */
|
||||
override string toString() { result = getValue() }
|
||||
|
||||
@@ -1205,7 +1205,6 @@ ruby_yield_def(
|
||||
ruby_tokeninfo(
|
||||
unique int id: @ruby_token,
|
||||
int kind: int ref,
|
||||
int file: @file ref,
|
||||
string value: string ref,
|
||||
int loc: @location ref
|
||||
);
|
||||
@@ -1292,7 +1291,6 @@ erb_template_def(
|
||||
erb_tokeninfo(
|
||||
unique int id: @erb_token,
|
||||
int kind: int ref,
|
||||
int file: @file ref,
|
||||
string value: string ref,
|
||||
int loc: @location ref
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user