Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Serializable[T]{
- method serialize(val:ref T, emitter:ref ExpressionEmitter):ref Expression;
- }
- instance Serializable[i32]{
- method serialize(val:ref i32, emitter:ref ExpressionEmitter):ref Expression{
- return emitter.buildIntLiteral(i32, val);
- }
- }
- instance Serializable[string]{
- method serialize(val:ref string, emitter:ref ExpressionEmitter):ref Expression{
- return emitter.buildStringLiteral(val);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement