robot.parsing.model package¶
Submodules¶
robot.parsing.model.blocks module¶
-
class
robot.parsing.model.blocks.Block[source]¶ Bases:
_ast.AST-
errors= ()¶
-
lineno¶
-
col_offset¶
-
end_lineno¶
-
end_col_offset¶
-
-
class
robot.parsing.model.blocks.HeaderAndBody(header, body=None, errors=())[source]¶ Bases:
robot.parsing.model.blocks.Block-
errors= ()¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.File(sections=None, source=None)[source]¶ Bases:
robot.parsing.model.blocks.Block-
save(output=None)[source]¶ Save model to the given
outputor to the original source file.The
outputcan be a path to a file or an already opened file object. Ifoutputis not given, the original source file will be overwritten.
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.Section(header=None, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Block-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.SettingSection(header=None, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Section-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.VariableSection(header=None, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Section-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.TestCaseSection(header=None, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Section-
tasks¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.KeywordSection(header=None, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Section-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.CommentSection(header=None, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Section-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.TestCase(header, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Block-
name¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.Keyword(header, body=None)[source]¶ Bases:
robot.parsing.model.blocks.Block-
name¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
errors= ()¶
-
lineno¶
-
validate(context)¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.If(header, body=None, orelse=None, end=None, errors=())[source]¶ Bases:
robot.parsing.model.blocks.BlockRepresents IF structures in the model.
Used with IF, Inline IF, ELSE IF and ELSE nodes. The
typeattribute specifies the type.-
errors= ()¶
-
type¶
-
condition¶
-
assign¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
lineno¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.For(header, body=None, end=None, errors=())[source]¶ Bases:
robot.parsing.model.blocks.Block-
errors= ()¶
-
variables¶
-
values¶
-
flavor¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
lineno¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.Try(header, body=None, next=None, end=None, errors=())[source]¶ Bases:
robot.parsing.model.blocks.Block-
errors= ()¶
-
type¶
-
patterns¶
-
pattern_type¶
-
variable¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
lineno¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.While(header, body=None, end=None, errors=())[source]¶ Bases:
robot.parsing.model.blocks.Block-
errors= ()¶
-
condition¶
-
limit¶
-
col_offset¶
-
end_col_offset¶
-
end_lineno¶
-
lineno¶
-
validate_model()¶
-
-
class
robot.parsing.model.blocks.ModelWriter(output)[source]¶ Bases:
robot.parsing.model.visitor.ModelVisitor-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
visit(node)¶ Visit a node.
-
-
class
robot.parsing.model.blocks.ModelValidator[source]¶ Bases:
robot.parsing.model.visitor.ModelVisitor-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
visit(node)¶ Visit a node.
-
-
class
robot.parsing.model.blocks.ValidationContext[source]¶ Bases:
object-
in_keyword¶
-
in_for¶
-
in_while¶
-
-
class
robot.parsing.model.blocks.FirstStatementFinder[source]¶ Bases:
robot.parsing.model.visitor.ModelVisitor-
visit(node)¶ Visit a node.
-
robot.parsing.model.statements module¶
-
class
robot.parsing.model.statements.Statement(tokens, errors=())[source]¶ Bases:
_ast.AST-
type= None¶
-
handles_types= ()¶
-
lineno¶
-
col_offset¶
-
end_lineno¶
-
end_col_offset¶
-
classmethod
from_params(*args, **kwargs)[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
data_tokens¶
-
get_token(*types)[source]¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_value(type, default=None)[source]¶ 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.
-
lines¶
-
-
class
robot.parsing.model.statements.DocumentationOrMetadata(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(*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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.SingleValue(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
value¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(*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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.MultiValue(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
values¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(*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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Fixture(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
name¶
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(*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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.SectionHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
handles_types= ('SETTING HEADER', 'VARIABLE HEADER', 'TESTCASE HEADER', 'KEYWORD HEADER', 'COMMENT HEADER')¶
-
classmethod
from_params(type, name=None, eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
type¶
-
name¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.LibraryImport(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'LIBRARY'¶
-
classmethod
from_params(name, args=(), alias=None, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
args¶
-
alias¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.ResourceImport(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'RESOURCE'¶
-
classmethod
from_params(name, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.VariablesImport(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'VARIABLES'¶
-
classmethod
from_params(name, args=(), separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Documentation(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.DocumentationOrMetadata-
type= 'DOCUMENTATION'¶
-
classmethod
from_params(value, indent=' ', separator=' ', eol='\n', settings_section=True)[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
value¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Metadata(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.DocumentationOrMetadata-
type= 'METADATA'¶
-
classmethod
from_params(name, value, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
value¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.ForceTags(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.MultiValue-
type= 'FORCE TAGS'¶
-
classmethod
from_params(values, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.DefaultTags(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.MultiValue-
type= 'DEFAULT TAGS'¶
-
classmethod
from_params(values, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.SuiteSetup(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Fixture-
type= 'SUITE SETUP'¶
-
classmethod
from_params(name, args=(), separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
name¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.SuiteTeardown(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Fixture-
type= 'SUITE TEARDOWN'¶
-
classmethod
from_params(name, args=(), separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
name¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.TestSetup(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Fixture-
type= 'TEST SETUP'¶
-
classmethod
from_params(name, args=(), separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
name¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.TestTeardown(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Fixture-
type= 'TEST TEARDOWN'¶
-
classmethod
from_params(name, args=(), separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
name¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.TestTemplate(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.SingleValue-
type= 'TEST TEMPLATE'¶
-
classmethod
from_params(value, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
value¶
-
-
class
robot.parsing.model.statements.TestTimeout(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.SingleValue-
type= 'TEST TIMEOUT'¶
-
classmethod
from_params(value, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
value¶
-
-
class
robot.parsing.model.statements.Variable(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'VARIABLE'¶
-
classmethod
from_params(name, value, separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
value¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.TestCaseName(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'TESTCASE NAME'¶
-
classmethod
from_params(name, eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.KeywordName(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'KEYWORD NAME'¶
-
classmethod
from_params(name, eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
name¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Setup(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Fixture-
type= 'SETUP'¶
-
classmethod
from_params(name, args=(), indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
name¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Teardown(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Fixture-
type= 'TEARDOWN'¶
-
classmethod
from_params(name, args=(), indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
name¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Tags(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.MultiValue-
type= 'TAGS'¶
-
classmethod
from_params(values, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.Template(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.SingleValue-
type= 'TEMPLATE'¶
-
classmethod
from_params(value, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
value¶
-
-
class
robot.parsing.model.statements.Timeout(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.SingleValue-
type= 'TIMEOUT'¶
-
classmethod
from_params(value, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
value¶
-
-
class
robot.parsing.model.statements.Arguments(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.MultiValue-
type= 'ARGUMENTS'¶
-
classmethod
from_params(args, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
values¶
-
-
class
robot.parsing.model.statements.Return(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.MultiValue-
type= 'RETURN'¶
-
classmethod
from_params(args, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.KeywordCall(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'KEYWORD'¶
-
classmethod
from_params(name, assign=(), args=(), indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
keyword¶
-
args¶
-
assign¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.TemplateArguments(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'ARGUMENT'¶
-
classmethod
from_params(args, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
args¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.ForHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'FOR'¶
-
classmethod
from_params(variables, values, flavor='IN', indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
variables¶
-
values¶
-
flavor¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.IfElseHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
condition¶
-
assign¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(*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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.IfHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.IfElseHeader-
type= 'IF'¶
-
classmethod
from_params(condition, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
condition¶
-
assign¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.InlineIfHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.IfHeader-
type= 'INLINE IF'¶
-
assign¶
-
col_offset¶
-
condition¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(condition, indent=' ', separator=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.ElseIfHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.IfHeader-
type= 'ELSE IF'¶
-
assign¶
-
col_offset¶
-
condition¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(condition, indent=' ', separator=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.ElseHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.IfElseHeader-
type= 'ELSE'¶
-
classmethod
from_params(indent=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
assign¶
-
col_offset¶
-
condition¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.NoArgumentHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
classmethod
from_params(indent=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
values¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
classmethod
-
class
robot.parsing.model.statements.TryHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.NoArgumentHeader-
type= 'TRY'¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(indent=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.ExceptHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'EXCEPT'¶
-
classmethod
from_params(patterns=None, variable=None, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
patterns¶
-
pattern_type¶
-
variable¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.FinallyHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.NoArgumentHeader-
type= 'FINALLY'¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(indent=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.End(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.NoArgumentHeader-
type= 'END'¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(indent=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.WhileHeader(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'WHILE'¶
-
classmethod
from_params(condition, limit=None, indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
condition¶
-
limit¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.ReturnStatement(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'RETURN STATEMENT'¶
-
values¶
-
classmethod
from_params(values=(), indent=' ', separator=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
-
class
robot.parsing.model.statements.LoopControl(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.NoArgumentHeader-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(indent=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
type= None¶
-
values¶
-
-
class
robot.parsing.model.statements.Continue(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.LoopControl-
type= 'CONTINUE'¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(indent=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.Break(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.LoopControl-
type= 'BREAK'¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(indent=' ', eol='\n')¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
values¶
-
-
class
robot.parsing.model.statements.Comment(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'COMMENT'¶
-
classmethod
from_params(comment, indent=' ', eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.Error(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'ERROR'¶
-
handles_types= ('ERROR', 'FATAL ERROR')¶
-
errors¶ Errors got from the underlying
ERRORandFATAL_ERRORtokens.Errors can be set also explicitly. When accessing errors, they are returned along with errors got from tokens.
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(*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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
-
class
robot.parsing.model.statements.EmptyLine(tokens, errors=())[source]¶ Bases:
robot.parsing.model.statements.Statement-
type= 'EOL'¶
-
col_offset¶
-
data_tokens¶
-
end_col_offset¶
-
end_lineno¶
-
classmethod
from_params(eol='\n')[source]¶ 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_headerflag 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. -
indentwhitespace inserted before first token. Default is four spaces. -eolend of line sign. Default is'\n'.
-
classmethod
from_tokens(tokens)¶
-
get_token(*types)¶ Return a token with the given
type.If there are no matches, return
None. If there are multiple matches, return the first match.
-
get_tokens(*types)¶ Return tokens having any of the given
types.
-
get_value(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.
-
get_values(*types)¶ Return values of tokens having any of the given
types.
-
handles_types= ()¶
-
lineno¶
-
lines¶
-
classmethod
register(subcls)¶
-
validate(context)¶
-
robot.parsing.model.visitor module¶
-
class
robot.parsing.model.visitor.ModelVisitor[source]¶ Bases:
ast.NodeVisitor,robot.parsing.model.visitor.VisitorFinderNodeVisitor that supports matching nodes based on their base classes.
Otherwise identical to the standard ast.NodeVisitor, but allows creating
visit_ClassNamemethods so that theClassNameis one of the base classes of the node. For example, this visitor method matches all statements:def visit_Statement(self, node): # ...
-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
-
class
robot.parsing.model.visitor.ModelTransformer[source]¶ Bases:
ast.NodeTransformer,robot.parsing.model.visitor.VisitorFinderNodeTransformer that supports matching nodes based on their base classes.
See
ModelVisitorfor explanation how this is different compared to the standard ast.NodeTransformer.-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-