本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}