Skip to content

Commit

Permalink
added mem-view parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 1, 2023
1 parent 54f1f3b commit ed28ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cython_peg.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def Cython2PythonType(cython_type: str) -> str:
ENUM = Word(alphanums + '.')
PRIMATIVE = (FLOAT | INTEGER | TRUE | FALSE | NONE | STRING)
OBJECT = Forward()
MEMMORYVIEW = Literal(':') + (FollowedBy(Literal(",")) | FollowedBy(Literal("]")))
MEMMORYVIEW = Word(":" + nums) + (FollowedBy(Literal(",")) | FollowedBy(Literal("]")))
LIST = Group(bracket_suppress(delimitedList(OBJECT)))("list")
TUPLE = Group(parentheses_suppress(delimited_list(OBJECT)))("tuple")
DICT = Group(curl_suppress(delimitedList(Group(OBJECT + Suppress(":") + OBJECT))))("dict")
Expand Down

0 comments on commit ed28ac3

Please sign in to comment.