Assert that acorn is installed and the correct version
()
| 246 | class Javascript(BaseLanguage): |
| 247 | @staticmethod |
| 248 | def assert_dependencies(): |
| 249 | """Assert that acorn is installed and the correct version""" |
| 250 | assert is_installed('acorn'), "Acorn is required to parse javascript files " \ |
| 251 | "but was not found on the path. Install it " \ |
| 252 | "from npm and try again." |
| 253 | version = get_acorn_version() |
| 254 | if not version.startswith('8.'): |
| 255 | logging.warning("Acorn is required to parse javascript files. " |
| 256 | "Version %r was found but code2flow has only been " |
| 257 | "tested on 8.*", version) |
| 258 | logging.info("Using Acorn %s" % version) |
| 259 | |
| 260 | @staticmethod |
| 261 | def get_tree(filename, lang_params): |
nothing calls this directly
no test coverage detected