ruby/prism
Koichi ITO 5fa28ce015 [ruby/prism] Warn `&` interpreted as argument prefix
This PR makes `Prism` warn `&` interpreted as argument prefix.
This carries a similar meaning to the following Ruby warning:

```console
$ ruby -cwe "foo &bar"
-e:1: warning: `&' interpreted as argument prefix
Syntax OK
```

Previously, it did not issue a warning:

```console
$ bundle exec ruby -rprism -ve "p Prism.parse('foo &bar').warnings"
ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22]
[]
```

From now on, it will issue a warning similar to Ruby's:

```console
$ bundle exec ruby -rprism -ve "p Prism.parse('foo &bar').warnings"
ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22]
[#<Prism::ParseWarning @type=:ambiguous_prefix_amp @message="ambiguous `&` has been interpreted as an argument prefix"
@location=#<Prism::Location @start_offset=4 @length=1 start_line=1> @level=:verbose>]
```

https://github.com/ruby/prism/commit/312f99cd1e
2024-03-13 12:38:45 +00:00
..
templates [ruby/prism] Warn `&` interpreted as argument prefix 2024-03-13 12:38:45 +00:00
util Define `ssize_t` on mswin build 2024-03-12 14:49:25 +09:00
api_pack.c [ruby/prism] Fix up lint 2023-11-01 13:10:29 -04:00
config.yml [ruby/prism] Warn `&` interpreted as argument prefix 2024-03-13 12:38:45 +00:00
defines.h [ruby/prism] Only define xallocator when not defined 2024-03-04 16:49:14 +00:00
encoding.c [ruby/prism] Triple-check prism encodings 2024-02-26 18:29:00 +00:00
encoding.h [ruby/prism] Add initial implementation of `Regexp` validation. 2024-03-08 18:48:54 +00:00
extension.c [ruby/prism] Static literals inspect 2024-03-12 03:30:50 +00:00
extension.h [ruby/prism] Shared integer parsing logic 2024-03-07 18:02:33 -05:00
node.h [ruby/prism] Provide API for visiting in C 2024-03-04 20:24:20 +00:00
options.c [ruby/prism] Support offset 2024-03-11 14:49:23 +00:00
options.h [ruby/prism] Support offset 2024-03-11 14:49:23 +00:00
pack.c
pack.h [ruby/prism] Last remaining missing C comments 2023-11-01 13:10:29 -04:00
parser.h [ruby/prism] Simplify the regular expression ASCII-only check 2024-03-08 19:18:42 +00:00
prettyprint.h [ruby/prism] Last remaining missing C comments 2023-11-01 13:10:29 -04:00
prism.c [ruby/prism] Warn `&` interpreted as argument prefix 2024-03-13 12:38:45 +00:00
prism.h [ruby/prism] Remove restrict to fix windows 2015 2024-03-07 21:23:18 +00:00
regexp.c [ruby/prism] Account for encoding in regexp named captures 2024-02-18 21:42:09 +00:00
regexp.h [ruby/prism] Correctly pass around const pm_encoding_t * 2023-11-30 21:37:56 -05:00
static_literals.c [ruby/prism] Static literals inspect 2024-03-12 03:30:50 +00:00
static_literals.h [ruby/prism] Static literals inspect 2024-03-12 03:30:50 +00:00
version.h [PRISM] Sync prism version bump 2024-02-15 15:50:04 -05:00