class YARD::Parser::Ruby::AstNode
def initialize(type, arr, opts = {})
(**opts)
-
:token
(Boolean
) -- whether the node represents a token -
:listchar
(Fixnum
) -- a special key like :char but for -
:listline
(Fixnum
) -- a special key like :line but for -
:char
(String
) -- the character number the node starts on -
:line
(Fixnum
) -- the line the node starts on in source
Parameters:
-
opts
(Hash
) -- any extra line options -
arr
(Array
) -- the child nodes -
type
(Symbol
) -- the type of node being created
def initialize(type, arr, opts = {}) super(arr) self.type = type self.line_range = opts[:line] self.source_range = opts[:char] @fallback_line = opts[:listline] @fallback_source = opts[:listchar] @token = true if opts[:token] @docstring = nil end