Nobuyoshi Nakada
6daec46014
ripper: refine test to show expected states
2021-12-14 20:06:51 +09:00
Shugo Maeda
7686776c05
Hash values should be omitted in Ripper results
2021-09-11 22:03:10 +09:00
Nobuyoshi Nakada
2aa6826e81
Extract the wrapped value when yydebug [Bug #18075 ]
2021-08-15 11:40:06 +09:00
Nobuyoshi Nakada
50a534a152
ripper: wrap endless method in bodystmt [Bug #17869 ]
2021-05-21 18:28:24 +09:00
Nobuyoshi Nakada
050bb06e66
ripper: assertions for rescue/ensure in method body
2021-05-21 18:28:24 +09:00
Kazuki Tsujimoto
21863470d9
Pattern matching pin operator against expression [Feature #17411 ]
...
This commit is based on the patch by @nobu.
2021-03-21 15:14:31 +09:00
Shugo Maeda
a319c04818
Fix typo [ci skip]
2021-02-19 17:27:53 +09:00
Shugo Maeda
5de38c41ae
ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644 ]
2021-02-19 16:40:29 +09:00
manga_osyo
b84b253a69
Fix Ripper with heredoc.
2021-01-17 12:58:13 +09:00
Nobuhiro IMAI
7ff0e93f96
parse.y: handle "duplicated argument name" appropriately on ripper.y
...
refs: 733ed1e184
2021-01-09 13:33:33 +09:00
Nobuyoshi Nakada
733ed1e184
ripper: fix bad label parameter handling [Bug #17425 ]
2020-12-23 09:56:35 +09:00
Nobuhiro IMAI
e33eb09b76
ripper: fix `#tok` on some error events [Bug 17345]
...
sorting alias target by event arity, and setup suitable `Elem` for error.
2020-12-19 17:32:39 +09:00
Nobuyoshi Nakada
47328ad217
Ripper: Fixed erred token on wrong alias [Bug #17345 ]
2020-12-16 21:08:33 +09:00
Nobuyoshi Nakada
e0bdd54348
Ripper: Refined error callbacks [Bug #17345 ]
2020-12-15 21:36:23 +09:00
Nobuyoshi Nakada
f5ca3ff4db
Store all kinds of syntax errors [Bug #17345 ]
2020-11-26 20:14:34 +09:00
Nobuyoshi Nakada
1df3896382
Removed a duplicate assertion
2020-11-26 20:03:38 +09:00
Nobuhiro IMAI
1800f3fa5c
Ripper.{lex,tokenize} return full tokens even if syntax error
...
yet another implements [Feature #17276 ]
2020-11-20 11:44:57 +09:00
Jeremy Evans
cd0877a93e
Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw}
...
Implements [Feature #17276 ]
2020-11-17 21:15:50 -08:00
Nobuyoshi Nakada
79b242260b
ripper: Invalid pragma value warning
2020-11-02 22:49:42 +09:00
Nobuyoshi Nakada
52c630da00
Assoc pattern matching ( #3703 )
...
[Feature #17260 ] One-line pattern matching using tASSOC
R-assignment is rejected instead.
2020-10-26 18:00:24 +09:00
Takashi Kokubun
4a7dccf44f
Add a Ripper.lex test of :on_embexpr_end
...
This is a weird use case of Ripper.lex which I'm not sure is supposed to
be maintained, so I'm adding this test so that we can easily notice such
changes.
If we change the behavior, this will break the behavior of hamlit.gem v1
and code like https://github.com/haml/haml/pull/1043 .
2020-10-19 20:56:09 -07:00
Nobuyoshi Nakada
4ed0c33d13
Prohibit setter method names in all kinds of endless methods
...
Also unwrap NODE_RIPPER to check the method name.
2020-10-12 00:40:55 +09:00
Nobuyoshi Nakada
3d8705dcfd
Drop token info for endless method definition
...
Because it does not have closing `end`.
2020-06-25 01:14:26 +09:00
Nobuyoshi Nakada
419b0596a2
[ripper] added endless method definition event tests
2020-06-25 01:14:18 +09:00
Nobuyoshi Nakada
263b941321
[ripper] fix mismatched indentations warning [Bug #16981 ]
...
The scanner location has to be set from `lex.ptok` before it is
flushed by dispatching the scanner event.
2020-06-24 19:53:14 +09:00
Nobuyoshi Nakada
7f29e34f35
[ripper] fail unless got warning as expected
2020-06-24 19:52:39 +09:00
Kazuki Tsujimoto
ddded1157a
Introduce find pattern [Feature #16828 ]
2020-06-14 09:24:36 +09:00
Jeremy Evans
f8b4340fa2
Add leading arguments support to arguments forwarding
...
The idFWD_KWREST sections may be wrong. However, the existing
idFWD_KWREST sections for ... without leading arguments are already
broken.
Implements [Feature #16378 ]
2020-06-06 17:07:11 -07:00
Nobuyoshi Nakada
1c7f5a5712
Removed unnecessary RLIMIT_AS
...
Even without this limit, these assertions almost certainly cause a
NoMemoryError by removing the fix in 72ad8595f2
.
2020-04-28 23:36:16 +09:00
Nobuyoshi Nakada
27ddb6e998
Warn also numbered parameter like parameters
...
[Feature #16433 ]
2019-12-20 01:25:34 +09:00
Nobuyoshi Nakada
9e01fcd0cb
[ripper] Fixed unique key check in pattern matching
...
Check keys
* by an internal table, instead of unstable dispatched results
* and by parsed key values, instead of escaped forms in the source
2019-11-26 22:54:35 +09:00
Nobuyoshi Nakada
26625bc33c
[ripper] Quoted label without expression must be a local variable
...
The difference from 0b8c73aa65
is to
add the result of `string_add` event to marking objects.
```C
RNODE($1)->nd_rval = add_mark_object(p, $$);
```
2019-11-25 17:42:59 +09:00
Nobuyoshi Nakada
61131edba7
Revert "[ripper] Quoted label without expression must be a local variable"
...
This reverts commit 0b8c73aa65
, which
seems breaking RVALUE consistency check.
2019-11-20 00:56:04 +09:00
Nobuyoshi Nakada
0b8c73aa65
[ripper] Quoted label without expression must be a local variable
2019-11-19 17:18:27 +09:00
Nobuyoshi Nakada
4d615a0c8f
`#@1` is no longer an embedded variable
2019-11-14 16:37:25 +09:00
Nobuyoshi Nakada
fb6a489af2
Revert "Method reference operator"
...
This reverts commit 67c5747369
.
[Feature #16275 ]
2019-11-12 17:24:48 +09:00
Nobuyoshi Nakada
62d4382877
Arguments forwarding [Feature #16253 ]
2019-10-22 02:35:43 +09:00
Nobuyoshi Nakada
33c5ad3154
Removed idNUMPARAM_0
2019-09-25 13:52:53 +09:00
Nobuyoshi Nakada
ea68bb914a
Changed numbered parameter prefix
2019-09-24 21:57:54 +09:00
Nobuyoshi Nakada
7e0f56fb3d
Name dynamically defined methods with line numbers
2019-09-13 19:48:44 +09:00
Jeremy Evans
4d64693c70
Make ripper support **nil syntax
...
The on_params hook will use :nil as the keyword rest argument.
There is a new on_nokw_param hook as well.
This fixes a type issue in the previous code, where an ID was
passed where a VALUE was the declared type. The symbol :nil is
passed instead of the id.
2019-08-30 12:39:31 -07:00
Nobuyoshi Nakada
2ed68d0ff9
Revert "Add pipeline operator [Feature #15799 ]"
...
This reverts commits:
* d365fd5a02
* d780c36624
* aa7211836b
* 043f010c28
* bb4dd7c6af05c7821d572e2592ea3d0cc748d81f
* 043f010c28
* f169043d81
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
2019-08-29 15:27:59 +09:00
Koichi Sasada
a9fd57056c
double memory limit on MJIT.
...
On test with MJIT, sometimes it fails like:
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2189967
2019-08-09 13:04:56 +09:00
Nobuyoshi Nakada
d2710ba866
Split test/ripper/test_files.rb to run in parallel
2019-07-23 05:21:41 +09:00
Nobuyoshi Nakada
9d8855b682
Added assertions for Unicode escaped CHAR scanner events
2019-07-06 18:46:00 +09:00
Nobuyoshi Nakada
f19e048d24
Do not dispatch a nil token in ripper
...
As a comment token includes the newline, so delayed newline token
just follows it should not be dispatched. [Bug #11485 ]
Co-Authored-By: Jeremy Evans <code@jeremyevans.net>
2019-07-04 15:58:47 +09:00
Nobuyoshi Nakada
8ec877d183
Add parentheses to suppress a warning
2019-06-28 17:10:18 +09:00
Nobuyoshi Nakada
3dba16a5d6
Test string content
2019-06-28 17:08:47 +09:00
Nobuyoshi Nakada
5331932cd2
Removed unused variables
2019-06-28 17:08:21 +09:00
Nobuyoshi Nakada
8d04f90da4
Fixed a variable name
2019-06-28 17:07:17 +09:00