示例#1
0
 public RuleTypeBuilder(ParserGeneratorConfig config, IEnumerable <RuleStruct> ruleTypes)
 {
     _config       = config;
     _baseTypeName = config.BaseClass;
     _helperName   = config.HelperClass;
     _resolver     = new RuleStructResolver(_ruleTypes = ruleTypes);
 }
示例#2
0
 private void ParseDirectives(List <AphidExpression> nodes) => _config = new ParserGeneratorConfig(
     ParseDirective(nodes, ParserGeneratorDirective.TokenAttribute),
     ParseDirective(nodes, ParserGeneratorDirective.BaseAttribute),
     ParseDirective(nodes, ParserGeneratorDirective.NodeAttribute),
     ParseDirectiveArray(nodes, ParserGeneratorDirective.NamespaceAttribute),
     ParseDirective(nodes, ParserGeneratorDirective.ParserAttribute),
     ParseBooleanDirective(nodes, ParserGeneratorDirective.MutableAttribute));
示例#3
0
 public TypeInferenceMutator(ParserGeneratorConfig config)
 {
     _config = config;
 }
示例#4
0
 private void ParseDirectives(List<AphidExpression> nodes)
 {
     _config = new ParserGeneratorConfig(
         ParseDirective(nodes, _tokenAttribute),
         ParseDirective(nodes, _baseAttribute),
         ParseDirective(nodes, _nodeAttribute),
         ParseDirectiveArray(nodes, _namespaceAttribute),
         ParseDirective(nodes, _parserAttribute));
 }
示例#5
0
 public TypeInferenceMutator(ParserGeneratorConfig config) => _config = config;