Fixed a few warnings.

This commit is contained in:
Mike Lischke 2016-07-22 16:33:43 +02:00
parent e8766953da
commit 365e0f2df0
4 changed files with 6 additions and 4 deletions

View File

@ -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 "[]";
}

View File

@ -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);
};

View File

@ -67,6 +67,7 @@ namespace tree {
/// based upon the parser.
/// </summary>
virtual std::string toStringTree(Parser *parser) = 0;
using Tree::toStringTree;
};
} // namespace tree

View File

@ -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>