| Age | Commit message (Collapse) | Author |
|
|
|
https://github.com/ruby/yarp/commit/f57a6066b5
|
|
https://github.com/ruby/yarp/commit/fd7c44f13f
|
|
* [YARP] Reject numbered parameters in block parameters
* [YARP] Do not allow BEGIN except the toplevel
---------
Co-authored-by: Haldun Bayhantopcu <haldun@github.com>
|
|
https://github.com/ruby/yarp/commit/e855bf415c
|
|
https://github.com/ruby/yarp/commit/5022b51db2
|
|
https://github.com/ruby/yarp/commit/fe208302e5
|
|
https://github.com/ruby/yarp/commit/1ad7fba5ef
|
|
https://github.com/ruby/yarp/commit/8bffb8a762
|
|
https://github.com/ruby/yarp/commit/4ba6d5ca70
|
|
https://github.com/ruby/yarp/commit/35da3d1a4c
|
|
https://github.com/ruby/yarp/commit/9222faa1c6
|
|
https://github.com/ruby/yarp/commit/a8b54e8ed0
|
|
variable
(https://github.com/ruby/yarp/pull/1521)
https://github.com/ruby/yarp/commit/3ec0699622
|
|
https://github.com/ruby/yarp/commit/5fd4d3b89a
|
|
https://github.com/ruby/yarp/commit/65b536ba12
|
|
https://github.com/ruby/yarp/commit/4a30c69051
|
|
This simplifies how we handle multi-targets, and also fixes a bug we
had where for loops were always getting multi-targets, even when there
was only a single target.
https://github.com/ruby/yarp/commit/31eb8b7ad5
|
|
If the read_name is invalid, we shouldn't try to set a write name.
https://github.com/ruby/yarp/commit/06881c8ca7
|
|
https://github.com/ruby/yarp/commit/93bec2c173
|
|
https://github.com/ruby/yarp/commit/d3a852dac2
|
|
https://github.com/ruby/yarp/commit/09248a1f9e
|
|
https://github.com/ruby/yarp/commit/22c800eab1
|
|
https://github.com/ruby/yarp/commit/eaaebc17c8
|
|
* See https://github.com/ruby/yarp/issues/1436
https://github.com/ruby/yarp/commit/6f4e9ff940
|
|
https://github.com/ruby/yarp/commit/45dd046b83
|
|
message IDs
The parser now passes around `yp_diagnostic_id_t` for diagnostic
messages instead of character strings, and we rely on the function
`diagnostic_message()` to resolve that to a string.
In addition, many messages were edited so that the parser expresses
coordinate ideas in similar form [1] using consistent voice and
typographic conventions.
Closes https://github.com/ruby/yarp/pull/1379, and makes progress on #941.
[1] Strunk & White rule 19
https://github.com/ruby/yarp/commit/0b6dd85bf1
|
|
https://github.com/ruby/yarp/commit/6b2421ce1b
|
|
https://github.com/ruby/yarp/commit/a6fdb8aae9
|
|
https://github.com/ruby/yarp/commit/5e1a8fbc54
|
|
https://github.com/ruby/yarp/commit/d2d4f25a23
|
|
https://github.com/ruby/yarp/commit/26105f0b58
|
|
https://github.com/ruby/yarp/commit/2cd9a67150
|
|
(https://github.com/ruby/yarp/pull/1409)
https://github.com/ruby/yarp/commit/0a11ec579f
|
|
ClassNode/ModuleNode
https://github.com/ruby/yarp/commit/8f87686e9c
|
|
https://github.com/ruby/yarp/commit/d7eaa89bc3
|
|
https://github.com/ruby/yarp/commit/b48067b067
|
|
Closes https://github.com/ruby/yarp/pull/1367
https://github.com/ruby/yarp/commit/b1ab54f526
|
|
Essentially, this change updates `yp_unescape_calculate_difference` to
not create syntax errors, and we rely entirely on
`yp_unescape_manipulate_string` to report syntax errors.
To do that, this PR adds another (!) parameter to `unescape`:
`yp_list_t *error_list`. When present, `unescape` reports syntax
errors (and otherwise does not).
However, an edge case that needed to be addressed is reporting syntax
errors in this case:
?\u{1234 2345}
In a string context, it's possible to have multiple codepoints by
doing something like `"\u{1234 2345}"`; however, in the character
literal context, this is a syntax error -- only a single codepoint is
allowed.
Unfortunately, when `yp_unescape_manipulate_string` is called, there's
nothing to indicate that we are in a "character literal" context and
that only a single codepoint is valid.
To make this work, this PR:
- introduces a new static utility function in yarp.c,
`yp_char_literal_node_create_and_unescape`, which is called when
we're parsing `YP_TOKEN_CHARACTER_LITERAL`
- introduces a new (unexported) function,
`yp_unescape_manipulate_char_literal` which does the same thing as
`yp_unescape_manipulate_string` but tells `unescape` that only a
single codepoint is expected
https://github.com/ruby/yarp/commit/f6a65840b5
|
|
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, GlobalVariableWriteNode.
* Fixes desugaring of local variable with operators.
https://github.com/ruby/yarp/commit/9a66737775
|
|
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, LocalVariableWriteNode.
* Fixes desugaring of global variable with operators.
https://github.com/ruby/yarp/commit/fb5a53fc0b
|
|
file
(https://github.com/ruby/yarp/pull/1371)
* refactor: move EOF check into yp_unescape_calculate_difference
parser_lex is a bit more readable when we can rely on that behavior
* fix: octal and hex digits at the end of a file
Previously this resulted in invalid memory access.
* fix: unicode strings at the end of a file
Previously this resulted in invalid memory access.
* Unterminated curly-bracket unicode is a syntax error
https://github.com/ruby/yarp/commit/21cf11acb5
|
|
https://github.com/ruby/yarp/commit/440cf93a70
|
|
Previously this resulted in invalid memory access as well as a
cascading failed assertion:
src/enc/yp_unicode.c:2224: yp_utf_8_codepoint: Assertion `n >= 1' failed.
Found by the fuzzer.
https://github.com/ruby/yarp/commit/a34c534440
|
|
This should make it easier on the sync to determine what changed
and hopefully result in fewer merge conflicts that have to be
manually resolved.
https://github.com/ruby/yarp/commit/17d82afbfc
|
|
https://github.com/ruby/yarp/commit/7984e4ddc7
|
|
This should hopefully make it easier to compile these nodes, and
also for static analysis tools for having a quick label.
https://github.com/ruby/yarp/commit/f086662144
|
|
Previously this snippet would track the same newline twice, leading to
a failed assertion in yp_newline_list_append.
https://github.com/ruby/yarp/commit/1d3fe19a94
|
|
Introduce three new inline helper functions:
- `match_line_ending`
- `match_line_ending_at`
- `match_line_ending_addr`
These functions are similar in signature to the `peek*` functions, but
return the length of the line ending being inspected (or 0 if no line
ending was found).
These functions are then used to simplify how we're detecting line
endings throughout "src/yarp.c".
Also:
- test coverage backfilled for `__END__` comments with CRLF line endings.
- error message for invalid `%` tokens updated to not include
the potential line endings.
- some small refactorings for readability along the way
https://github.com/ruby/yarp/commit/a00067386d
|
|
Previously this failed an assertion and aborted.
https://github.com/ruby/yarp/commit/a037d942a8
|