Skip to content
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

Move parser routine function pointer to lambda function #10

Open
JamesYang007 opened this issue Jan 13, 2020 · 0 comments
Open

Move parser routine function pointer to lambda function #10

JamesYang007 opened this issue Jan 13, 2020 · 0 comments

Comments

@JamesYang007
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant