Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2023 RAW Labs S.A.
*
* Use of this software is governed by the Business Source License
* included in the file licenses/BSL.txt.
*
* As of the Change Date specified in that file, in accordance with
* the Business Source License, use of this software will be governed
* by the Apache License, Version 2.0, included in the file
* licenses/APL.txt.
*/
package raw.compiler.rql2
import raw.compiler.base
trait Keywords extends base.Keywords {
private val reservedIdns: Seq[String] = Seq(
"let", // Let declaration.
"in", // Let declaration.
"rec", // Let recursive declaration.
"type", // Type declaration.
"if", // If-Then-Else control flow.
"then", // If-Then-Else control flow.
"else", // If-Then-Else control flow.
"false", // Boolean constants.
"true", // Boolean constants.
"not", // Boolean operator.
"package" // Package definition
)
private val reservedTypes: Seq[String] = Seq(
"error",
"any",
"nothing",
"bool",
"string",
"byte",
"short",
"int",
"long",
"float",
"double",
"decimal",
"date",
"time",
"timestamp",
"interval",
"binary",
"void",
"record",
"list",
"generator",
"option",
"location",
"collection",
"library",
"package",
"try",
"common"
)
override def isReserved(idn: String): Boolean = reservedIdns.contains(idn)
override def isReservedType(idn: String): Boolean = reservedTypes.contains(idn)
}