Skip to content

RubyLanguage.findLocalScopes(node, null) provides all local variables in the scope ignoring node's position #1335

Open
@numberpi

Description

@numberpi
def halloHallo(x)
    a = 1
    b = 2
end

findLocalScopes(node, null) returns always [x, a, b] for a node inside halloHallo(x). I think this is the default implementation returning all frame slots, if frame parameter in findLocalScopes(node, frame) is null.

Is it possible to implement it for RubyLanguage (or Truffle in general?) the way SL is doing it (see SLLanguage.findLocalScopes() how it should be done by collecting only the local variables already defined).

I would appreciate this to do language agnostic static code analysis for Truffle languages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions