-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch Expressions for Java 17+ Co-authored-by: Asaf Ben Natan <[email protected]>
- Loading branch information
1 parent
2caadbf
commit 5246989
Showing
22 changed files
with
799 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
rocker-compiler/src/main/java/com/fizzed/rocker/model/SwitchCaseExpressionBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2017 Fizzed Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.fizzed.rocker.model; | ||
|
||
/** | ||
* Represents else-if part of an if block. | ||
*/ | ||
public class SwitchCaseExpressionBlock extends BlockBegin { | ||
|
||
public SwitchCaseExpressionBlock(final SourceRef sourceRef, final String expression) { | ||
super(sourceRef, expression); | ||
} | ||
@Override | ||
public boolean supportsSourceJournaling() { | ||
return false; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
rocker-compiler/src/main/java/com/fizzed/rocker/model/SwitchCaseExpressionBlockEnd.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2015 Fizzed Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.fizzed.rocker.model; | ||
|
||
/** | ||
* | ||
* @author joelauer | ||
*/ | ||
public class SwitchCaseExpressionBlockEnd extends BlockEnd { | ||
|
||
public SwitchCaseExpressionBlockEnd(SourceRef sourceRef) { | ||
super(sourceRef); | ||
} | ||
@Override | ||
public boolean supportsSourceJournaling() { | ||
return false; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
rocker-compiler/src/main/java/com/fizzed/rocker/model/SwitchDefaultExpressionBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2017 Fizzed Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.fizzed.rocker.model; | ||
|
||
/** | ||
* Represents else-if part of an if block. | ||
*/ | ||
public class SwitchDefaultExpressionBlock extends BlockBegin { | ||
|
||
public SwitchDefaultExpressionBlock(final SourceRef sourceRef) { | ||
super(sourceRef,null ); | ||
} | ||
@Override | ||
public boolean supportsSourceJournaling() { | ||
return false; | ||
} | ||
} |
Oops, something went wrong.