[NO TESTS] WIP

This commit is contained in:
Reid 'arrdem' McKenzie 2020-07-18 14:43:21 -06:00
parent 6a33fa1016
commit 50842cb3d1

View file

@ -264,6 +264,8 @@ class Parser(SexpParser):
assert rtb.read() == closec # Discard the trailing delimeter assert rtb.read() == closec # Discard the trailing delimeter
return ctor(acc, str(rtb), pos) return ctor(acc, str(rtb), pos)
# FIXME (arrdem 2020-07-18):
# Break this apart and make the supported lists composable features somehow?
@classmethod @classmethod
def parse_list(cls, f: PosTrackingBufferedReader): def parse_list(cls, f: PosTrackingBufferedReader):
return cls.parse_delimeted(f, "(", ")", lambda *args: ListToken(*args, ListType.ROUND)) return cls.parse_delimeted(f, "(", ")", lambda *args: ListToken(*args, ListType.ROUND))
@ -273,7 +275,7 @@ class Parser(SexpParser):
return cls.parse_delimeted(f, "[", "]", lambda *args: ListToken(*args, ListType.SQUARE)) return cls.parse_delimeted(f, "[", "]", lambda *args: ListToken(*args, ListType.SQUARE))
# FIXME (arrdem 2020-07-18): # FIXME (arrdem 2020-07-18):
# Break this apart into middleware or composable features somehow? # Break this apart into middleware or composable features somehow?
@classmethod @classmethod
def handle_symbol(cls, buff, pos): def handle_symbol(cls, buff, pos):
def _sign(m, idx): def _sign(m, idx):