-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add two nodes for handling exceptions in COBOL statements (#2236)
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 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
32 changes: 32 additions & 0 deletions
32
server/common/src/main/java/org/eclipse/lsp/cobol/common/model/tree/OnExceptionNode.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,32 @@ | ||
/* | ||
* Copyright (c) 2024 Broadcom. | ||
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Broadcom, Inc. - initial API and implementation | ||
* | ||
*/ | ||
package org.eclipse.lsp.cobol.common.model.tree; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import org.eclipse.lsp.cobol.common.model.Locality; | ||
import org.eclipse.lsp.cobol.common.model.NodeType; | ||
|
||
/** The class represents an ON EXCEPTION statement in Cobol */ | ||
@ToString(callSuper = true) | ||
@Getter | ||
@EqualsAndHashCode(callSuper = true) | ||
public class OnExceptionNode extends Node { | ||
|
||
public OnExceptionNode(Locality location) { | ||
super(location, NodeType.ON_EXCEPTION); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
server/common/src/main/java/org/eclipse/lsp/cobol/common/model/tree/OnNotExceptionNode.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,32 @@ | ||
/* | ||
* Copyright (c) 2024 Broadcom. | ||
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Broadcom, Inc. - initial API and implementation | ||
* | ||
*/ | ||
package org.eclipse.lsp.cobol.common.model.tree; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import org.eclipse.lsp.cobol.common.model.Locality; | ||
import org.eclipse.lsp.cobol.common.model.NodeType; | ||
|
||
/** The class represents an ON NOT EXCEPTION statement in Cobol */ | ||
@ToString(callSuper = true) | ||
@Getter | ||
@EqualsAndHashCode(callSuper = true) | ||
public class OnNotExceptionNode extends Node { | ||
|
||
public OnNotExceptionNode(Locality location) { | ||
super(location, NodeType.ON_NOT_EXCEPTION); | ||
} | ||
} |