Add an explicit intermediate YANG representation
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / ir / IRStatement031.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.parser.rfc7950.ir;
9
10 final class IRStatement031 extends IRStatement {
11     private final int value;
12
13     IRStatement031(final IRKeyword keyword, final IRArgument argument, final int startLine, final int startColumn) {
14         super(keyword, argument);
15         this.value = startLine << 8 | startColumn & 0xFF;
16     }
17
18     @Override
19     public int startLine() {
20         return value >>> 8;
21     }
22
23     @Override
24     public int startColumn() {
25         return value & 0xFF;
26     }
27 }