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

Expression visitor should be independent of the generated language #481

Open
itsdani opened this issue Nov 5, 2015 · 1 comment
Open

Comments

@itsdani
Copy link
Contributor

itsdani commented Nov 5, 2015

Currently the ExpressionVisitor (and the snippet compiler) contains assumptions about the language of the generated code, but it should be independent of it.

Examples

  • it is assumed that assignment to a variable is always in the variable = value form. Because of this assumption we have to know on the snippetcompiler level if we are assigning to a pointer or a value - which is another c++ dependency
  • the c++ specific nullptr (or the c++ specific TypeConverter) is used in null expressions
@itsdani
Copy link
Contributor Author

itsdani commented Nov 5, 2015

The StatementVisitor is also c++ dependent, as it contains

  • c++ keywords like break, return, if, while, switch, case, default
  • semicolons and curly braces

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

No branches or pull requests

1 participant