Skip to content

Commit

Permalink
chore: Add two nodes for handling exceptions in COBOL statements (#2236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurkambay authored Feb 29, 2024
1 parent d5cd89f commit 507c3e6
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public enum NodeType {
LITERAL,
MERGE,
OBSOLETE,
ON_EXCEPTION,
ON_NOT_EXCEPTION,
OPEN_STATEMENT,
PARAGRAPH,
PARAGRAPH_NAME_NODE,
Expand Down
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);
}
}
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);
}
}

0 comments on commit 507c3e6

Please sign in to comment.