2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 package com
.intellij
.psi
.controlFlow
;
22 public class ControlFlowInstructionVisitor
{
23 public void visitInstruction(Instruction instruction
, int offset
, int nextOffset
) {
26 public void visitEmptyInstruction(EmptyInstruction instruction
, int offset
, int nextOffset
) {
27 visitSimpleInstruction(instruction
, offset
, nextOffset
);
29 public void visitCommentInstruction(CommentInstruction instruction
, int offset
, int nextOffset
) {
30 visitSimpleInstruction(instruction
, offset
, nextOffset
);
32 public void visitReadVariableInstruction(ReadVariableInstruction instruction
, int offset
, int nextOffset
) {
33 visitSimpleInstruction(instruction
, offset
, nextOffset
);
35 public void visitWriteVariableInstruction(WriteVariableInstruction instruction
, int offset
, int nextOffset
) {
36 visitSimpleInstruction(instruction
, offset
, nextOffset
);
38 public void visitSimpleInstruction(SimpleInstruction instruction
, int offset
, int nextOffset
) {
39 visitInstruction(instruction
, offset
, nextOffset
);
41 public void visitBranchingInstruction(BranchingInstruction instruction
, int offset
, int nextOffset
) {
42 visitInstruction(instruction
, offset
, nextOffset
);
44 public void visitConditionalBranchingInstruction(ConditionalBranchingInstruction instruction
, int offset
, int nextOffset
) {
45 visitBranchingInstruction(instruction
, offset
, nextOffset
);
47 public void visitConditionalGoToInstruction(ConditionalGoToInstruction instruction
, int offset
, int nextOffset
) {
48 visitConditionalBranchingInstruction(instruction
, offset
, nextOffset
);
50 public void visitConditionalThrowToInstruction(ConditionalThrowToInstruction instruction
, int offset
, int nextOffset
) {
51 visitConditionalBranchingInstruction(instruction
, offset
, nextOffset
);
53 public void visitThrowToInstruction(ThrowToInstruction instruction
, int offset
, int nextOffset
) {
54 visitBranchingInstruction(instruction
, offset
, nextOffset
);
56 public void visitGoToInstruction(GoToInstruction instruction
, int offset
, int nextOffset
) {
57 visitBranchingInstruction(instruction
, offset
, nextOffset
);
59 public void visitCallInstruction(CallInstruction instruction
, int offset
, int nextOffset
) {
60 visitGoToInstruction(instruction
, offset
, nextOffset
);
62 public void visitReturnInstruction(ReturnInstruction instruction
, int offset
, int nextOffset
) {
63 visitGoToInstruction(instruction
, offset
, nextOffset
);