Skip to content

QuantStack/frilouz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frilouz
=======

A tiny wrapper compatible with ``ast.parse`` from the builtin ``ast`` module and
``gast.parse`` from the great ``gast`` package.

This package provides a single function:

```
frilou.parse(parser, *parser_args, **parser_kwargs)
```

Which returns a tuple of two elements:

- first, the parsed tree
- second, a (possibly empty) list of Syntax errors met during parsing

If the input code doesn't have any syntax error, it just forwards the call to
the wrapped call, returns the coresponding asbtract syntax tree and an empty list
of errors.

If the input does have syntax errors, it removes part of the input code and goes on with
the parsing, collecting the syntax errors met on the go. In that case, the
returned parsed is only partial, but may still provide valuable information for
syntax analysis.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages