The main macro parsing function. Different scripts may have different ways to parse a macro, and to return a value to the evaluator. Parameters ---------- parser : Parser The parser with the appropriate frame already created and populated depending
(self, parser: "Parser")
| 109 | |
| 110 | @abc.abstractmethod |
| 111 | def parse_macro(self, parser: "Parser") -> Any: |
| 112 | """The main macro parsing function. Different scripts may have different |
| 113 | ways to parse a macro, and to return a value to the evaluator. |
| 114 | |
| 115 | Parameters |
| 116 | ---------- |
| 117 | parser : Parser |
| 118 | The parser with the appropriate frame already created and populated depending |
| 119 | macro's hygiene settings, |
| 120 | |
| 121 | Returns |
| 122 | ------- |
| 123 | The return value depends on the specifics of the particular script. It can be |
| 124 | "None" or any other value or any type. |
| 125 | """ |
| 126 | |
| 127 | def _find_parser_def(self): |
| 128 | outer_frame_infos = inspect.getouterframes(inspect.currentframe()) |