Open eakarsu opened 7 years ago
I am trying to convert the following long transition expression to this Mvel-based one. But I am getting error. I appreciate any help
2017-10-13 18:48:40,254 ERROR [main] (MvelConditionImpl.java:47) - Evaluate "(context.nextChar!=null && context.nextChar.equals(SLASH))" failed with [Error: could not access: nextChar; in class: java.util.HashMap] [Near : {... (context.nextChar!=null && cont ....}]
builder.externalTransition().from(ParserState.COMMENT).to(ParserState.RULE).on(STAR).whenMvel("Cond2:::(context.nextChar!=null && context.nextChar.equals(STAR))");
builder.externalTransition().from(ParserState.COMMENT).to(ParserState.RULE).on(STAR).when( new Condition() { @Override public boolean isSatisfied(ParserContext context) { return context.nextChar!=null && context.nextChar.equals(SLASH); }
@Override public String name() { return "Cond2"; } });
I am trying to convert the following long transition expression to this Mvel-based one. But I am getting error. I appreciate any help
2017-10-13 18:48:40,254 ERROR [main] (MvelConditionImpl.java:47) - Evaluate "(context.nextChar!=null && context.nextChar.equals(SLASH))" failed with [Error: could not access: nextChar; in class: java.util.HashMap] [Near : {... (context.nextChar!=null && cont ....}]
builder.externalTransition().from(ParserState.COMMENT).to(ParserState.RULE).on(STAR).whenMvel("Cond2:::(context.nextChar!=null && context.nextChar.equals(STAR))");
builder.externalTransition().from(ParserState.COMMENT).to(ParserState.RULE).on(STAR).when( new Condition() {
@Override
public boolean isSatisfied(ParserContext context) {
return context.nextChar!=null && context.nextChar.equals(SLASH);
}