" def getValue():Int\n" +
" metadata:HasParser = myNumMetadata\n" +
"val n:MyNum = { 5 }\n" +
"n.getValue()";
TypedAST res = (TypedAST)new Wyvern().parse(new StringReader(input), "test input");
Type parserType = Util.javaToWyvType(ExtParser.class);
Type metaType = Util.javaToWyvType(HasParser.class);
final ExtParser parseri = str -> {
New newv = new New(new HashMap<>(), null);
TypedAST dbody = new IntegerConstant(Integer.parseInt(str.getSrcString().trim()));
newv.setBody(new DeclSequence(Arrays.asList(new DefDeclaration("getValue", new Arrow(Unit.getInstance(), Int.getInstance()), new ArrayList<>(), dbody, false))));
return newv;
};
HasParser inner = new HasParser() {