All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aya.compiler.PrimSerializer Maven / Gradle / Ivy

// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.compiler;

import kala.collection.immutable.ImmutableSeq;
import org.aya.syntax.compile.JitPrim;
import org.aya.syntax.core.def.PrimDef;
import org.jetbrains.annotations.NotNull;

public class PrimSerializer extends JitTeleSerializer {
  public PrimSerializer(@NotNull AbstractSerializer parent) {
    super(parent, JitPrim.class);
  }
  @Override protected void buildConstructor(PrimDef unit) {
    super.buildConstructor(unit, ImmutableSeq.of(STR."org.aya.syntax.core.def.PrimDef.ID.\{unit.id.name()}"));
  }
  @Override public PrimSerializer serialize(PrimDef unit) {
    buildFramework(unit, () -> { });
    return this;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy