aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/DocStringAnalyser.h
blob: bfc8befce5486814c64313a82825ca43c6b938ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
    This file is part of solidity.

    solidity is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    solidity is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with solidity.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @author Christian <c@ethdev.com>
 * @date 2015
 * Parses and analyses the doc strings.
 * Stores the parsing results in the AST annotations and reports errors.
 */

#pragma once

#include <libsolidity/ast/ASTVisitor.h>

namespace dev
{
namespace solidity
{

/**
 * Parses and analyses the doc strings.
 * Stores the parsing results in the AST annotations and reports errors.
 */
class DocStringAnalyser: private ASTConstVisitor
{
public:
    DocStringAnalyser(ErrorList& _errors): m_errors(_errors) {}
    bool analyseDocStrings(SourceUnit const& _sourceUnit);

private:
    virtual bool visit(ContractDefinition const& _contract) override;
    virtual bool visit(FunctionDefinition const& _function) override;
    virtual bool visit(ModifierDefinition const& _modifier) override;
    virtual bool visit(EventDefinition const& _event) override;

    virtual bool visitNode(ASTNode const&) override;

    void handleCallable(
        CallableDeclaration const& _callable,
        Documented const& _node,
        DocumentedAnnotation& _annotation
    );

    void parseDocStrings(
        Documented const& _node,
        DocumentedAnnotation& _annotation,
        std::set<std::string> const& _validTags,
        std::string const& _nodeName
    );

    void appendError(std::string const& _description);

