Package src :: Package com :: Package deviceatlas :: Package device :: Module match_candidate
[frames] | no frames]

Module match_candidate

Classes
  MatchCandidate
A match candidate is considered a match and its component available for selection if the position in the identifier string is within the range of its position constraint.
Functions
 
get_match_candidate(components, node, token_position, at_end_of_token, constraint_groups, component_types, property_names, property_values)
A match candidate has the following structure:
 
is_start_with_allowed_match_type(node)
Function Details

get_match_candidate(components, node, token_position, at_end_of_token, constraint_groups, component_types, property_names, property_values)

 

A match candidate has the following structure:

{
  "i": integer,          i==Component Index                              [mandatory]
  "t": "eq"|"sw",        r==Match Type  (defaults to EQUALS if missing)  [optional]
  "ct": {constraints}    ct==Constraints (see constraints section)       [optional]
  "g": integer           g==Constraint Group Index                       [optional]
}

The match candidate constraints "ct". Constraints have the following structure.
Either one or both constraints will be set if constraints exist for a match
candidate.

{
  "p":{object},   p==Position Constraint       [optional]
  "l":[array]     l==Lookaround Constraints    [optional]
  "g":integer     g=Constraint Group index     [optional]
}

:param components:
:param node:
:param token_position:
:param at_end_of_token:
:param constraint_groups:
:return: