Skip to content

Move parser routine function pointer to lambda function #10

@JamesYang007

Description

@JamesYang007

Currently, the parser logic uses routine_t = void (*)(const token_t&) which forces compiler to generate functions for every routine even when they can be inlined.

Proposed Solution:

The ideal situation is to create lambda functions (or functors, more generally) for these routines which get passed around. The type routine_t will be defined as std::function<void(const token_t&)>. Most of the existing code can remain.

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