class Bpl::AST::StorageDeclaration
Public Instance Methods
flatten()
click to toggle source
# File lib/bpl/ast/declaration.rb, line 54 def flatten if @names.empty? self else @names.map do |name| self.class.new(names: [name], type: @type, where: @where) end end end
idents()
click to toggle source
# File lib/bpl/ast/declaration.rb, line 63 def idents @names.map do |name| StorageIdentifier.new(name: name, declaration: self) end end
show(&blk)
click to toggle source
# File lib/bpl/ast/declaration.rb, line 49 def show(&blk) names = @names.empty? ? "" : (@names.map(&blk) * ", " + ":") where = @where ? "#{yield :where} #{@where}" : "" "#{show_attrs(&blk)} #{names} #{yield @type} #{where}".fmt end
signature()
click to toggle source
# File lib/bpl/ast/declaration.rb, line 48 def signature; "#{@names * ", "}: #{@type}" end