New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'static' and 'throw' C++ keywords not colored (Origin: bugzilla #722112) #5400

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.6 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2014-01-13 15:39:39 +0000, Gerard Torrent wrote:

In the HTML output of the given code (see below), the 'static' keyword preceding methods check(), push(), isValue(), getFunctionName() is colored in black when the green color is expected. The 'throw' keyword in methods next() and check() also lacks coloration (expected color = orange).

namespace XXX {

class Expr
{

... omited

private:

//! Check if the current token is a function
static bool isFunction(const char *, token *, char **);
//! Check if the current token is a constant
static bool isConstant(const char *, token *, char **);
//! Check if the current token is a operator
static bool isOperator(const char *, token *, char **);
//! Check if the current token is a number
static bool isNumber(const char *, token *, char **);
//! Check if the current token is a variable
static bool isVariable(const char *, token *, char **, std::vector<variable> &);
//! Parse the next token
static void next(const char *, token *, char **, std::vector<variable> &) throw(Exception);
//! Syntax checking
static void check(token *, token *) throw(Exception);
//! Push token to RPN instructions pile
static void push(token &, std::vector<token> &tokens);
//! Check if is a value (number or constant or variable)
static bool isValue(TokenType type);
//! Returns function name by ptr value
static const char *getFunctionName(const void *ptr);
//! Constructor (public constructor not allowed)
Expr() { }

public:

//! Compile an expression
static void compile(const char *, std::vector<variable> &variables, std::vector<token> &tokens) throw(Exception);
//! Compile an expression
static void compile(const std::string &, std::vector<variable> &variables, std::vector<token> &tokens) throw(Exception);
//! Link an expression
static int link(std::vector<token> &tokens, const std::vector<variable> &variables) throw(Exception);
//! Evalue an expression
static double eval(const std::vector<token> &tokens, size_t maxsize) throw(Exception);
//! Evalue an expression
static double eval(const token *tok, size_t maxsize) throw(Exception);
//! trace RPN stack to stdout
static void debug(const std::vector<token> &tokens, const std::vector<variable> &variables);

... omited

};

}

On 2014-01-13 15:48:08 +0000, Gerard Torrent wrote:

Seems that both problems are related with the combination of:

  • last argument argument have no name
  • the 'throw' keyword in declaration

On 2014-02-16 13:56:14 +0000, albert wrote:

I tried to reproduce the problem with the above example and setting SOURCE_BROWSER to YES in a further default Doxyfile, but I see all words 'static' and 'throw' in the right color.

Please supply a (small) self-contained example source+config file in a zip or tar) showing the problem.

On 2014-02-16 18:24:37 +0000, Gerard Torrent wrote:

Created attachment 269319
src + config + image for bug 722112

PNG image highlights the reported problems.

On 2014-02-16 18:37:07 +0000, Gerard Torrent wrote:

Comment on attachment 269319
src + config + image for bug 722112

On the config file set the 2 given files in the INPUT.

On 2014-02-19 19:19:30 +0000, albert wrote:

Created attachment 269727
Smaller example showing the base of the problem

I did some investigations but was not able to create a solution as I'm not sure about possible side effects. I've created a smaller example showing the problem.
It looks like there are a number of interfering problems in code.l.

  • setting and resetting of being inside a body (g_insideBody) a.o. due to the struct definition. Question is should a class, namespace set g_insideBody?
  • different handling of *) and *x) (lines 2958 and 2964 in code.l)

On 2014-02-19 19:22:11 +0000, albert wrote:

(In reply to comment # 5)

Created an attachment (id=269727) [details]
Smaller example showing the base of the problem

I did some investigations but was not able to create a solution as I'm not sure
about possible side effects. I've created a smaller example showing the
problem.
It looks like there are a number of interfering problems in code.l.

  • setting and resetting of being inside a body (g_insideBody) a.o. due to the
    struct definition. Question is should a class, namespace set g_insideBody?
  • different handling of *) and *x) (lines 2958 and 2964 in code.l)

Small note smaller example colors the word throw, when removing the x in both routine definitions the last definition is not colored.

On 2016-09-11 16:50:26 +0000, albert wrote:

I've just pushed a proposed patch to github (pull request 521)

On 2016-10-02 16:03:04 +0000, albert wrote:

Source code has been integrated in master on github.

On 2016-12-29 18:46:02 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.13. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment