|
| def | __getitem__ (self, item) |
| |
| def | __init__ (self, tokens, errors=()) |
| |
| def | __iter__ (self) |
| |
| def | __len__ (self) |
| |
| def | __repr__ (self) |
| |
| def | from_params (cls, *args, **kwargs) |
| | Create statement from passed parameters. More...
|
| |
| def | from_tokens (cls, tokens) |
| |
| def | get_token (self, *types) |
| | Return a token with the given type. More...
|
| |
| def | get_tokens (self, *types) |
| | Return tokens having any of the given types. More...
|
| |
| def | get_value (self, type, default=None) |
| | Return value of a token with the given type. More...
|
| |
| def | get_values (self, *types) |
| | Return values of tokens having any of the given types. More...
|
| |
| def | register (cls, subcls) |
| |
| def | validate (self, context) |
| |
Definition at line 31 of file statements.py.
◆ __init__()
| def robot.parsing.model.statements.Statement.__init__ |
( |
|
self, |
|
|
|
tokens, |
|
|
|
errors = () |
|
) |
| |
◆ __getitem__()
| def robot.parsing.model.statements.Statement.__getitem__ |
( |
|
self, |
|
|
|
item |
|
) |
| |
◆ __iter__()
| def robot.parsing.model.statements.Statement.__iter__ |
( |
|
self | ) |
|
◆ __len__()
| def robot.parsing.model.statements.Statement.__len__ |
( |
|
self | ) |
|
◆ __repr__()
| def robot.parsing.model.statements.Statement.__repr__ |
( |
|
self | ) |
|
◆ col_offset()
| def robot.parsing.model.statements.Statement.col_offset |
( |
|
self | ) |
|
|
private |
◆ data_tokens()
| def robot.parsing.model.statements.Statement.data_tokens |
( |
|
self | ) |
|
|
private |
◆ end_col_offset()
| def robot.parsing.model.statements.Statement.end_col_offset |
( |
|
self | ) |
|
|
private |
◆ end_lineno()
| def robot.parsing.model.statements.Statement.end_lineno |
( |
|
self | ) |
|
|
private |
◆ from_params()
| def robot.parsing.model.statements.Statement.from_params |
( |
|
cls, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
Create statement from passed parameters.
Required and optional arguments should match class properties. Values are
used to create matching tokens.
There is one notable difference for `Documentation` statement where
``settings_header`` flag is used to determine if statement belongs to
settings header or test/keyword.
Most implementations support following general properties:
- ``separator`` whitespace inserted between each token. Default is four spaces.
- ``indent`` whitespace inserted before first token. Default is four spaces.
- ``eol`` end of line sign. Default is ``'\\n'``.
Definition at line 107 of file statements.py.
◆ from_tokens()
| def robot.parsing.model.statements.Statement.from_tokens |
( |
|
cls, |
|
|
|
tokens |
|
) |
| |
◆ get_token()
| def robot.parsing.model.statements.Statement.get_token |
( |
|
self, |
|
|
* |
types |
|
) |
| |
Return a token with the given type.
If there are no matches, return ``None``. If there are multiple
matches, return the first match.
Definition at line 121 of file statements.py.
◆ get_tokens()
| def robot.parsing.model.statements.Statement.get_tokens |
( |
|
self, |
|
|
* |
types |
|
) |
| |
◆ get_value()
| def robot.parsing.model.statements.Statement.get_value |
( |
|
self, |
|
|
|
type, |
|
|
|
default = None |
|
) |
| |
Return value of a token with the given type.
If there are no matches, return ``default``. If there are multiple
matches, return the value of the first match.
Definition at line 136 of file statements.py.
◆ get_values()
| def robot.parsing.model.statements.Statement.get_values |
( |
|
self, |
|
|
* |
types |
|
) |
| |
◆ lineno()
| def robot.parsing.model.statements.Statement.lineno |
( |
|
self | ) |
|
|
private |
◆ lines()
| def robot.parsing.model.statements.Statement.lines |
( |
|
self | ) |
|
|
private |
◆ register()
| def robot.parsing.model.statements.Statement.register |
( |
|
cls, |
|
|
|
subcls |
|
) |
| |
◆ validate()
| def robot.parsing.model.statements.Statement.validate |
( |
|
self, |
|
|
|
context |
|
) |
| |
◆ _attributes
| robot.parsing.model.statements.Statement._attributes |
|
staticprivate |
◆ _fields
| robot.parsing.model.statements.Statement._fields |
|
staticprivate |
◆ _statement_handlers
| robot.parsing.model.statements.Statement._statement_handlers |
|
staticprivate |
◆ errors
| robot.parsing.model.statements.Statement.errors |
◆ handles_types
| tuple robot.parsing.model.statements.Statement.handles_types = () |
|
static |
◆ tokens
| robot.parsing.model.statements.Statement.tokens |
◆ type
| robot.parsing.model.statements.Statement.type = None |
|
static |
◆ col_offset
| robot.parsing.model.statements.Statement.col_offset = property |
|
static |
◆ data_tokens
| robot.parsing.model.statements.Statement.data_tokens = property |
|
static |
◆ end_col_offset
| robot.parsing.model.statements.Statement.end_col_offset = property |
|
static |
◆ end_lineno
| robot.parsing.model.statements.Statement.end_lineno = property |
|
static |
◆ lineno
| robot.parsing.model.statements.Statement.lineno = property |
|
static |
◆ lines
| robot.parsing.model.statements.Statement.lines = property |
|
static |
The documentation for this class was generated from the following file: