--- /dev/null
+import collections
+
+CPSProgram = collections.namedtuple(
+ 'CPSProgram',
+ (
+ 'statement_list',
+ ),
+)
+
+def convert(program):
+ return CPSProgram(
+ statement_list=program.statement_list,
+ )
--- /dev/null
+import collections
+
+DesugaredProgram = collections.namedtuple(
+ 'DesugaredProgram',
+ (
+ 'statement_list',
+ ),
+)
+
+def desugar(program):
+ return DesugaredProgram(
+ statement_list=program.statement_list,
+ )
import sys
+import conversion
+import desugaring
import generation
import normalization
import parsing
tokens = tokenization.tokenize(source)
parsed = parsing.parse(tokens)
-normalized = normalization.normalize(parsed)
-transformed = transformation.transform(normalized)
+desugared = desugaring.desugar(parsed)
+normalized = normalization.normalize(desugared)
+converted = conversion.convert(normalized)
+transformed = transformation.transform(converted)
generated = generation.generate(transformed)
assert source_path.endswith('.fur')