-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zhirkevich Alexander Y
authored and
Zhirkevich Alexander Y
committed
Oct 16, 2024
1 parent
9844343
commit d60feb2
Showing
25 changed files
with
527 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
skriptie/src/commonMain/kotlin/io/github/alexzhirkevich/skriptie/common/OpBooleans.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
skriptie/src/commonMain/kotlin/io/github/alexzhirkevich/skriptie/common/OpTyped.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.github.alexzhirkevich.skriptie.common | ||
|
||
import io.github.alexzhirkevich.skriptie.Expression | ||
import io.github.alexzhirkevich.skriptie.invoke | ||
|
||
internal fun OpLongInt( | ||
a : Expression, | ||
b : Expression, | ||
op : (Long, Int) -> Long | ||
) = Expression { | ||
val an = it.toNumber(a(it)).toLong() | ||
val bn = it.toNumber(b(it)).toInt() | ||
|
||
op(an, bn) | ||
} | ||
|
||
internal fun OpLongLong( | ||
a : Expression, | ||
b : Expression, | ||
op: (Long, Long) -> Long | ||
) = Expression{ | ||
val an = it.toNumber(a(it)).toLong() | ||
val bn = it.toNumber(b(it)).toLong() | ||
|
||
op(an, bn) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.