staruml / staruml-cpp

C++ extension for StarUML
MIT License
173 stars 66 forks source link

I want to use reverse c++. but it doesn't work #12

Open KudoLayton opened 8 years ago

niklauslee commented 8 years ago

Please provide detailed information about the failure you experienced.

robdotson commented 7 years ago

There are a couple of bugs in the parser:

The 'class' type qualifier is not recognized on instance variables, or as parameters:

class foo {
    public: class foo * foo( class foo * f ) const { return f; }
};

In this case class foo * is required because there is a method named foo. This is an issue in many header only c++ packages, and is especially pernicious with forward decls, and with external subsystems like bison.

Visibility statements won't work if there is nothing in between (or if they are made in visible by the preprocessor or comments:

class foo {
protected:
    // nothing here!
public:
    virtual void bar() const;
};

That code is totally valid and should not generate an error. The empty protected: statement should just be interpreted as a null statement.