This is an automated email from the ASF dual-hosted git repository. aradzinski pushed a commit to branch NLPCRAFT-206 in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 7d7e6ac523700e01167888eea718c6bfaecd37ce Author: Aaron Radzinski <[email protected]> AuthorDate: Sat Mar 13 00:29:45 2021 -0800 WIP. --- .../scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompiler.scala | 2 +- .../org/apache/nlpcraft/model/intent/compiler/NCDslCompilerBase.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompiler.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompiler.scala index 7bdd183..18524a0 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompiler.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompiler.scala @@ -315,7 +315,7 @@ object NCDslCompiler extends LazyLogging { val x = stack.pop() if (!isBool(x.fun)) - throw newRuntimeError(s"$subj does not return boolean value: ${ctx.getText}") + throw newRuntimeError(s"$subj did not return boolean value: ${ctx.getText}") (asBool(x.fun), x.usedTok) } diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompilerBase.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompilerBase.scala index bc82d7c..b0f5756 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompilerBase.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCDslCompilerBase.scala @@ -664,7 +664,7 @@ trait NCDslCompilerBase { } def token(): NCToken = - if (stack.nonEmpty && stack.top.isInstanceOf[NCToken]) stack.top.asInstanceOf[NCToken] else tok + if (stack.nonEmpty && stack.top.isInstanceOf[NCToken]) stack.pop().asInstanceOf[NCToken] else tok def doPart(): Unit = { val (t, aliasId, f) = get1Tok1Str()
