Add a "typed_var" abstraction to implement lvalue access in C.

Right now, this has been done at a high level by confparse.c, but it
makes more sense to lower it.

This API is radically un-typesafe as it stands; we'll be wrapping it
in a safer API as we do #30914 and lower the struct manipulation
code as well.

Closes ticket 30864.
This commit is contained in:
Nick Mathewson
2019-06-14 08:42:24 -04:00
parent 5a2ab886ba
commit c60a85d22a
14 changed files with 1315 additions and 333 deletions
+3 -3
View File
@@ -125,8 +125,8 @@ class AutomakeChunk:
Y \
Z
"""
self.prespace = "\t"
self.postspace = "\t\t"
prespace = "\t"
postspace = "\t\t"
for lineno, line in enumerate(self.lines):
m = re.match(r'(\s+)(\S+)(\s+)\\', line)
if not m:
@@ -135,7 +135,7 @@ class AutomakeChunk:
if fname > member:
self.insert_before(lineno, member, prespace, postspace)
return
self.insert_at_end(member)
self.insert_at_end(member, prespace, postspace)
def insert_before(self, lineno, member, prespace, postspace):
self.lines.insert(lineno,