class Yadriggy::ASTreeTable
@api private A table of reified abstract syntax trees. It is used for guaranteeing the uniqueness of ASTree
objects.
Attributes
trees[R]
@return [Hash] all the elements.
Public Class Methods
new()
click to toggle source
# File lib/yadriggy/ast.rb, line 1736 def initialize() @trees = {} end
Public Instance Methods
[](context)
click to toggle source
Gets the value associated with the key. @param [Proc|Method|UnboundMethod] context the key.
# File lib/yadriggy/ast.rb, line 1755 def [](context) @trees[context] end
[]=(context, ast)
click to toggle source
Records a key-value pair. @param [Proc|Method|UnboundMethod] context the key. @param [ASTnode] ast the value.
# File lib/yadriggy/ast.rb, line 1743 def []=(context, ast) @trees[context] = ast end
delete(context)
click to toggle source
Deletes a key-value pair. @param [Proc|Method|UnboundMethod] context the key.
# File lib/yadriggy/ast.rb, line 1749 def delete(context) @trees.delete(context) end
each(&blk)
click to toggle source
Executes a block once for each element.
# File lib/yadriggy/ast.rb, line 1760 def each(&blk) @trees.each_value(&blk) end