Solve AOC day 6
This commit is contained in:
@@ -34,6 +34,7 @@ class Helpers {
|
||||
}
|
||||
|
||||
public static function parseTypePath(path:String, from:ReaderExp):TypePath {
|
||||
// TODO function types with generic argument types are broken
|
||||
var genericParts = path.split("<");
|
||||
var typeParams:Array<TypeParam> = null;
|
||||
if (genericParts.length > 1) {
|
||||
|
@@ -70,8 +70,17 @@ class Kiss {
|
||||
Sys.println(nextExp.def.toString());
|
||||
#end
|
||||
var field = readerExpToField(nextExp, k);
|
||||
if (field != null)
|
||||
if (field != null) {
|
||||
#if test
|
||||
switch (field.kind) {
|
||||
case FVar(_, expr) | FFun({ret: _, args: _, expr: expr}):
|
||||
Sys.println(expr.toString());
|
||||
default:
|
||||
throw CompileError.fromExp(nextExp, 'cannot print the expression of generated field $field');
|
||||
}
|
||||
#end
|
||||
classFields.push(field);
|
||||
}
|
||||
case None:
|
||||
stream.dropWhitespace(); // If there was a comment, drop whitespace that comes after
|
||||
}
|
||||
@@ -141,7 +150,7 @@ class Kiss {
|
||||
throw CompileError.fromExp(exp, 'conversion not implemented');
|
||||
};
|
||||
#if test
|
||||
Sys.println(expr.toString());
|
||||
// Sys.println(expr.toString()); // For very fine-grained codegen inspection--slows compilation a lot.
|
||||
#end
|
||||
return expr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user