Class: Parser::Context Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Context of parsing that is represented by a stack of scopes.
Supported states:
- :class - in the class body (class A; end)
- :module - in the module body (module M; end)
- :sclass - in the singleton class body (class << obj; end)
- :def - in the method body (def m; end)
- :defs - in the singleton method body (def self.m; end)
- :def_open_args - in the arglist of the method definition
keep in mind that it's set only after reducing the first argument,
if you need to handle the first argument check
lex_state == expr_fname
- :block - in the block body (tap {})
- :lambda - in the lambda body (-> {})
source://parser//lib/parser/context.rb#18
Constant Summary collapse
- FLAGS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#19
T.let(T.unsafe(nil), Array)
Instance Method Summary collapse
-
#cant_return ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#cant_return=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_argdef ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_argdef=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_block ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_block=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_class ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_class=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_def ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_def=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_defined ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_defined=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_dynamic_block? ⇒ Boolean
private
source://parser//lib/parser/context.rb#47.
-
#in_kwarg ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_kwarg=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_lambda ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#in_lambda=(_arg0) ⇒ Object
private
source://parser//lib/parser/context.rb#45.
-
#initialize ⇒ Context
constructor
private
source://parser//lib/parser/context.rb#30.
-
#reset ⇒ Object
private
source://parser//lib/parser/context.rb#34.
Constructor Details
#initialize ⇒ Context
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#30
1566 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1566 def initialize; end |
Instance Method Details
#cant_return ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1569 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1569 def cant_return; end |
#cant_return=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1572 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1572 def cant_return=(_arg0); end |
#in_argdef ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1575 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1575 def in_argdef; end |
#in_argdef=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1578 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1578 def in_argdef=(_arg0); end |
#in_block ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1581 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1581 def in_block; end |
#in_block=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1584 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1584 def in_block=(_arg0); end |
#in_class ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1587 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1587 def in_class; end |
#in_class=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1590 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1590 def in_class=(_arg0); end |
#in_def ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1593 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1593 def in_def; end |
#in_def=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1596 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1596 def in_def=(_arg0); end |
#in_defined ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1599 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1599 def in_defined; end |
#in_defined=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1602 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1602 def in_defined=(_arg0); end |
#in_dynamic_block? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#47
1607 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1607 def in_dynamic_block?; end |
#in_kwarg ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1610 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1610 def in_kwarg; end |
#in_kwarg=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1613 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1613 def in_kwarg=(_arg0); end |
#in_lambda ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1616 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1616 def in_lambda; end |
#in_lambda=(_arg0) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#45
1619 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1619 def in_lambda=(_arg0); end |
#reset ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
source://parser//lib/parser/context.rb#34
1622 |
# File 'sorbet/rbi/parser@3.3.7.4.rbi', line 1622 def reset; end |