    bool m_errorOccured = false;
    ErrorList& m_errors;
};

}
}
0.48Volker Stolz2005-11-142-6/+4 * Assign a new maintainerHerve Quiroz2005-11-141-1/+1 * - Update to 1.2.3Herve Quiroz2005-11-143-45/+148 * Unbreak build with cairo 1.0.Alexander Nedotsukov2005-11-063-5/+2463 * Chase cairo shared library update, bump the PORTREVISION.Jeremy Messenger2005-11-061-2/+2 * Remove expired portsKris Kennaway2005-11-0517-4372/+0 * Bump PORTREVISION to chase the glib20 shared library update.Joe Marcus Clarke2005-11-059-5/+9 * Update to 3.0-rc4 release.Alex Dupre2005-11-032-5/+7 * Commons Codec provides implementations of common encoders and decodersAlex Dupre2005-11-035-0/+76 * . Avoid an infinite loop by ignoring JAVA_HOME if its set to the locationGreg Lewis2005-11-032-8/+11 * . Update to 1.4.2_10.Greg Lewis2005-11-023-4/+6 * Update to 3.2.1Herve Quiroz2005-11-012-7/+7 * Add %%JAVA_OS%% and %%JAVA_VERSION%% to the list of substitutionsHerve Quiroz2005-10-301-0/+2 * Fix pkg-plist from last upgrade.Eric Anholt2005-10-241-0/+4 * New style bsd.java.mk.Norikatsu Shigemura2005-10-231-1/+2 * . Update to 3.0.0.Greg Lewis2005-10-223-135/+286 * . Minor clean up (removed an unused variable, white space).Greg Lewis2005-10-221-5/+3 * . Update to 1.13.0.Greg Lewis2005-10-223-8/+8 * . Update the required Java version.Greg Lewis2005-10-202-23/+26 * . Update to 4.0.3.Greg Lewis2005-10-204-6/+6 * . Update to 1.30.Greg Lewis2005-10-193-25/+28 * Fix javavmwrapper support added in last commit: the launcher now enforcesHerve Quiroz2005-10-181-1/+1 * Update to 1.1.6. Tested on i386 and amd64 -- only one regression test failure,Eric Anholt2005-10-164-20/+26 * Update to 3.1RC2.Norikatsu Shigemura2005-10-153-1854/+21 * Add eclipse-webtools 0.7, webtools for eclipse.Norikatsu Shigemura2005-10-154-0/+53 * Update to 1.1.1.Norikatsu Shigemura2005-10-153-375/+14 * . Update to 1.3.3 (missed in the last commit somehow).Greg Lewis2005-10-141-2/+2 * . Update to 1.3.3.Greg Lewis2005-10-141-6/+6 * . Bump PORTREVISION for the last two fixes.Greg Lewis2005-10-132-0/+2 * . Switch to using XToolkit by default. According toGreg Lewis2005-10-134-0/+68 * . Fix javaws.Greg Lewis2005-10-136-0/+108 * . Fix javaws.Greg Lewis2005-10-132-1/+16 * . No need for ${MKDIR} ${JAVAJARDIR}, its been automatically createdGreg Lewis2005-10-116-6/+0 * Update maintainer's email address.Mark Linimon2005-10-103-3/+3 * Reset bouncing maintainer addresses.Mark Linimon2005-10-102-2/+2 * Pacify distfile survey.Mark Linimon2005-10-101-1/+1 * Update to 3.1.1.Norikatsu Shigemura2005-10-104-2436/+491 * Update to 1.12.3.Norikatsu Shigemura2005-10-092-3/+3 * Update to 3.1.1.Norikatsu Shigemura2005-10-098-144/+71 * Update to 1.1.0.1 and unBROKEN(fix incomplete pkg-plist).Norikatsu Shigemura2005-10-093-902/+15 * Update to 3.1.1.Norikatsu Shigemura2005-10-093-81/+11 * Update to 2.1.1.Norikatsu Shigemura2005-10-093-906/+9 * Update master site.Archie Cobbs2005-10-081-1/+2 * Update to 3.2.0Herve Quiroz2005-10-082-7/+15 * Turn this one over to the mailing list. Note: this port has already passedMark Linimon2005-10-011-1/+1 * . Update to 2.2.Greg Lewis2005-09-305-758/+899 * . Update to 1.4.2_09.Greg Lewis2005-09-293-5/+5 * o Fix build error with WITH_MOZILA != mozilla.Norikatsu Shigemura2005-09-281-6/+9 * . Include header files from the JDK that was just built, not from theGreg Lewis2005-09-272-0/+34 * Mark BROKEN and set an EXPIRATION_DATE.Tilman Keskinoz2005-09-271-0/+4 * Mark as BROKEN (unfetchable) and set an EXPIRATION_DATETilman Keskinoz2005-09-271-0/+4 * . Fix RUN_DEPENDS (JAVAJARDIR -> JAVALIBDIR).Greg Lewis2005-09-272-86/+36 * . Quieten portlint:Greg Lewis2005-09-271-6/+5 * . Update the download URL.Greg Lewis2005-09-271-1/+1 * The upstream maintainer has included versioned tarballs on their own websiteTilman Keskinoz2005-09-271-2/+1 * - upgrade to 2.3.5Pete Fritchman2005-09-263-98/+119 * Fix build error by wrong gtk libraries.Norikatsu Shigemura2005-09-252-0/+61 * . Update to 1.5.0_05.Greg Lewis2005-09-246-20/+38 * Update to 0.9.9Herve Quiroz2005-09-222-3/+3 * . Update to patchset 2:Greg Lewis2005-09-2138-1488/+182 * . Update to 2.0b4.Greg Lewis2005-09-213-4/+5 * . Update the URL where the documentation can be downloaded.Greg Lewis2005-09-201-2/+1 * . Update to 1.29.Greg Lewis2005-09-154-768/+53 * . Fix packing list (add @dirrm forgotten in my last commit).Greg Lewis2005-09-151-0/+1 * . Update to 20050328.Greg Lewis2005-09-154-26/+15 * Mark for deprecation. The distfile that is currently in the port is overMark Linimon2005-09-151-0/+2 * . Fix a typo in the COMMENT.Greg Lewis2005-09-151-1/+1 * Fix build error WITH_MOTIF.Norikatsu Shigemura2005-09-142-2/+18 * . Placate portlint and help tools such as 'make index' which expect theGreg Lewis2005-09-121-1/+1 * . Update to 3.0.0.Greg Lewis2005-09-123-625/+8 * . Fix compilation after the recent nspr split from mozilla/firefox.Greg Lewis2005-09-093-63/+2 * . Force the Client VM when dumping the shared archive since you can'tGreg Lewis2005-09-062-2/+2 * . Tell the user all the files they will need up front, instead of tellingGreg Lewis2005-09-051-23/+28 * . Generate the class data shared archive during post-install to speedGreg Lewis2005-09-044-22/+36 * . Use ${PTHREAD_LIBS} when compiling the testos programme rather thanGreg Lewis2005-09-041-7/+1 * . Tell the user all the files they will need up front, instead of tellingGreg Lewis2005-09-031-24/+29 * . Respect NOPORTDOCS.Greg Lewis2005-09-032-3/+5 * BROKEN: UnfetchableKris Kennaway2005-08-311-0/+2 * - Update to 11.a [1]Herve Quiroz2005-08-303-39/+19 * - fix build on 4.x: include missing headerVolker Stolz2005-08-293-15/+14 * Change MAINTAINER from java@ to freebsd-eclipse@.Norikatsu Shigemura2005-08-2814-14/+14