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

Update variable name substitution logic #157

Merged
merged 1 commit into from Mar 5, 2019

Conversation

rahul-malik
Copy link
Collaborator

  • Account for names that would conflict with ARC (prefix is "alloc",
    "new", ... )
  • Replace characters with text equivalents ( "+" -> "plus", "%" ->
    "percent", ...)

TODO: This is a shorter term patch and we should strive to have a more
robust substitution policy across languages.

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@rahul-malik Maybe would be good to add a unit test / example case though that catches this cases?

  - Account for names that would conflict with ARC (prefix is "alloc",
  "new", ... )
  - Add test fixture for to guarantee compilation
@rahul-malik
Copy link
Collaborator Author

@maicki - Updated:

  • Added a test fixture for these cases in Examples
  • Updating rendering code to be stable (order of alloc , copy, ... properties weren't stable in header before)
  • Removed code around +, %, etc since I think we should not treat those as valid schema property names

@rahul-malik
Copy link
Collaborator Author

Fixes #138

@rahul-malik rahul-malik merged commit 4372837 into master Mar 5, 2019
@jparise jparise deleted the rmalik-variable-sub-fixes branch January 3, 2020 22:15
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

Successfully merging this pull request may close these issues.

None yet

2 participants