public Collection < Variable > getVariables ( ) { if ( parent == null ) { return getLocalVariables ( ) ; } List < Variable > result = new ArrayList <> ( ) ; result . addAll ( parent . getVariables ( ) ) ; result . addAll ( getLocalVariables ( ) ) ; return result ; }
Returns all variables known to this scope or one of its parent scopes .