Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[awk]: fails to recognize some escape sequences in strings #217

Closed
inejge opened this issue Sep 18, 2024 · 0 comments · Fixed by #222
Closed

[awk]: fails to recognize some escape sequences in strings #217

inejge opened this issue Sep 18, 2024 · 0 comments · Fixed by #222
Labels
bug Something isn't working

Comments

@inejge
Copy link

inejge commented Sep 18, 2024

Tested with 7c928a3. The following script:

$1 == "\\"

will produce the error:

 --> /tmp/s.awk:1:7
  |
1 | $1 == "\\"
  |       ^---
  |
  = expected string, ere, number, func_name, builtin_function_call, pre_inc, pre_dec, not, unary_plus, negate, or lvalue

Likewise, the script:

$1 == "\""

will produce:

 --> 1:7
  |
1 | $1 == "\""
  |       ^--^
  |
  = invalid escape sequence

Interestingly, the error for the second script fails to report the script name (it was /tmp/s.awk in both cases.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
1 participant