diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-05-10 23:46:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-05-10 23:46:46 -0700 |
| commit | 17dbe5d9e8fcbe2c5f2f494658868b28857a25ca (patch) | |
| tree | b5fafea0caac649ab93c273e1d81f476a13624fc /grammars/python.bp | |
| parent | 943aa0b71a8c2a03fe4b57317d4c7bc7df7d014c (diff) | |
Added {word} feature and cleaned up the code some.
Diffstat (limited to 'grammars/python.bp')
| -rw-r--r-- | grammars/python.bp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grammars/python.bp b/grammars/python.bp index 13c9251..daab6a5 100644 --- a/grammars/python.bp +++ b/grammars/python.bp @@ -14,7 +14,7 @@ keyword: |("and" / "as" / "assert" / "break" / "class" / "continue" / "def" / "not" / "or" / "pass" / "raise" / "return" / "try" / "while" / "with" / "yield")| class: class-def +(\N ..$) -class-def: ^_|"class"|_id[_parens]_`: +class-def: ^_{class}_id[_parens]_`: function: function-def +(\N ..$) -function-def: ^_|"def"|_id parens `: -import: ^_["from"| ..%parens >(|"import"|)] |"import"| ..%parens $ +function-def: ^_{def}_id parens `: +import: ^_[{from} ..%parens >{import}] {import} ..%parens $ |
