Skip to content

Commit

Permalink
Rename process_id into process_identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Jul 20, 2024
1 parent d51a489 commit 2b33c46
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/cscout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ file_analyze(Fileid fi)
int len = ec->get_len();
for (int j = 1; j < len; j++)
s += (char)in.get();
Filedetails::get_pre_cpp_metrics(fi).process_id(s, ec);
Filedetails::get_pre_cpp_metrics(fi).process_identifier(s, ec);
if (cfun)
cfun->get_pre_cpp_metrics().process_id(s, ec);
cfun->get_pre_cpp_metrics().process_identifier(s, ec);
/*
* ids[ec] = Identifier(ec, s);
* Efficiently add s to ids, if needed.
Expand Down
2 changes: 1 addition & 1 deletion src/filemetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* overhead will be incured exactly once for each file.
*
* During postprocessing call:
* process_char() or process_id() while going through each file
* process_char() or process_identifier() while going through each file
* msum.add_unique_id once() for every EC
* msum.add_id() for each identifier having an EC
* summarize_files() at the end of processing
Expand Down
4 changes: 2 additions & 2 deletions src/funmetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ FunMetrics::summarize_identifiers()
}
// Called for every identifier
void
FunMetrics::process_id(const string &s, Eclass *ec)
FunMetrics::process_identifier(const string &s, Eclass *ec)
{
Metrics::process_id(s, ec);
Metrics::process_identifier(s, ec);
if (!ec)
return;
if (ec->get_attribute(is_lscope)) {
Expand Down
4 changes: 2 additions & 2 deletions src/funmetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Before preprocessing call:
* process_token(int code) for every token recognized
* During postprocessing call:
* process_char() or process_id() while going through each file
* process_char() or process_identifier() while going through each file
* summarize_identifiers() at the end of each function
*
*/
Expand Down Expand Up @@ -95,7 +95,7 @@ class FunMetrics : public Metrics {
virtual ~FunMetrics() {}

// Called for every identifier (override Metrics method)
void process_id(const string &s, Eclass *ec);
void process_identifier(const string &s, Eclass *ec);
// Summarize the operators collected by process_token
void summarize_operators();
// Summarize the identifiers collected by process_id
Expand Down
2 changes: 1 addition & 1 deletion src/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ IdMetricsSummary id_msum;

// Called for every identifier
void
Metrics::process_id(const string &s, Eclass *ec)
Metrics::process_identifier(const string &s, Eclass *ec)
{
count[em_nchar] += s.length();
currlinelen += s.length();
Expand Down
4 changes: 2 additions & 2 deletions src/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* overhead will be incured exactly once for each file.
*
* During postprocessing call:
* process_char() or process_id() while going through each file
* process_char() or process_identifier() while going through each file
* msum.add_unique_id once() for every EC
* msum.add_id() for each identifier having an EC
* summarize_files() at the end of processing
Expand Down Expand Up @@ -172,7 +172,7 @@ class Metrics {
// Called for all file characters appart from identifiers
void process_char(char c);
// Called for every identifier
void process_id(const string &s, Eclass *ec);
void process_identifier(const string &s, Eclass *ec);
// Called when encountering unprocessed lines
void add_unprocessed() { count[em_nuline]++; }

Expand Down
2 changes: 1 addition & 1 deletion src/webmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ file_hypertext(ofstream &of, ofstream &uof, Fileid fi, bool write_uof)
for (int j = 1; j < len; j++)
s += (char)in.get();
Identifier i(ec, s);
fi.metrics().process_id(s);
fi.metrics().process_identifier(s);
ids.insert(i);
html_id(of, i);
if (ec->get_size() == 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/workdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ file_dump(Sql *db, ostream &of, Fileid fid)
for (int j = 1; j < len; j++)
s += (char)in.get();
insert_eclass(db, of, ec, s);
Filedetails::get_pre_cpp_metrics(fid).process_id(s, ec);
Filedetails::get_pre_cpp_metrics(fid).process_identifier(s, ec);
chunker.flush();
if (table_is_enabled(t_tokens))
of << "INSERT INTO TOKENS VALUES("
Expand Down

0 comments on commit 2b33c46

Please sign in to comment.