Class ParanthesesRule
Denotes a special sequence rule whose value is the value of the second child
public class ParanthesesRule : SequenceRule
- Inheritance
-
ParanthesesRule
- Derived
- Inherited Members
Methods
CanSynthesize(object, ParseContext, SynthesisPlan)
Determines whether the current rule can synthesize rule applications for the given semantic element
public override bool CanSynthesize(object semanticElement, ParseContext context, SynthesisPlan synthesisPlan)
Parameters
semanticElement
objectthe semantic element
context
ParseContextthe context in which the rule is synthesized
synthesisPlan
SynthesisPlanthe plan of the synthesis
Returns
- bool
true, if a rule application can be synthesized, otherwise false
CreateRuleApplication(ParsePosition, List<RuleApplication>, ParsePositionDelta, ParsePositionDelta)
Creates a rule application for a success
protected override RuleApplication CreateRuleApplication(ParsePosition currentPosition, List<RuleApplication> inner, ParsePositionDelta length, ParsePositionDelta examined)
Parameters
currentPosition
ParsePositionthe current parser position
inner
List<RuleApplication>the inner list of rule applications
length
ParsePositionDeltathe length of the match
examined
ParsePositionDeltathe amount of text examined
Returns
- RuleApplication
a new rule application
HasFoldingKind(out string)
Returns the folding kind for a rule if one is defined for the rule
public override bool HasFoldingKind(out string kind)
Parameters
kind
stringThe folding kind of the rule
Returns
- bool
True, if a folding kind is defined for the rule