summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2023-09-30Remove not used fields from LAMBDAyui-knk
2023-09-30Consolidate includes common to universal parserNobuyoshi Nakada
2023-09-29Change NODE DEF_TEMP nd_cval to `struct lex_context`yui-knk
2023-09-29Merge NODE_DEF_TEMP and NODE_DEF_TEMP2yui-knk
2023-09-29Remove not used fields from CASE, CASE2, CASE3yui-knk
2023-09-29Remove not used fields from ALIAS, VALIAS, UNDEFyui-knk
2023-09-29Remove not used fields from DOT2, DOT3, FLIP2, FLIP3yui-knk
2023-09-29Merge RNode_OP_ASGN2 and RNode_OP_ASGN22yui-knk
2023-09-29Remove not used fields from SELF, NIL, TRUE, FALSEyui-knk
2023-09-29Fix `retry` in nested `rescue` blocksNobuyoshi Nakada
Restore `rescue`-context from the outer context. `retry` targets the next outer block except for between `rescue` and `else` or `ensure`, otherwise, if there is no enclosing block, it should be syntax error.
2023-09-28Syntax check of `yield` in the parserNobuyoshi Nakada
2023-09-28Jumps are possible in the top-level loopNobuyoshi Nakada
2023-09-28Change RNode structure from union to structyui-knk
All kind of AST nodes use same struct RNode, which has u1, u2, u3 union members for holding different kind of data. This has two problems. 1. Low flexibility of data structure Some nodes, for example NODE_TRUE, don’t use u1, u2, u3. On the other hand, NODE_OP_ASGN2 needs more than three union members. However they use same structure definition, need to allocate three union members for NODE_TRUE and need to separate NODE_OP_ASGN2 into another node. This change removes the restriction so make it possible to change data structure by each node type. 2. No compile time check for union member access It’s developer’s responsibility for using correct member for each node type when it’s union. This change clarifies which node has which type of fields and enables compile time check. This commit also changes node_buffer_elem_struct buf management to handle different size data with alignment.
2023-09-27Out of place jumps are valid in `defined?`Nobuyoshi Nakada
2023-09-27Syntax check of `retry` in the parserNobuyoshi Nakada
2023-09-27Fix error token locationNobuyoshi Nakada
2023-09-27Syntax check of block exits in the parserNobuyoshi Nakada
2023-09-25Use named references for method/class/module definitionsNobuyoshi Nakada
2023-09-25Extract class/module context checksNobuyoshi Nakada
2023-09-25Split the build of `RESBODY` nodesNobuyoshi Nakada
2023-09-25Reduce stack usage in `string_content`Nobuyoshi Nakada
2023-09-25Remove `escape_Qundef`Nobuyoshi Nakada
Ripper dispatcher methods always escape `Qundef` by `get_value`.
2023-09-25Name midrules in complex rulesNobuyoshi Nakada
2023-09-24Refactor to use ripper_new_yylval2yui-knk
2023-09-24The first arg of NEW_OPT_ARG is always 0yui-knk
2023-09-22Directly free structure managed by imemo tmpbufyui-knk
NODE_ARGS, NODE_ARYPTN, NODE_FNDPTN manage memory of their structure by imemo tmpbuf Object. However rb_ast_struct has reference to NODE. Then these memory can be freed directly when rb_ast_struct is freed. This commit reduces parser's dependency on CRuby functions.
2023-09-17Tag `p_lparen` and `p_lbracket` as `tbl`Nobuyoshi Nakada
Remove tagging to the component for each reference.
2023-09-17ripper: Preprocess ripper-dispatchable types onlyNobuyoshi Nakada
Keep the other types, which not having setter macros for ripper.
2023-09-17nd_aid of NODE_OP_ASGN_OR is not used then no need to set ityui-knk
2023-09-16Align comments [ci skip]Nobuyoshi Nakada
2023-09-15[Bug #19882] Reject tokens invalid as symbolsNobuyoshi Nakada
2023-09-15[Bug #19877] Fix flip-flop in blockNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8440
2023-09-15[Bug #19877] Named captures should take place from regexps in blockNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8440
2023-09-15[Bug #19877] Literals cannot have singleton methods even in blocksNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8440
2023-09-15Reuse `rb_reg_named_capture_assign_iter_impl`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8440
2023-09-12Restore `in_defined` flag at nested `defined?`Nobuyoshi Nakada
2023-09-12Rename `NODE_NEW_TEMPORAL` as `NODE_NEW_INTERNAL`Nobuyoshi Nakada
2023-09-10Declare `k_class` and `k_module` as `ctxt`Nobuyoshi Nakada
So that it is not ncessary to specify the type each time. Notes: Merged: https://github.com/ruby/ruby/pull/8410
2023-09-10Add a new line between function definitions [ci skip]Yuichiro Kaneko
Notes: Merged: https://github.com/ruby/ruby/pull/8408 Merged-By: nobu <nobu@ruby-lang.org>
2023-09-07[Bug #19549] Check for variables to be interpolatedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7615
2023-09-01[Bug #19281] Allow semicolon in parenthesis at the first argument of command ↵yui-knk
call Allow compstmt in the first argument of command call wrapped with parenthesis like following arguments with parenthesis. Notes: Merged: https://github.com/ruby/ruby/pull/8347
2023-09-01[Bug-18878] Parse qualified const with brace block as method callNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8343
2023-08-30[DOC] Detailed explanation when one line pattern matching is a void value ↵yui-knk
expression Notes: Merged: https://github.com/ruby/ruby/pull/8320
2023-08-26kw_rest_arg nd_cflag has not been used since 9720136yui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/8291
2023-08-26[Bug #19851] Ripper: Hide internal block argument IDNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8293
2023-08-25Replace only use of `snprintf` in parserNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8292
2023-08-25[Bug #19848] Flush BOMNobuyoshi Nakada
The token just after BOM needs to position at column 0, so that the indentation matches closing line. Notes: Merged: https://github.com/ruby/ruby/pull/8281
2023-08-25Move SCRIPT_LINES__ away from parse.yNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8289
2023-08-25config.h has to be the very beginning卜部昌平
This header defines several essential macros. Notes: Merged: https://github.com/ruby/ruby/pull/8274
2023-08-24The first arg of NEW_KW_ARG macro is always 0yui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/8267