Skip to content

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

@inejge

Description

@inejge

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions