Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
DEST_DIR="arkanalyzer"
MAX_RETRIES=10
RETRY_DELAY=3 # Delay between retries in seconds
BRANCH="neo/2025-04-14"
BRANCH="neo/2025-05-30"

for ((i=1; i<=MAX_RETRIES; i++)); do
git clone --depth=1 --branch $BRANCH $REPO_URL $DEST_DIR && break
Expand Down
6 changes: 6 additions & 0 deletions jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Convert.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import org.jacodb.ets.model.EtsDecorator
import org.jacodb.ets.model.EtsDeleteExpr
import org.jacodb.ets.model.EtsDivExpr
import org.jacodb.ets.model.EtsEntity
import org.jacodb.ets.model.EtsEnumValueType
import org.jacodb.ets.model.EtsEqExpr
import org.jacodb.ets.model.EtsExpExpr
import org.jacodb.ets.model.EtsExpr
Expand Down Expand Up @@ -492,6 +493,11 @@ fun TypeDto.toEtsType(): EtsType = when (this) {

is ClassTypeDto -> toEtsClassType()

is EnumValueTypeDto -> EtsEnumValueType(
signature = signature.toEtsFieldSignature(),
constant = constant?.toEtsConstant(),
)

is FunctionTypeDto -> EtsFunctionType(
signature = signature.toEtsMethodSignature(),
typeParameters = typeParameters.map { it.toEtsType() },
Expand Down
7 changes: 7 additions & 0 deletions jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ data class AliasTypeDto(
val signature: LocalSignatureDto,
) : TypeDto

@Serializable
@SerialName("EnumValueType")
data class EnumValueTypeDto(
val signature: FieldSignatureDto,
val constant: ConstantDto? = null,
): TypeDto

@Serializable
@SerialName("VoidType")
data object VoidTypeDto : TypeDto
Expand Down
15 changes: 15 additions & 0 deletions jacodb-ets/src/main/kotlin/org/jacodb/ets/model/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface EtsType : TypeName, CommonType {
fun visit(type: EtsIntersectionType): R
fun visit(type: EtsGenericType): R
fun visit(type: EtsAliasType): R
fun visit(type: EtsEnumValueType): R

// Primitive
fun visit(type: EtsBooleanType): R
Expand Down Expand Up @@ -371,3 +372,17 @@ data class EtsFunctionType(
return visitor.visit(this)
}
}

data class EtsEnumValueType(
val signature: EtsFieldSignature,
val constant: EtsConstant? = null,
): EtsType {
override val typeName: String
get() = signature.name

override fun toString(): String = typeName

override fun <R> accept(visitor: EtsType.Visitor<R>): R {
return visitor.visit(this)
}
}
Loading