envlang-csharp/Evaluator.cs
2020-08-16 00:45:06 +00:00

8 lines
175 B
C#

public class Evaluator {
public static string Evaluate(Ast.Expr source) {
return source.Match(
Int: i => i.ToString(),
String: s => s.ToString()
);
}
}