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

add const keyword #92

Open
Aavild opened this issue Jun 25, 2023 · 0 comments
Open

add const keyword #92

Aavild opened this issue Jun 25, 2023 · 0 comments
Labels
enhancement New feature or request LowPrio Low Priority

Comments

@Aavild
Copy link
Collaborator

Aavild commented Jun 25, 2023

example: const int a = 7
typecheck should treat it similarily to a normal var
codegen should use the value rather than the variable. consts will be slightly more efficient since rather than looking up the variables value, the value is already inserted at interpreation/runtime. The ExprEvaluator should not be allowed to use variables, except if they're constants

@Aavild Aavild added enhancement New feature or request LowPrio Low Priority labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LowPrio Low Priority
Projects
None yet
Development

No branches or pull requests

1 participant