Skip to content

Commit

Permalink
Replace Scala Empty with Java Empty annotated with @IRNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Dec 2, 2024
1 parent 1b7a120 commit aa345ed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.enso.compiler.core.ir;

import java.util.UUID;
import org.enso.compiler.core.IR;
import org.enso.runtime.parser.dsl.IRCopyMethod;
import org.enso.runtime.parser.dsl.IRNode;

@IRNode
public interface Empty extends IR {
static Empty createEmpty() {
return EmptyGen.builder().build();
}

static Empty createFromLocation(IdentifiedLocation location) {
return EmptyGen.builder().location(location).build();
}

static Empty createFromLocationAndPassData(IdentifiedLocation location, MetadataStorage passData) {
return EmptyGen.builder()
.location(location)
.passData(passData)
.build();
}

@IRCopyMethod
Empty copy(IdentifiedLocation location, MetadataStorage passData, DiagnosticStorage diagnostics, UUID id);
}

This file was deleted.

0 comments on commit aa345ed

Please sign in to comment.