forked from jasder/antlr
Fixed a few warnings.
This commit is contained in:
parent
e8766953da
commit
365e0f2df0
|
@ -78,7 +78,7 @@ bool ArrayPredictionContext::operator == (PredictionContext const& o) const {
|
|||
antlrcpp::Arrays::equals(parents, other->parents);
|
||||
}
|
||||
|
||||
std::string ArrayPredictionContext::toString() {
|
||||
std::string ArrayPredictionContext::toString() const {
|
||||
if (isEmpty()) {
|
||||
return "[]";
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace atn {
|
|||
virtual int getReturnState(size_t index) const override;
|
||||
bool operator == (const PredictionContext &o) const override;
|
||||
|
||||
virtual std::string toString();
|
||||
virtual std::string toString() const override;
|
||||
private:
|
||||
std::vector<Ref<PredictionContext>> makeRef(const std::vector<std::weak_ptr<PredictionContext>> &input);
|
||||
};
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace tree {
|
|||
/// based upon the parser.
|
||||
/// </summary>
|
||||
virtual std::string toStringTree(Parser *parser) = 0;
|
||||
using Tree::toStringTree;
|
||||
};
|
||||
|
||||
} // namespace tree
|
||||
|
|
|
@ -45,13 +45,14 @@ namespace tree {
|
|||
/// operations with no return type. </param>
|
||||
template<typename T>
|
||||
class ANTLR4CPP_PUBLIC ParseTreeVisitor {
|
||||
|
||||
public:
|
||||
virtual ~ParseTreeVisitor() {}
|
||||
|
||||
/// <summary>
|
||||
/// Visit a parse tree, and return a user-defined result of the operation.
|
||||
/// </summary>
|
||||
/// <param name="tree"> The <seealso cref="ParseTree"/> to visit. </param>
|
||||
/// <returns> The result of visiting the parse tree. </returns>
|
||||
public:
|
||||
virtual T* visit(ParseTree *tree) = 0;
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue