Skip to content

Commit

Permalink
Dummy support of alias_global_variable_node
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Aug 7, 2024
1 parent dd591f6 commit 09a550b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/typeprof/core/ast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def self.create_node(raw_node, lenv, use_result = true)
when :defined_node then DefinedNode.new(raw_node, lenv)
when :splat_node then SplatNode.new(raw_node, lenv)
when :for_node then ForNode.new(raw_node, lenv)
when :alias_global_variable_node then AliasGlobalVariableNode.new(raw_node, lenv)

# call
when :super_node then SuperNode.new(raw_node, lenv)
Expand Down
11 changes: 11 additions & 0 deletions lib/typeprof/core/ast/variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ def retrieve_at(pos, &blk)
end
end

class AliasGlobalVariableNode < Node
def initialize(raw_node, lenv)
super(raw_node, lenv)
# XXX: Who use this? I want to hard-code English.rb
end

def install0(genv)
Source.new(genv.nil_type)
end
end

class ClassVariableWriteNode < Node
def initialize(raw_node, rhs, lenv)
super(raw_node, lenv)
Expand Down

0 comments on commit 09a550b

Please sign in to comment.