Skip to content

Package: PlusState

PlusState

nameinstructionbranchcomplexitylinemethod
PlusState()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
parse(RouterSoftware, TempVariableType, Buffer, TypeFileParser)
M: 32 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: *
3: */
4: package parser.states.typestates;
5:
6: import model.RouterSoftware;
7: import parser.ParserException;
8: import parser.TypeFileParser;
9: import parser.tempparserobjects.TempVariableType;
10: import symbols.AbstractSymbol;
11: import symbols.IdentifierSymbol;
12: import basic.Buffer;
13:
14: /**
15: * @author Hendrik
16: *
17: */
18: public class PlusState extends AbstractTypeState {
19:
20:         @Override
21:         public void parse(final RouterSoftware rs, final TempVariableType tVT,
22:                         final Buffer<AbstractSymbol> buffer, final TypeFileParser tFP)
23:                         throws InterruptedException, ParserException {
24:                 final AbstractSymbol nextSymbol = buffer.peek();
25:•                if (nextSymbol instanceof IdentifierSymbol) {
26:                         tFP.setState(new AdditionalIdentifierState());
27:                 } else {
28:                         throw new ParserException("no valid symbol: "
29:                                         + buffer.peek().getClass().getCanonicalName()
30:                                         + " expected AdditionalIdentifierSymbol");
31:                 }
32:
33:         }
34:
35: }