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

put keyword param names in backticks #103

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Conversation

stevenbrix
Copy link
Collaborator

@stevenbrix stevenbrix commented Oct 18, 2023

NOTE: please ignore the whitespace, not sure how/why but i have something running on my machine which is making these changes that i can't undo (unless i edit with notepad). they are technically correct, so going to just leave them in.

In the Files Changed tab click on the little ⚙️ icon and select "Hide Whitespace"

Description

we currently only put property names in backticks. this puts param names in backticks as well

majority of complexity comes from the fact that a lot of times we create local parameters prefixed with an _, for example:

let _extension = HString(`extension`)

Changes

  1. added helper function in helpers.h for creating the local parameter name, via removing the backticks if needed
  2. Had to update two major callsites in code_writers.h:
    • write_convert_to_abi_arg
    • write_local_param_wrappers:

Fixes WIN-896

@stevenbrix stevenbrix requested a review from a team as a code owner October 18, 2023 19:20
@linear
Copy link

linear bot commented Oct 18, 2023

@tristanlabelle
Copy link
Contributor

Whitespace: you have this on your machine. We reverted this change as it was a little aggressive when changing existing code, although the end result is desirable.

tests/test_component/cpp/Keywords.idl Outdated Show resolved Hide resolved
@stevenbrix stevenbrix merged commit a84ef91 into main Oct 18, 2023
1 check passed
@stevenbrix stevenbrix deleted the steve/put_params_in_backticks branch October 18, 2023 20:36
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.

2 participants