Package com._1c.g5.v8.dt.bsl.qw.utils
Class Parser.TokensSequence
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.qw.utils.Parser.TokensSequence
-
-
Constructor Summary
Constructors Constructor Description TokensSequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parser.TokensSequenceadd(String text)Look only textParser.TokensSequenceadd(String typeItemNameOrText, boolean isTypeName)Search by type nameParser.TokensSequenceadd(String text, String textRu, Class<? extends Object> type)Search text and check typeParser.TokensSequenceadd(String text, String textRu, Class<? extends Object> type, boolean markAsResult)Search text and check typevoidapply(org.eclipse.xtext.nodemodel.INode node, org.eclipse.emf.ecore.EObject object)Apply node to parsing templateObjectgetResult()Get found resultintgetResultOffset()Get found result offset in textbooleanisHaveResult()If found sequence matched with pattern
-
-
-
Method Detail
-
add
public Parser.TokensSequence add(String text)
Look only text- Parameters:
text- - text for search- Returns:
- this
-
add
public Parser.TokensSequence add(String typeItemNameOrText, boolean isTypeName)
Search by type name- Parameters:
typeItemNameOrText- - type name or textisTypeName- - search in type name if true or in text if false- Returns:
- this
-
add
public Parser.TokensSequence add(String text, String textRu, Class<? extends Object> type)
Search text and check type- Parameters:
text- - texttextRu- - Russian texttype- - found token type- Returns:
- this
-
add
public Parser.TokensSequence add(String text, String textRu, Class<? extends Object> type, boolean markAsResult)
Search text and check type- Parameters:
text- - texttextRu- - Russian texttype- - found token typemarkAsResult- - use found token as result- Returns:
- this
-
apply
public void apply(org.eclipse.xtext.nodemodel.INode node, org.eclipse.emf.ecore.EObject object)Apply node to parsing template- Parameters:
node- - nodeobject- - associated object with node
-
isHaveResult
public boolean isHaveResult()
If found sequence matched with pattern- Returns:
- true if found
-
getResult
public Object getResult()
Get found result- Returns:
- found result
-
getResultOffset
public int getResultOffset()
Get found result offset in text- Returns:
- offset or -1 if result not found
-
-