-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
@staticmethod
in process body.
Issue #15 (#15). * da/compiler/dast.py(Process): - (.staticmethods): new field, keep track of all static methods defined in the process. - (.staticnames): new property, set of all static method names in the process. * da/compiler/parser.py(Parser): - (.parse_decorators): check for `@staticmethod` decorators. - (.visit_ClassDef): update for changed signature of `parse_decorators`. - (.visit_FunctionDef): add static methods to `Process.staticmethods`; check that entry point and "setup" methods aren't declared static. * da/compiler/pygen.py(PythonGenerator): - (.visit_Process): visit the `.staticmethods` field. - (.visit_Function): don't inject `self` argument for static methods. - (.visit_NamedVar): prepend process class name for references to static methods.
- Loading branch information
Showing
3 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters