diff options
Diffstat (limited to 'libpathod/language')
-rw-r--r-- | libpathod/language/__init__.py | 7 | ||||
-rw-r--r-- | libpathod/language/websockets.py | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libpathod/language/__init__.py b/libpathod/language/__init__.py index 38395b86..c41e8602 100644 --- a/libpathod/language/__init__.py +++ b/libpathod/language/__init__.py @@ -63,12 +63,15 @@ def parse_websocket_frame(s): May raise ParseException """ try: - return websockets.WebsocketFrame.expr().parseString( + reqs = pp.OneOrMore( + websockets.WebsocketFrame.expr() + ).parseString( s, parseAll = True - )[0] + ) except pp.ParseException as v: raise exceptions.ParseException(v.msg, v.line, v.col) + return itertools.chain(*[expand(i) for i in reqs]) def serve(msg, fp, settings): diff --git a/libpathod/language/websockets.py b/libpathod/language/websockets.py index a42dfc2f..51c1b3ee 100644 --- a/libpathod/language/websockets.py +++ b/libpathod/language/websockets.py @@ -69,6 +69,7 @@ class Length(base.Integer): class Times(base.Integer): preamble = "x" + COMPONENTS = ( OpCode, Length, |