summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
AgeCommit message (Collapse)Author
2020-10-15Merge branch 'work_for_merge' of https://github.com/zubycz/mruby into ↵Yukihiro "Matz" Matsumoto
zubycz-work_for_merge
2020-10-15Fix out of bound access in `parse.y`.Yukihiro "Matz" Matsumoto
2020-10-13Introduce endless range (a part of #5085)taiyoslime
Co-Authored-By: n4o847 <[email protected]> Co-Authored-By: smallkirby <[email protected]>
2020-10-12Avoid `unsigned int`; Use `mrb_int` instead.Yukihiro "Matz" Matsumoto
2020-10-12Raname `mrb_exc_new_str_lit()` to `mrb_exc_new_lit()`.Yukihiro "Matz" Matsumoto
It uses `mrb_str_new_lit()` internally, but it doesn't need to express it in the name of the function (macro).
2020-10-12Make `Proc#parameters` to support keyword arguments; fix #5066Yukihiro "Matz" Matsumoto
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
2020-10-12Rename float configuration option names.Yukihiro "Matz" Matsumoto
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT` - `MRB_USE_FLOAT` => `MRB_USE_FLOAT32` The former is to use `USE_XXX` naming convention. The latter is to make sure `float` is 32bit float and not floating point number in general.
2020-10-12You don't need to keep index in local variables info in `irep`.Yukihiro "Matz" Matsumoto
2020-10-12Allow `rescue` modifier in endless method definitions.Yukihiro "Matz" Matsumoto
2020-10-12Implement endless-def as in CRuby [Feature#16746].Yukihiro "Matz" Matsumoto
2020-10-12Rightward-assign by ASSOC.Yukihiro "Matz" Matsumoto
[ruby-bugs:15921]
2020-10-12Generate C struct from `irep` instead of binary dump.Yukihiro "Matz" Matsumoto
2020-10-12Rename `struct mrb_locals` to `struct mrb_lvinfo`.Yukihiro "Matz" Matsumoto
That stands for "local variable information".
2020-10-12Constify `irep` members.Yukihiro "Matz" Matsumoto
- `pool` - `syms` - `reps`
2020-10-12Use more `MRB_QSYM()`.Yukihiro "Matz" Matsumoto
2020-10-12Use `MRB_QSYM()` instead of `MRB_OPSYM()`.Yukihiro "Matz" Matsumoto
2020-10-12Use `MRB_OPSYM()` instead of `mrb_intern_lit()`.Yukihiro "Matz" Matsumoto
2020-10-12Add `MRB_SYM()` for inline symbols.Yukihiro "Matz" Matsumoto
2020-09-10Merge pull request #4933 from dearblue/variablesYukihiro "Matz" Matsumoto
Fix take over file scope variables with `mruby` and `mirb` command
2020-08-11Fix `mrb_int` and `size_t` combination warnings.Yukihiro "Matz" Matsumoto
2020-06-05Change arena index from `mrb_int` to `int`.Yukihiro "Matz" Matsumoto
2020-06-02Remove `patch_irep()` in `mruby-eval`dearblue
- It can now deal with operands in the range of `OP_EXT*`. - It can now call the same method as the variable name without arguments. ```ruby def a "Safe!" end a = "Auto!" eval "a()" # call method `a` ```
2020-05-15Remove `YYERROR_VERBOSE` which no longer supported since `bison 3.6`.Yukihiro "Matz" Matsumoto
Instead we added `%define parse.error verbose`.
2020-05-07Fix wrong line number before comment line; fix #4993Yukihiro "Matz" Matsumoto
2020-04-27Updating `parse.y for recent `bison` (retry).Yukihiro "Matz" Matsumoto
2020-04-27Revert "Change obsolete `%pure-parser` to `%define api.pure`."Yukihiro "Matz" Matsumoto
This reverts commit 682a31f92b3ac86ca59f7e8e740197e50b4452e5. Unfortunately, I couldn't run newer `bison` on TravisCI. Maybe next time.
2020-04-27Change obsolete `%pure-parser` to `%define api.pure`.Yukihiro "Matz" Matsumoto
Recent `bison` warns for `%pure-parser`. We kept it since MacOS only provide ancient `bison`, but the warning is noisy and there's no hope that Apple will upgrade `bison`. MacOS users must install the newer version of `bison`, by typing `brew install bison` for example. Note that `brew` does not overwrite the `bison` execution path automatically, so you need to update your `.bash_profile` as instructed by `brew`.
2020-04-25Implemented argument forwarding by `...`Yukihiro "Matz" Matsumoto
2020-04-01Avoid unnecessary `nextc()` recursion.Yukihiro "Matz" Matsumoto
2020-01-19Add `mrbc_cleanup_local_variables()` with `mrbc_context`; ref #4931dearblue
Clean up defined local variables.
2020-01-08`p->locals` may be `NULL` when error occurs before the point.Yukihiro "Matz" Matsumoto
This is reported by oss-fuzz: Issue 19886: mruby:mruby_fuzzer: Potential-null-reference in setup_numparams
2020-01-01Allow `here-doc` in the middle of Hash expressions; fix #4815Yukihiro "Matz" Matsumoto
2019-12-27Prohibit assignment to numbered parameters.Yukihiro "Matz" Matsumoto
It is stricter than CRuby but confusing anyway.
2019-12-27Allow non numbered-parameter identifier like `_1` outside of blocks.Yukihiro "Matz" Matsumoto
But it causes warnings as CRuby does; fix #4892 fix #489
2019-12-27Numbered parameters: usually linked list uses `cdr` for links.Yukihiro "Matz" Matsumoto
2019-12-27Prohibit numbered parameters as method arguments; fix #4892Yukihiro "Matz" Matsumoto
As of CRuby2.7 it is only warned. `mruby` prohibits explicitly to implement the future Ruby3 behavior.
2019-12-23Handle CR LF newline natively in lexertake-cheeze
2019-12-21Numbered parameters should not be available in the lambda bodies.Yukihiro "Matz" Matsumoto
`mruby` does not warn like `CRuby` for cases like #4893. Fix #4890, fix #4891, fix #4893.
2019-12-21`_0` is not numbered parameterKOBAYASHI Shuji
#### Before this patch: ```console $ bin/mruby rb -e '_0=:l; p ->{_0}.()' -e:1:13: _0 is not available -e:1:13: syntax error, unexpected $end, expecting '}' ``` #### After this patch (same as Ruby): ```console $ bin/mruby rb -e '_0=:l; p ->{_0}.()' :l ```
2019-12-21Fix SEGV from numbered parameters outside of blocks; fix #4862Yukihiro "Matz" Matsumoto
2019-12-09Warnings for numbered parameters in nested blocks.Yukihiro "Matz" Matsumoto
2019-12-09Parser refactoring on numbered parameters.Yukihiro "Matz" Matsumoto
Now identifiers like `_1abc` are allowed.
2019-12-09Support new numbered parameter syntax `_1` instead of `@1`.Yukihiro "Matz" Matsumoto
2019-12-09Implement numbered parametersUkrainskiy Sergey
2019-11-19Always enable the rational and complex literalsKOBAYASHI Shuji
I think they can always be enabled because the regular expression literal is always enabled.
2019-11-14Fix here document with EOFKOBAYASHI Shuji
#### Before this patch: ``` $ bin/mruby -e 'p <<EOS 1 EOS' -e:4:0: can't find heredoc delimiter "EOS" anywhere before EOF -e:4:0: syntax error, unexpected $end, expecting tHEREDOC_END or tHD_STRING_PART or tHD_STRING_MID ``` #### After this patch (same as Ruby): ``` $ bin/mruby -e 'p <<EOS 1 EOS' "1\n" ```
2019-11-13Use `mrb_intern_lit` if possible in `parse.y`KOBAYASHI Shuji
2019-11-12Use `intern` instead of `intern_cstr` if possible in `parse.y`KOBAYASHI Shuji
2019-11-08Fixed a bug in keyword arguments in block parameters; fix #4810Yukihiro "Matz" Matsumoto
This is caused by incomplete fix in #4746
2019-11-08Allow here-doc before closing parentheses; ref #4796Yukihiro "Matz" Matsumoto