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

Refactoring localization error #9

Open
epatrizio opened this issue Sep 12, 2022 · 1 comment
Open

Refactoring localization error #9

epatrizio opened this issue Sep 12, 2022 · 1 comment

Comments

@epatrizio
Copy link
Owner

Localization error (typer / compiler) implementation is not optimal, not elegant!
To avoid having long type constructors with systematic localization attribute in expressions and statements, it would probably be better to factorize ("decorate") expr and stmt types.

For example, in AST :

type ident = { id: string; id_loc: loc }

type expr = {
  expr_node: expr_node;
  expr_loc: loc;
}

type stmt = {
  stmt_node: stmt_node;
  stmt_loc: loc;
}

This refactoring seems interesting ;)

@epatrizio
Copy link
Owner Author

previous associated PR #8

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