summaryrefslogtreecommitdiff
path: root/ext/objspace/objspace.c
diff options
context:
space:
mode:
authoryui-knk <[email protected]>2022-10-01 17:44:28 +0900
committerYuichiro Kaneko <[email protected]>2022-10-08 17:59:11 +0900
commit4bfdf6d06ddbcf21345461038f2a9e3012f77268 (patch)
treec218b83b15c56b3a3727c5bd6a2d399564f01349 /ext/objspace/objspace.c
parent4f24f3ea94e43d1021fdd8548480f130f5112b99 (diff)
Move `error` from top_stmts and top_stmt to stmt
By this change, syntax error is recovered smaller units. In the case below, "DEFN :bar" is same level with "CLASS :Foo" now. ``` module Z class Foo foo. end def bar end end ``` [Feature #19013]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6512
Diffstat (limited to 'ext/objspace/objspace.c')
-rw-r--r--ext/objspace/objspace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 0b1b094325..ca08604c95 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -493,6 +493,7 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_ARYPTN);
COUNT_NODE(NODE_FNDPTN);
COUNT_NODE(NODE_HSHPTN);
+ COUNT_NODE(NODE_ERROR);
#undef COUNT_NODE
case NODE_LAST: break;
}