mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
parent
e2621f0008
commit
2d1427b124
@ -1,8 +1,11 @@
|
||||
service Local("smth"):
|
||||
getString: -> string
|
||||
service Test("test"):
|
||||
getBool: -> bool
|
||||
getList: -> []string
|
||||
|
||||
func join() -> string:
|
||||
app <- Local.getString()
|
||||
on "app.user_list.peer_id":
|
||||
res <- Local.getString()
|
||||
<- res
|
||||
func f():
|
||||
list <- Test.getList()
|
||||
for user <- list:
|
||||
on "peer" via "relay":
|
||||
isOnline <- Test.getBool()
|
||||
if isOnline:
|
||||
Test.getBool()
|
@ -10,7 +10,15 @@ import LiftParser._
|
||||
|
||||
case class ForExpr[F[_]](item: Name[F], iterable: Value[F], par: Option[F[Unit]]) extends Expr[F]
|
||||
|
||||
object ForExpr extends Expr.AndIndented(Expr.defer(OnExpr), ParExpr, CallArrowExpr, AbilityIdExpr) {
|
||||
object ForExpr
|
||||
extends Expr.AndIndented(
|
||||
Expr.defer(OnExpr),
|
||||
ParExpr,
|
||||
CallArrowExpr,
|
||||
AbilityIdExpr,
|
||||
Expr.defer(IfExpr),
|
||||
Expr defer ElseOtherwiseExpr
|
||||
) {
|
||||
|
||||
override def p[F[_]: LiftParser: Comonad]: P[ForExpr[F]] =
|
||||
((`for` *> ` ` *> Name.p[F] <* ` <- `) ~ Value.`value`[F] ~ (` ` *> `par`.lift).?).map {
|
||||
|
Loading…
Reference in New Issue
Block a user