
syntax = "proto3";
package xolir;
option java_package = "com.apivolve.xolir";

import "xolir/builtin_function.proto";
import "xolir/builtin_type.proto";

message FuncRef {
  oneof target {
    BuiltinFunc builtin = 1;
    uint64 func_ix = 2;
  }
}

message TypeRef {
  //TODO @mark: could be something like `T` or `List<int>`
  oneof target {
    BuiltinType builtin = 1;
    // struct, union, array, virtual...
    uint64 type_id = 2;
  }
  //TODO @mark: oneof builtin, struct, generic...
}

message TypedName {
  //TODO @mark: could be something like `T` or `List<int>`
  string name = 1;
  TypeRef type_id = 2;
}
