Skip to content

Commit 647eb28

Browse files
committed
- support cant_return
1 parent 1485867 commit 647eb28

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/parser/ruby-next/parser_ext.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
require_relative "builder"
1010
require_relative "ast/processor"
1111

12+
require "parser/context"
13+
unless Parser::Context::FLAGS.include?(:cant_return)
14+
Parser::Context::FLAGS << :cant_return
15+
16+
class Parser::Context
17+
attr_accessor :cant_return
18+
end
19+
end
20+
1221
module Parser
1322
# Patch the base parser class to use custom builder and lexer
1423
module NextExt

0 commit comments

Comments
 (0)