Profile: Apply profile values
This commit is contained in:
@ -30,6 +30,16 @@ class ConfigVisitor : IVisitorCallback {
|
||||
return NeoLangArray.createFromContext(getContext(contextPath).getChild(arrayName))
|
||||
}
|
||||
|
||||
fun getStringValue(path: Array<String>, name: String): String? {
|
||||
val value = this.getAttribute(path, name)
|
||||
return if (value.isValid()) value.asString() else null
|
||||
}
|
||||
|
||||
fun getBooleanValue(path: Array<String>, name: String): Boolean? {
|
||||
val value = this.getAttribute(path, name)
|
||||
return if (value.isValid()) value.asString() == "true" else null
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
currentContext = NeoLangContext("global")
|
||||
rootContext = currentContext
|
||||
@ -60,9 +70,4 @@ class ConfigVisitor : IVisitorCallback {
|
||||
override fun getCurrentContext(): NeoLangContext {
|
||||
return currentContext!!
|
||||
}
|
||||
|
||||
fun getStringValue(path: Array<String>, name: String): String? {
|
||||
val value = this.getAttribute(path, name)
|
||||
return if (value.isValid()) value.asString() else null
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user