Class IRStatement
java.lang.Object
org.opendaylight.yangtools.yang.parser.rfc7950.ir.IRStatement
- All Implemented Interfaces:
Immutable
A single YANG statement in its raw string form. A statement is composed of:
- a mandatory keyword, modeled as
IRKeyword
- an optional argument, modeled as
IRArgument
- zero or more nested statements
-
Method Summary
Modifier and TypeMethodDescriptionfinal @Nullable IRArgument
argument()
Return this statement's argument, if it is present.final @NonNull IRKeyword
keyword()
Return this statement's keyword.abstract int
Return the column number on which this statement's keyword has its first character, counting from 0.abstract int
Return the line number on which this statement's keyword has its first character, counting from 1.@NonNull List<? extends IRStatement>
Return this statement's substatements.final String
toString()
-
Method Details
-
keyword
Return this statement's keyword.- Returns:
- This statement's keyword.
-
argument
Return this statement's argument, if it is present.- Returns:
- This statement's argument, or null if this statement does not have an argument
-
statements
Return this statement's substatements.- Returns:
- This statement's substatements.
-
startLine
public abstract int startLine()Return the line number on which this statement's keyword has its first character, counting from 1. This information is used only for diagnostic purposes.- Returns:
- Line number where this statement started in the source code.
-
startColumn
public abstract int startColumn()Return the column number on which this statement's keyword has its first character, counting from 0. This information is used only for diagnostic purposes.- Returns:
- Column number where this statement started in the source code.
-
toString
-