mirror of
https://github.com/fluencelabs/aqua.git
synced 2025-04-25 06:52:13 +00:00
Add top-bottom support (#442)
This commit is contained in:
parent
4c08cf7343
commit
5eae05dff0
@ -17,7 +17,7 @@ val scribeV = "3.6.3"
|
||||
name := "aqua-hll"
|
||||
|
||||
val commons = Seq(
|
||||
baseAquaVersion := "0.6.1",
|
||||
baseAquaVersion := "0.6.2",
|
||||
version := baseAquaVersion.value + "-" + sys.env.getOrElse("BUILD_NUMBER", "SNAPSHOT"),
|
||||
scalaVersion := dottyVersion,
|
||||
libraryDependencies ++= Seq(
|
||||
|
@ -24,7 +24,10 @@ object Console {
|
||||
override def fnName: String = funcName
|
||||
|
||||
def handler: ServiceHandler = { varArgs =>
|
||||
OutputPrinter.print(JSON.stringify(varArgs(0), space = 2))
|
||||
js.typeOf(varArgs(0)) match {
|
||||
case "string" | "number" | "boolean" => OutputPrinter.print(varArgs(0).toString)
|
||||
case _ => OutputPrinter.print(JSON.stringify(varArgs(0), space = 2))
|
||||
}
|
||||
js.Promise.resolve(Service.emptyObject)
|
||||
}
|
||||
def argDefinitions: List[ArgDefinition] = ArgDefinition("str", PrimitiveType) :: Nil
|
||||
|
@ -143,18 +143,18 @@ object DataTypeToken {
|
||||
|
||||
val `withoutstreamdatatypedef`: P[DataTypeToken[Span.S]] =
|
||||
P.oneOf(
|
||||
P.defer(`arraytypedef`) :: P.defer(
|
||||
P.defer(`topbottomdef`) :: P.defer(`arraytypedef`) :: P.defer(
|
||||
OptionTypeToken.`optiontypedef`
|
||||
) :: BasicTypeToken
|
||||
.`basictypedef` :: CustomTypeToken.dotted :: Nil
|
||||
) :: BasicTypeToken.`basictypedef` :: CustomTypeToken.dotted :: Nil
|
||||
)
|
||||
|
||||
def `datatypedef`: P[DataTypeToken[Span.S]] =
|
||||
P.oneOf(
|
||||
P.defer(`arraytypedef`) :: P.defer(StreamTypeToken.`streamtypedef`) :: P.defer(
|
||||
P.defer(`topbottomdef`) :: P.defer(`arraytypedef`) :: P.defer(
|
||||
StreamTypeToken.`streamtypedef`
|
||||
) :: P.defer(
|
||||
OptionTypeToken.`optiontypedef`
|
||||
) :: BasicTypeToken
|
||||
.`basictypedef` :: CustomTypeToken.dotted :: Nil
|
||||
) :: BasicTypeToken.`basictypedef` :: CustomTypeToken.dotted :: Nil
|
||||
)
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user