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
AddLeftRecursionRules(List<Rule>, List<RecursiveContinuation>)
Adds rules to the given left recursion trace
protected override void AddLeftRecursionRules(List<Rule> trace, List<RecursiveContinuation> continuations)
Parameters
traceList<Rule>the trace
continuationsList<RecursiveContinuation>a collection of recursion continuations
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
semanticElementobjectthe semantic element
contextParseContextthe context in which the rule is synthesized
synthesisPlanSynthesisPlanthe plan of the synthesis
Returns
- bool
true, if a rule application can be synthesized, otherwise false
CreateRuleApplication(ParsePosition, List<RuleApplication>, ParsePositionDelta, ParsePositionDelta, object)
Creates a rule application for a success
protected override RuleApplication CreateRuleApplication(ParsePosition currentPosition, List<RuleApplication> inner, ParsePositionDelta length, ParsePositionDelta examined, object semanticElement)
Parameters
currentPositionParsePositionthe current parser position
innerList<RuleApplication>the inner list of rule applications
lengthParsePositionDeltathe length of the match
examinedParsePositionDeltathe amount of text examined
semanticElementobjectan already existing semantic model element
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
kindstringThe folding kind of the rule
Returns
- bool
True, if a folding kind is defined for the rule