Represents a reference to another expression by name.
Inheritance: Expression
 protected override void WalkNameExpression(NameExpression nameExpression)
 {
     var name = nameExpression.Identifier.Name;
     if (this.usedRules.Add(name))
     {
         this.rulesToVisit.Enqueue(name);
     }
 }
 protected override void WalkNameExpression(NameExpression nameExpression)
 {
     var name = nameExpression.Identifier.Name;
     if (!this.knownRules.Contains(name))
     {
         var cursor = nameExpression.Identifier.Start;
         this.result.AddCompilerError(cursor, () => Resources.PEG0003_ERROR_RuleDoesNotExist, name);
     }
 }
 protected virtual void WalkNameExpression(NameExpression nameExpression)
 {
 }
Example #4
0
 protected override void WalkNameExpression(NameExpression nameExpression)
 {
     var rule = this.rules[nameExpression.Identifier.Name];
     this.Set(nameExpression, rule.Expression, type => type.ToString());
 }
 protected override void WalkNameExpression(NameExpression nameExpression)
 {
     bool? result;
     this.containsAssertions.TryGetValue(this.rules[nameExpression.Identifier.Name].Expression, out result);
     this.containsAssertions[nameExpression] = result;
 }
Example #6
0
 protected override void WalkNameExpression(NameExpression nameExpression) => this.RenderNameExpression(nameExpression, this.writer, this.currentIndentation);
 protected override void WalkNameExpression(NameExpression nameExpression)
 {
     bool? result;
     this.zeroWidth.TryGetValue(this.rules[nameExpression.Identifier.Name].Expression, out result);
     this.zeroWidth[nameExpression] = result;
 }