Skip to content

Stop lib/fex from printing messages directly to stdout #804

Description

@GriffinRichards

lib/fex/lexer and lib/fex/parser have some usage of std::cout for warnings and diagnostic information. This information (where relevant) should instead be passed up to the caller to be logged. Irrelevant messages should be ignored/removed, or converted to Q_ASSERTs.

As an example, Porymap currently fails to parse these two directives in expansion's headers.h file, because it doesn't understand the !, ?, or : tokens.

#define SWAP_PAL(x) ((x) < NUM_PALS_IN_PRIMARY ? 1 << (x) : 1 << ((x) - NUM_PALS_IN_PRIMARY))
#if !IS_FRLG

Porymap should either be updated to resolve these, or record these warnings internally. The warnings should only be logged if these are needed to resolve something (this is how parseutil.cpp handles tokens it can't resolve)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions