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

Operator grouping with string inside a function triggers a syntax error #22

Closed
0liv1er opened this issue Nov 6, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@0liv1er
Copy link

0liv1er commented Nov 6, 2023

Concatenating the result of an operator group (...) together with a string inside a function triggers a syntax error.

function f(s) {
        return s
}
BEGIN{
        foo = ""
        print f("hello"(foo=="bar" ? "world" : ""))
        print f("hello" (foo=="bar" ? "world" : ""))
        print f((foo=="bar" ? "world" : "")"hello")
}

Note that the error is triggered only if there is no space between the string and the grouping operator, and the string is first.

@Beaglefoot Beaglefoot self-assigned this Nov 6, 2023
@Beaglefoot Beaglefoot added the bug Something isn't working label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants