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

Reject reserved words #613

Merged
merged 5 commits into from Jun 12, 2023
Merged

Reject reserved words #613

merged 5 commits into from Jun 12, 2023

Conversation

ivojawer
Copy link
Collaborator

@ivojawer ivojawer commented Jun 7, 2023

fixes #429

  • Checks for keywords in
    • Arguments
    • Selector
    • Variable (instance, parameters, temporary) names
  • Changed parameters named 'register' to 'reg'
  • Changed CogSimStackEntry Selector + accessors named register to registerr

@ivojawer ivojawer self-assigned this Jun 7, 2023
@ivojawer ivojawer marked this pull request as draft June 7, 2023 17:55
@ivojawer ivojawer marked this pull request as ready for review June 8, 2023 16:59
Copy link
Member

@guillep guillep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@guillep
Copy link
Member

guillep commented Jun 9, 2023

4 tests are broken, related to this change

imagen

Message not understood: CogSimStackEntry >> #register

@PalumboN PalumboN added the slang label Jun 12, 2023
Copy link
Collaborator

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceeeeeeee 🤩

Big renames

Comment on lines +130 to +132
(CCodeGenerator reservedWords includes:
aString) ifTrue: [
TranslationError signal: aString , ' is a reserved word' ].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, this is polémico. Do we want this validation in the setter? I was thinking to have this validation before the next transformation. But I don't know how it is used...

Also, we can have a validateReservedWords method as in TMethod.

@PalumboN
Copy link
Collaborator

Tests passing, ready to merge

@guillep
Copy link
Member

guillep commented Jun 12, 2023

Thanks @ivojawer !!

@guillep guillep merged commit 6fe40da into pharo-12 Jun 12, 2023
1 of 2 checks passed
@guillep guillep deleted the reject-reserved-words branch June 12, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants