Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase code quality and fix test #1124

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Oct 25, 2024

This change is Reviewable

Comment on lines -1651 to -1656
if scope:
pass
else:
msg = "behavior name: " + name + " is not defined!"
pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused

Comment on lines -214 to -219
def enter_variable_declaration(self, node: ast_node.VariableDeclaration):
pass

def exit_variable_declaration(self, node: ast_node.VariableDeclaration):
pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double defined

Comment on lines -826 to -850
class VariableDeclaration(Declaration):
"""
'var' fieldName (',' fieldName)* ':' typeDeclarator ('=' (sampleExpression | valueExp) )? NEWLINE;
"""

def __init__(self, field_name, field_type):
super().__init__()
self.field_name = field_name
self.field_type = field_type
self.set_children(field_name)

def enter_node(self, listener):
if hasattr(listener, "enter_variable_declaration"):
listener.enter_variable_declaration(self)

def exit_node(self, listener):
if hasattr(listener, "exit_variable_declaration"):
listener.exit_variable_declaration(self)

def accept(self, visitor):
if hasattr(visitor, "visit_variable_declaration"):
return visitor.visit_variable_declaration(self)
else:
return visitor.visit_children(self)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

Comment on lines -144 to -146
def visit_variable_declaration(self, node: ast_node.VariableDeclaration):
return self.visit_children(node)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant