summaryrefslogtreecommitdiff
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* parse.y: hoisted out new_nil_atNobuyoshi Nakada2020-03-111-41/+17
| | | | new_nil_at: create NEW_NIL node with zero-width location.
* parse.y: unified kwrest and no-kwrestNobuyoshi Nakada2020-03-111-22/+14
|
* Renamed `lex_flags` as `lex_context`Nobuyoshi Nakada2020-03-051-49/+49
|
* Preserve `kwarg` flag and fix up f5c904c2a9Nobuyoshi Nakada2020-03-031-0/+2
|
* Reduced parser stack usage by merging non-result actionsNobuyoshi Nakada2020-03-021-14/+14
|
* Packed stacked bit flags into one structNobuyoshi Nakada2020-03-021-45/+51
|
* Allow newlines inside braced patternNobuyoshi Nakada2020-03-021-2/+10
|
* Allow trailing comma in hash patternKazuki Tsujimoto2020-03-011-0/+4
|
* Named `tLABEL` tokenNobuyoshi Nakada2020-02-291-1/+1
|
* Refined argument nameNobuyoshi Nakada2020-02-281-3/+3
|
* Fixed duplicated warningNobuyoshi Nakada2020-02-101-6/+0
| | | | | As `command_rhs` is always a "value expression", `command_asgn` does not need the same check.
* Do not warn CR inside string literalNobuyoshi Nakada2020-02-041-6/+8
|
* Make RATIONAL_SET_{NUM,DEN} static inline functionsKenta Murata2020-01-171-1/+1
|
* Separate numbered parameter scope in evalNobuyoshi Nakada2020-01-161-1/+1
| | | | [Feature #16432]
* Fixed the location of args node with numbered parameterNobuyoshi Nakada2020-01-161-1/+5
|
* parse.y: fix a wrong sizeof argument for ruby_sized_xfreeYusuke Endoh2020-01-051-1/+1
|
* Make eval(code, binding) use (eval) as __FILE__ and 1 as __LINE__Jeremy Evans2020-01-031-24/+0
| | | | | | | | | This removes the warning that was added in 3802fb92ff8c83eed3e867db20f72c53932f542d, and switches the behavior so that the eval does not use the binding's __FILE__ and __LINE__ implicitly. Fixes [Bug #4352]
* decouple internal.h headers卜部昌平2019-12-261-11/+27
| | | | | | | | | | | | | | | | | | Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies).
* Show the error line only when same as the currentNobuyoshi Nakada2019-12-251-1/+12
|
* Added `experimental` warning categoryNobuyoshi Nakada2019-12-201-1/+2
| | | | [Feature #16420]
* Hoisted out new_case3Nobuyoshi Nakada2019-12-201-4/+12
|
* Refined the warning message for numbered-parameter like variablesNobuyoshi Nakada2019-12-201-1/+1
| | | | [Bug #16438]
* Refined the warning message for numbered-parameter like variablesNobuyoshi Nakada2019-12-201-1/+1
| | | | [Bug #16438]
* Warn also numbered parameter like methodsNobuyoshi Nakada2019-12-201-0/+3
|
* Warn also numbered parameter like parametersNobuyoshi Nakada2019-12-201-4/+10
| | | | [Feature #16433]
* parse.y: suppress "set but not used" warnings on ripper.yYusuke Endoh2019-12-051-5/+4
|
* Silence incorrect assigned but unused variable warnings in ripperJeremy Evans2019-12-041-0/+2
| | | | | | | To only emit the warnings in correct cases would require tracking local variable usage in ripper, which ripper currently does not do. Fixes [Bug #15188]
* Make single line pattern matching void expressionNobuyoshi Nakada2019-11-301-0/+11
| | | | | Instead of returning `nil`, raise a syntax error if its value is used. [Feature #16355]
* Raise `NoMatchingPatternError` when expr `in` pat doesn't matchNobuyoshi Nakada2019-11-281-1/+1
| | | | | | | | * `expr in pattern` should raise `NoMatchingError` when unmatched * `expr in pattern` should return `nil`. (this is unspecified, but this feature is experimental, at all) [Feature #16355]
* [ripper] Fixed unique key check in pattern matchingNobuyoshi Nakada2019-11-261-67/+52
| | | | | | Check keys * by an internal table, instead of unstable dispatched results * and by parsed key values, instead of escaped forms in the source
* Hoisted out `push_pvtbl`/`pop_pvtbl`Nobuyoshi Nakada2019-11-261-16/+19
|
* Wrap `p_kw` in an array at `p_kwarg`Nobuyoshi Nakada2019-11-261-3/+4
| | | | | Not in `p_kw` itself, which makes key and variable/expr pair only now.
* [ripper] Quoted label without expression must be a local variableNobuyoshi Nakada2019-11-251-34/+58
| | | | | | | | | The difference from 0b8c73aa65add5c57b46b0cfdf4e661508802172 is to add the result of `string_add` event to marking objects. ```C RNODE($1)->nd_rval = add_mark_object(p, $$); ```
* Revert "[ripper] Quoted label without expression must be a local variable"Nobuyoshi Nakada2019-11-201-58/+34
| | | | | This reverts commit 0b8c73aa65add5c57b46b0cfdf4e661508802172, which seems breaking RVALUE consistency check.
* [ripper] Quoted label without expression must be a local variableNobuyoshi Nakada2019-11-191-34/+58
|
* Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans2019-11-181-1/+1
| | | | | | | | | | | | | | | | | This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd.
* delete unused functions卜部昌平2019-11-141-35/+2
| | | | | | | | | | | | Looking at the list of symbols inside of libruby-static.a, I found hundreds of functions that are defined, but used from nowhere. There can be reasons for each of them (e.g. some functions are specific to some platform, some are useful when debugging, etc). However it seems the functions deleted here exist for no reason. This changeset reduces the size of ruby binary from 26,671,456 bytes to 26,592,864 bytes on my machine.
* `#@1` is no longer an embedded variableNobuyoshi Nakada2019-11-141-3/+0
|
* Revert "Method reference operator"Nobuyoshi Nakada2019-11-121-27/+1
| | | | | This reverts commit 67c574736912003c377218153f9d3b9c0c96a17b. [Feature #16275]
* Warn on `...` at EOLNobuyoshi Nakada2019-11-121-0/+3
|
* Disable tOROP at EXPR_BEGNobuyoshi Nakada2019-11-121-9/+5
| | | | Both cannot appear there anyway.
* Clear current argument name at empty block argument [Bug #16343]Nobuyoshi Nakada2019-11-121-0/+1
|
* Revert "Warn EOF char in comment"NARUSE, Yui2019-11-111-25/+4
| | | | This reverts commit 69ec3f70fab0c1c537c68fb135cc315181b1d750.
* Revert "Elaborated EOF char message a little"NARUSE, Yui2019-11-111-1/+1
| | | | This reverts commit 6eaac7cfac668d6669be694fd7b723c4982ed218.
* Elaborated EOF char message a littleNobuyoshi Nakada2019-11-111-1/+1
|
* Warn EOF char in commentNobuyoshi Nakada2019-11-111-4/+25
|
* Fixed embedded document with EOF charNobuyoshi Nakada2019-11-111-4/+16
|
* Disallow omission of parentheses/brackets in single line pattern matching ↵Kazuki Tsujimoto2019-11-101-1/+1
| | | | [Feature #16182]
* Disallow duplicated pattern variableKazuki Tsujimoto2019-11-071-4/+41
|
* Add missing semicolonKazuki Tsujimoto2019-11-071-0/+1
|