Exception Trigger
Hi,
I had this code (from a combinator parser class):
private
def
varName: Parser[String] =
boundVar(nameSym) | implicitVar
private
def
boundVar(np: => Parser[String]): Parser[String] =
Parser {
in =>
np(in) match {
case s @ Success(varName, _) =>
if (isBound(varName)) s
else Failure("variable \"" + varName + "\" is not bound", in)
case ns => ns
}
}
And changed it to this as part of an experiment:
private
def
varName: Parser[String] =
boundVar/*(nameSym)*/ | implicitVar
private
def
boundVar/*(np: => Parser[String])*/: Parser[String] =
Parser {
in =>
/*np(in)*/ nameSym match {
case s @ Success(varName, _) =>
if (isBound(varName)) s
else Failure("variable \"" + varName + "\" is not bound", in)
case ns => ns
}
}
And when I did that I started getting an unending stream of exceptions from the Scala plug-in. When this happens I have to restart IDEA. Only this time the exceptions began again as soon as I opened the project and without me doing anything at all after opening that project. So I backed out the change while IDEA was shut down. When I started it again the exceptions did not occur.
Randall Schulz
请先登录再写评论。