Skip to content

Commit

Permalink
Merge branch '6.1.0' into 6.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	loader/build.xml
#	loader/pom.xml
  • Loading branch information
michaeloffner committed Jun 22, 2024
2 parents 4563d45 + b7d5d97 commit a0ff1e9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/lucee/transformer/cfml/Data.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public class Data {
private Body parent;
public ExprTransformer transformer;

public boolean insideTenaryMiddle = false;
public boolean insideCase = false;

public Data(Factory factory, Config config, Page page, SourceCode srcCode, EvaluatorPool ep, TransfomerSettings settings, TagLib[][] tlibs, FunctionLib flibs,
TagLibTag[] scriptTags, boolean allowLowerThan) {
this.page = page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ public abstract class AbstrCFMLExprTransformer {
protected short ATTR_TYPE_OPTIONAL = TagLibTagAttr.SCRIPT_SUPPORT_OPTIONAL;
protected short ATTR_TYPE_REQUIRED = TagLibTagAttr.SCRIPT_SUPPORT_REQUIRED;

private short tenaryContext = 0;
protected boolean insideCase = false;

protected static EndCondition SEMI_BLOCK = new EndCondition() {
@Override
public boolean isEnd(Data data) {
Expand Down Expand Up @@ -388,14 +385,14 @@ private Expression conditionalOp(Data data) throws TemplateException {

// tenary middle
Expression left;
short pre = 0;
boolean pre = false;
try {
pre = tenaryContext;
tenaryContext = CTX_TENARY_MIDDLE;
pre = data.insideTenaryMiddle;
data.insideTenaryMiddle = true;
left = assignOp(data);
}
finally {
tenaryContext = pre;
data.insideTenaryMiddle = pre;
}
comments(data);
if (!data.srcCode.forwardIfCurrent(':')) throw new TemplateException(data.srcCode, "invalid conditional operator");
Expand Down Expand Up @@ -1879,7 +1876,7 @@ private FunctionMember getFunctionMember(Data data, final ExprString name, boole
}

private Expression getListener(Data data) throws TemplateException {
if (!insideCase && tenaryContext != CTX_TENARY_MIDDLE && data.srcCode.isPreviousIgnoreSpace(')') && data.srcCode.forwardIfCurrent(':')) {
if (!data.insideCase && data.insideTenaryMiddle && data.srcCode.isPreviousIgnoreSpace(')') && data.srcCode.forwardIfCurrent(':')) {
int pos = data.srcCode.getPos();
comments(data);
Expression expr = assignOp(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,13 @@ private final boolean caseStatement(Data data, Switch swit) throws TemplateExcep
// int line=data.srcCode.getLine();
comments(data);
Expression expr;
boolean pre = insideCase;
boolean pre = data.insideCase;
try {
insideCase = true;
data.insideCase = true;
expr = super.expression(data);
}
finally {
insideCase = pre;
data.insideCase = pre;
}
comments(data);

Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.1.1.5-SNAPSHOT"/>
<property name="version" value="6.1.1.6-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.1.1.5-SNAPSHOT</version>
<version>6.1.1.6-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit a0ff1e9

Please sign in to comment.