File src/Language.hpp changed (mode: 100644) (index 2676612..a8e6c79) |
... |
... |
public: |
87 |
87 |
virtual bool alwaysMatches(const Node *x) const = 0; |
virtual bool alwaysMatches(const Node *x) const = 0; |
88 |
88 |
// Checks whether parameter node (as reported by `classify()`) represents a |
// Checks whether parameter node (as reported by `classify()`) represents a |
89 |
89 |
// true parameter and not something like "no argument list". |
// true parameter and not something like "no argument list". |
90 |
|
virtual bool isPseudoParamater(const Node *x) const = 0; |
|
|
90 |
|
virtual bool isPseudoParameter(const Node *x) const = 0; |
91 |
91 |
// Checks whether child node needs to be replaced in its parent with its |
// Checks whether child node needs to be replaced in its parent with its |
92 |
92 |
// children. |
// children. |
93 |
93 |
virtual bool shouldSplice(SType parent, const Node *childNode) const = 0; |
virtual bool shouldSplice(SType parent, const Node *childNode) const = 0; |
File src/c/C11Language.hpp changed (mode: 100644) (index fc32fe7..3e4de87) |
... |
... |
public: |
63 |
63 |
virtual bool alwaysMatches(const Node *x) const override; |
virtual bool alwaysMatches(const Node *x) const override; |
64 |
64 |
// Checks whether parameter node (as reported by `classify()`) represents a |
// Checks whether parameter node (as reported by `classify()`) represents a |
65 |
65 |
// true parameter and not something like "no argument list". |
// true parameter and not something like "no argument list". |
66 |
|
virtual bool isPseudoParamater(const Node *x) const override; |
|
|
66 |
|
virtual bool isPseudoParameter(const Node *x) const override; |
67 |
67 |
// Checks whether child node needs to be replaced in its parent with its |
// Checks whether child node needs to be replaced in its parent with its |
68 |
68 |
// children. |
// children. |
69 |
69 |
virtual bool shouldSplice(SType parent, |
virtual bool shouldSplice(SType parent, |
File src/make/MakeLanguage.hpp changed (mode: 100644) (index 8092610..031c01b) |
... |
... |
public: |
63 |
63 |
virtual bool alwaysMatches(const Node *x) const override; |
virtual bool alwaysMatches(const Node *x) const override; |
64 |
64 |
// Checks whether parameter node (as reported by `classify()`) represents a |
// Checks whether parameter node (as reported by `classify()`) represents a |
65 |
65 |
// true parameter and not something like "no argument list". |
// true parameter and not something like "no argument list". |
66 |
|
virtual bool isPseudoParamater(const Node *x) const override; |
|
|
66 |
|
virtual bool isPseudoParameter(const Node *x) const override; |
67 |
67 |
// Checks whether child node needs to be replaced in its parent with its |
// Checks whether child node needs to be replaced in its parent with its |
68 |
68 |
// children. |
// children. |
69 |
69 |
virtual bool shouldSplice(SType parent, |
virtual bool shouldSplice(SType parent, |
File src/srcml/cxx/SrcmlCxxLanguage.hpp changed (mode: 100644) (index d582ec3..1ad4de1) |
... |
... |
public: |
64 |
64 |
virtual bool alwaysMatches(const Node *x) const override; |
virtual bool alwaysMatches(const Node *x) const override; |
65 |
65 |
// Checks whether parameter node (as reported by `classify()`) represents a |
// Checks whether parameter node (as reported by `classify()`) represents a |
66 |
66 |
// true parameter and not something like "no argument list". |
// true parameter and not something like "no argument list". |
67 |
|
virtual bool isPseudoParamater(const Node *x) const override; |
|
|
67 |
|
virtual bool isPseudoParameter(const Node *x) const override; |
68 |
68 |
// Checks whether child node needs to be replaced in its parent with its |
// Checks whether child node needs to be replaced in its parent with its |
69 |
69 |
// children. |
// children. |
70 |
70 |
virtual bool shouldSplice(SType parent, |
virtual bool shouldSplice(SType parent, |
File src/tooling/FunctionAnalyzer.cpp changed (mode: 100644) (index a618202..932edd9) |
... |
... |
FunctionAnalyzer::getParamCount(const Node *node) const |
52 |
52 |
int paramCount = 0; |
int paramCount = 0; |
53 |
53 |
for (const Node *child : node->children) { |
for (const Node *child : node->children) { |
54 |
54 |
MType mtype = lang.classify(child->stype); |
MType mtype = lang.classify(child->stype); |
55 |
|
if (mtype == MType::Parameter && !lang.isPseudoParamater(child)) { |
|
|
55 |
|
if (mtype == MType::Parameter && !lang.isPseudoParameter(child)) { |
56 |
56 |
++paramCount; |
++paramCount; |
57 |
57 |
} else if (mtype == MType::Declaration || mtype == MType::Other) { |
} else if (mtype == MType::Declaration || mtype == MType::Other) { |
58 |
58 |
paramCount += getParamCount(child); |
paramCount += getParamCount(child); |