{"action":"created","issue":{"url":"https://api.github.com/repos/graalvm/truffle/issues/80","repository_url":"https://api.github.com/repos/graalvm/truffle","labels_url":"https://api.github.com/repos/graalvm/truffle/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/graalvm/truffle/issues/80/comments","events_url":"https://api.github.com/repos/graalvm/truffle/issues/80/events","html_url":"https://github.com/graalvm/truffle/issues/80","id":136518507,"number":80,"title":"Need a simple way to restrict a SourceSectionFilter to a specific AST root (nested functions)","user":{"login":"mickjordan","id":17008770,"avatar_url":"https://avatars.githubusercontent.com/u/17008770?v=3","gravatar_id":"","url":"https://api.github.com/users/mickjordan","html_url":"https://github.com/mickjordan","followers_url":"https://api.github.com/users/mickjordan/followers","following_url":"https://api.github.com/users/mickjordan/following{/other_user}","gists_url":"https://api.github.com/users/mickjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mickjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickjordan/subscriptions","organizations_url":"https://api.github.com/users/mickjordan/orgs","repos_url":"https://api.github.com/users/mickjordan/repos","events_url":"https://api.github.com/users/mickjordan/events{/privacy}","received_events_url":"https://api.github.com/users/mickjordan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/graalvm/truffle/labels/feature","name":"feature","color":"84b6eb"},{"url":"https://api.github.com/repos/graalvm/truffle/labels/oracle-emp","name":"oracle-emp","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"chumer","id":4346215,"avatar_url":"https://avatars.githubusercontent.com/u/4346215?v=3","gravatar_id":"","url":"https://api.github.com/users/chumer","html_url":"https://github.com/chumer","followers_url":"https://api.github.com/users/chumer/followers","following_url":"https://api.github.com/users/chumer/following{/other_user}","gists_url":"https://api.github.com/users/chumer/gists{/gist_id}","starred_url":"https://api.github.com/users/chumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chumer/subscriptions","organizations_url":"https://api.github.com/users/chumer/orgs","repos_url":"https://api.github.com/users/chumer/repos","events_url":"https://api.github.com/users/chumer/events{/privacy}","received_events_url":"https://api.github.com/users/chumer/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-25T21:32:37Z","updated_at":"2016-02-27T00:32:46Z","closed_at":null,"body":"For languages that allow a function to contain lexically nested functions, e.g. R, there needs to be an easy way to restrict a SourceSectionFilter to the body of the enclosing function but excluding the bodies of the nested functions. The indexIn method for the outer function (which must be used to uniquely identify the function in the face if duplicates in the \"same\" source\") necessarily includes the bodies of the nested functions. The consequence is that, .e.g. a debugger will step into the bodies of nested functions when it should step over because the filter will match statements in the nested functions. Generating a list of indexNotIn filters would be possible but tedious. "},"comment":{"url":"https://api.github.com/repos/graalvm/truffle/issues/comments/189538299","html_url":"https://github.com/graalvm/truffle/issues/80#issuecomment-189538299","issue_url":"https://api.github.com/repos/graalvm/truffle/issues/80","id":189538299,"user":{"login":"mlvdv","id":12618713,"avatar_url":"https://avatars.githubusercontent.com/u/12618713?v=3","gravatar_id":"","url":"https://api.github.com/users/mlvdv","html_url":"https://github.com/mlvdv","followers_url":"https://api.github.com/users/mlvdv/followers","following_url":"https://api.github.com/users/mlvdv/following{/other_user}","gists_url":"https://api.github.com/users/mlvdv/gists{/gist_id}","starred_url":"https://api.github.com/users/mlvdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlvdv/subscriptions","organizations_url":"https://api.github.com/users/mlvdv/orgs","repos_url":"https://api.github.com/users/mlvdv/repos","events_url":"https://api.github.com/users/mlvdv/events{/privacy}","received_events_url":"https://api.github.com/users/mlvdv/received_events","type":"User","site_admin":false},"created_at":"2016-02-27T00:32:46Z","updated_at":"2016-02-27T00:32:46Z","body":"Good issue; I can see other situations where this flexibility will be needed. \r\nI agree that `indexNotIn(SourceSection)` filters would be tedious, but this might be the simplest and most clear API.  Client code would start a build and iterate over each nested `SourceSection` adding that filter expression.  The internal representation, of course could be transformed for fast matching."}}