Skip to content

Comments are carried down into all child scopes if there is a for loop #13

@Naddiseo

Description

@Naddiseo

Test case:

// Header Comment

class Klass {
  void method() {
      for (;;) {}
  }
}

Output:

$ j2py test.java
#!/usr/bin/env python
""" generated source for module test """
#  Header Comment
class Klass(object):
    """ generated source for class Klass """
    def method(self):
        """ generated source for method method """
        #  Header Comment
        while True:
            #  Header Comment

The "header comment" is printed in the child scopes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions