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

Provide read access into lexer settings #285

Open
eclarkso opened this issue Dec 6, 2023 · 0 comments
Open

Provide read access into lexer settings #285

eclarkso opened this issue Dec 6, 2023 · 0 comments

Comments

@eclarkso
Copy link

eclarkso commented Dec 6, 2023

In some circumstances it might be useful for Environment to provide getters to the lexer_config, e.g.,

const std::string & Environment::get_statement_open() const
{
   return lexer_config.statement_open;
}
// etc

For the time being, I have forked inja and made all members protected so that I can subclass Environment in my own code, but it would be nice to not have to maintain that fork... unless I'm missing another way of effecting the same goal (aside from storing the settings alongside the environment, which seems duplicative and rickety).

If I'm not wrong about that, could either:

  • the *_config objects be made protected so subclasses could access them and provide their own getters?
  • *_config field getters be added to Environment?

ETA: my realization I forked inja some time ago to change the member visibility

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