当前位置: 首页>>代码示例>>C#>>正文


C# Module.SetName方法代码示例

本文整理汇总了C#中System.Reflection.Module.SetName方法的典型用法代码示例。如果您正苦于以下问题:C# Module.SetName方法的具体用法?C# Module.SetName怎么用?C# Module.SetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Reflection.Module的用法示例。


在下文中一共展示了Module.SetName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         pattern = new AbstractPattern(null, "Expression");
         pattern.SetType(typeof(Expression));
     }
     
     module.SetName("Expression", typeof(Expression));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:11,代码来源:Expression.cs

示例2: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         pattern = new AbstractPattern(null, "Statement");
         pattern.SetType(typeof(Statement));
     }
     
     module.SetName("Statement", typeof(Statement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:11,代码来源:Statement.cs

示例3: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('module' l(name 0) l(body 1))";
         Pattern[] patterns = {Name.pattern, Statement.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
 
         pattern = new ConcretePattern(null, "ModuleStatement", parseGraph);
         pattern.SetType(typeof(ModuleStatement));
     
         Statement.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("ModuleStatement", typeof(ModuleStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:18,代码来源:ModuleStatement.cs

示例4: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('precedence' l(a a(0 1)) l(relation o((buildTextNodes true) a('<' '=' '>'))) l(b a(0 1)) ';')";
         Pattern[] patterns = {MemberExpression.pattern, NameExpression.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
 
         pattern = new ConcretePattern(null, "SetPrecedenceStatement", parseGraph);
         pattern.SetType(typeof(SetPrecedenceStatement));
     
         Statement.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("SetPrecedenceStatement", typeof(SetPrecedenceStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:18,代码来源:SetPrecedenceStatement.cs

示例5: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('using' l(expression 0) ';')";
         Pattern[] parameters = {Expression.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, parameters);
     
         pattern = new ConcretePattern(null, "UsingStatement", parseGraph);
         pattern.SetType(typeof(UsingStatement));
     
         Statement.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("UsingStatement", typeof(UsingStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:18,代码来源:UsingStatement.cs

示例6: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('class' l(name 0) ?(s(':' l(baseType a(2 3)))) a(';' s('{' l(members *(1)) '}')))";
         Pattern[] patterns = {Name.pattern, Member.pattern, MemberExpression.pattern, NameExpression.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
 
         pattern = new ConcretePattern(null, "ClassStatement", parseGraph);
         pattern.SetType(typeof(ClassStatement));
     
         Statement.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("ClassStatement", typeof(ClassStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:18,代码来源:ClassStatement.cs

示例7: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string parameters = "'(' l(parameters ?(s(1 *(s(',' 0))))) ')'";
         string expression = "s('function' l(name 0) " + parameters + " l(body 2))";
         Pattern[] patterns = {Name.pattern, Name.pattern, Statement.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
 
         pattern = new ConcretePattern(null, "FunctionStatement", parseGraph);
         pattern.SetType(typeof(FunctionStatement));
     
         Statement.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("FunctionStatement", typeof(FunctionStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:19,代码来源:FunctionStatement.cs


注:本文中的System.Reflection.Module.SetName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。