Класс: Parser::Source::Comment
- Наследует:
- Object
- Object
- Parser::Source::Comment
- Определен в:
- sorbet/rbi/parser@3.3.8.0.rbi
Обзор
Комментарий в исходном коде.
source://parser//lib/parser/source/comment.rb#17
Определено в пространстве имен
Классы: Associator
Краткое описание методов класса свернуть
- .associate(ast, comments) ⇒ Hash<Parser::AST::Node, Array<Comment>> устарел Устарел.
Используйте Comment.associate_locations.
- .associate_by_identity(ast, comments) ⇒ Hash<Parser::Source::Node, Array<Comment>>
Связывает
commentsс узламиastпо идентичности. - .associate_locations(ast, comments) ⇒ Hash<Parser::Source::Map, Array<Comment>>
Связывает
commentsс узламиastпо их расположению в исходном коде.
Краткое описание методов экземпляра свернуть
- #document? ⇒ Boolean
source://parser//lib/parser/source/comment.rb#109.
- #initialize(range) ⇒ Comment конструктор
source://parser//lib/parser/source/comment.rb#67.
- #inline? ⇒ Boolean
source://parser//lib/parser/source/comment.rb#101.
- #loc ⇒ Parser::Source::Range
source://parser//lib/parser/source/comment.rb#20.
- #location ⇒ Parser::Source::Range
source://parser//lib/parser/source/comment.rb#20.
- #text ⇒ String
source://parser//lib/parser/source/comment.rb#18.
- #type ⇒ Symbol
Тип этого комментария.
Подробное описание конструкторов
#initialize(range) ⇒ Comment
source://parser//lib/parser/source/comment.rb#67
5365 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5365 def initialize(range); end |
Подробное описание методов класса
.associate(ast, comments) ⇒ Hash<Parser::AST::Node, Array<Comment>>
Используйте associate_locations.
Связывает comments с узлами ast по соответствующему узлу.
source://parser//lib/parser/source/comment.rb#32
5444 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5444 def associate(ast, comments); end |
.associate_by_identity(ast, comments) ⇒ Hash<Parser::Source::Node, Array<Comment>>
Связывает comments с узлами ast по идентичности.
source://parser//lib/parser/source/comment.rb#59
5455 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5455 def associate_by_identity(ast, comments); end |
.associate_locations(ast, comments) ⇒ Hash<Parser::Source::Map, Array<Comment>>
Связывает comments с узлами ast по их расположению в исходном коде.
source://parser//lib/parser/source/comment.rb#46
5467 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5467 def associate_locations(ast, comments); end |
Подробное описание методов экземпляра
#document? ⇒ Boolean
source://parser//lib/parser/source/comment.rb#109
5382 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5382 def document?; end |
#inline? ⇒ Boolean
source://parser//lib/parser/source/comment.rb#101
5389 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5389 def inline?; end |
#loc ⇒ Parser::Source::Range
source://parser//lib/parser/source/comment.rb#20
5401 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5401 def loc; end |
#location ⇒ Parser::Source::Range
source://parser//lib/parser/source/comment.rb#20
5407 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5407 def location; end |
#text ⇒ String
source://parser//lib/parser/source/comment.rb#18
5413 | # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 5413 def text; end |
© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Parser/Source/Comment.html