-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix a typo of the context name of asm options #4660
Fix a typo of the context name of asm options #4660
Conversation
@@ -4709,7 +4709,7 @@ module Crystal | |||
intel = false | |||
while true | |||
location = @token.location | |||
option = parse_string_without_interpolation("asm clobber") | |||
option = parse_string_without_interpolation("asm option") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "options" instead of option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which sounds better error message: interpolation not allowed in asm option
or interpolation not allowed in asm options
? I'm not native speaker, so I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say the latter, there are multiple options allowed right? so it's plural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asm("nop" : "in1"(foo1), "in2"(foo2)
: "out1"(bar1), "out2"(bar2)
: "clobber1", "clobber2"
: "volatile", "intel")
# each of ^------ and ^--- is an asm option string.
However "volatile, intel"
is invalid asm option string. Asm option string can be appeared multiple times with separator, but parse_string_without_interpolation
parses only a string literal containing an asm option. I think keeping singular is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I agree in this case that singular sounds right here.
Thank you! |
I think this is a failure of copy-and-pasting.