本文整理汇总了C#中Boo类的典型用法代码示例。如果您正苦于以下问题:C# Boo类的具体用法?C# Boo怎么用?C# Boo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Boo类属于命名空间,在下文中一共展示了Boo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnModule
public override void OnModule(Boo.Lang.Compiler.Ast.Module module)
{
EnterNamespace((INamespace)TypeSystemServices.GetEntity(module));
Visit(module.Members);
Visit(module.Globals);
LeaveNamespace();
}
开发者ID:w4x,项目名称:boolangstudio,代码行数:7,代码来源:ExpandMacros.cs
示例2: OnReferenceExpression
/// <summary>
/// Called when visting a reference expression.
/// Will turn reference expressions with initial @ to string literals
/// </summary>
/// <param name="node">The node.</param>
public override void OnReferenceExpression(Boo.Lang.Compiler.Ast.ReferenceExpression node)
{
if(node.Name.StartsWith("@")==false)
return;
ReplaceCurrentNode(new StringLiteralExpression(node.Name.Substring(1)));
}
开发者ID:JackWangCUMT,项目名称:rhino-dsl,代码行数:12,代码来源:UseSymbolsStep.cs
示例3: OnTypeMemberStatement
public virtual void OnTypeMemberStatement(Boo.Lang.Compiler.Ast.TypeMemberStatement node)
{
if (EnterTypeMemberStatement(node))
{
StatementModifier currentModifierValue = node.Modifier;
if (null != currentModifierValue)
{
StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
if (!object.ReferenceEquals(newValue, currentModifierValue))
{
node.Modifier = newValue;
}
}
TypeMember currentTypeMemberValue = node.TypeMember;
if (null != currentTypeMemberValue)
{
TypeMember newValue = (TypeMember)VisitNode(currentTypeMemberValue);
if (!object.ReferenceEquals(newValue, currentTypeMemberValue))
{
node.TypeMember = newValue;
}
}
LeaveTypeMemberStatement(node);
}
}
开发者ID:HaKDMoDz,项目名称:GNet,代码行数:26,代码来源:DepthFirstTransformer.cs
示例4: CustomizeCompiler
protected override void CustomizeCompiler(Boo.Lang.Compiler.BooCompiler compiler, Boo.Lang.Compiler.CompilerPipeline pipeline, string[] urls)
{
compiler.Parameters.Ducky = true;
pipeline.Insert(1, new ImplicitBaseClassCompilerStep(
_baseType, "Prepare", _namespaces));
}
开发者ID:alasdairhurst,项目名称:nginn,代码行数:7,代码来源:NGinnDslEngine.cs
示例5: CustomizeCompiler
protected override void CustomizeCompiler(Boo.Lang.Compiler.BooCompiler compiler, Boo.Lang.Compiler.CompilerPipeline pipeline, string[] urls)
{
compiler.Parameters.Ducky = true;
List<Assembly> asmss = new List<Assembly>();
if (RefAllLoadedAssemblies)
{
asmss.AddRange(AppDomain.CurrentDomain.GetAssemblies());
}
if (ReferencedAssemblies != null) asmss.AddRange(ReferencedAssemblies);
foreach (Assembly asm in asmss)
{
try
{
string loc = asm.Location;
if (!compiler.Parameters.References.Contains(asm)) compiler.Parameters.References.Add(asm);
}
catch (Exception) { log.Debug("Error adding assembly dependency: {0}", asm.FullName); }
}
pipeline.Insert(1, new ImplicitBaseClassCompilerStep(typeof(ScriptDSLBase), "Prepare", Namespaces));
var st2 = new AutoReferenceFilesCompilerStep(_baseDir + "\\include");
pipeline.Insert(2, st2);
}
开发者ID:lafar6502,项目名称:cogmon,代码行数:25,代码来源:ScriptDSLEngine.cs
示例6: EnterModule
/// <summary>
/// Enters the module.
/// </summary>
/// <param name="node">The node.</param>
/// <returns></returns>
public override bool EnterModule(Boo.Lang.Compiler.Ast.Module node)
{
currentModule = node.Name;
if (moduleNameToContainedTypes.ContainsKey(currentModule) == false)
moduleNameToContainedTypes[currentModule] = new List<string>();
return base.EnterModule(node);
}
开发者ID:f4i2u1,项目名称:rhino-etl,代码行数:12,代码来源:CorrelateTypesToModuleName.cs
示例7: OnArrayTypeReference
public override void OnArrayTypeReference(Boo.Lang.Compiler.Ast.ArrayTypeReference node)
{
MethodInvocationExpression mie = new MethodInvocationExpression(
node.LexicalInfo,
CreateReference(node, "Boo.Lang.Compiler.Ast.ArrayTypeReference"));
mie.Arguments.Add(Serialize(node.LexicalInfo));
if (ShouldSerialize(node.IsPointer))
{
mie.NamedArguments.Add(
new ExpressionPair(
CreateReference(node, "IsPointer"),
Serialize(node.IsPointer)));
}
if (ShouldSerialize(node.ElementType))
{
mie.NamedArguments.Add(
new ExpressionPair(
CreateReference(node, "ElementType"),
Serialize(node.ElementType)));
}
if (ShouldSerialize(node.Rank))
{
mie.NamedArguments.Add(
new ExpressionPair(
CreateReference(node, "Rank"),
Serialize(node.Rank)));
}
Push(mie);
}
开发者ID:BITechnologies,项目名称:boo,代码行数:29,代码来源:CodeSerializer.cs
示例8: OnModule
public override void OnModule(Boo.Lang.Compiler.Ast.Module module)
{
EnterNamespace(InternalModule.ScopeFor(module));
VisitTypeDefinitionBody(module);
Visit(module.AssemblyAttributes);
LeaveNamespace();
}
开发者ID:neonux,项目名称:boo,代码行数:7,代码来源:AbstractNamespaceSensitiveVisitorCompilerStep.cs
示例9: reply_with_one_of
protected void reply_with_one_of(Boo.Lang.List replies)
{
var random = new Random();
var indexToUse = random.Next(replies.Count);
Console.WriteLine("replies.Count = {0}, using index {1}", replies.Count, indexToUse);
reply(replies[indexToUse] as string);
}
开发者ID:tormaroe,项目名称:codename_mokolo,代码行数:7,代码来源:ResponseStrategy.cs
示例10: CreateParser
public static WSABooParser CreateParser(int tabSize, string readerName, TextReader reader, Boo.Lang.Parser.ParserErrorHandler errorHandler)
{
var parser = new WSABooParser(CreateBooLexer(tabSize, readerName, reader));
parser.setFilename(readerName);
parser.Error += errorHandler;
return parser;
}
开发者ID:0xb1dd1e,项目名称:boo,代码行数:7,代码来源:WSABooParser.cs
示例11: OnCompileUnit
public virtual void OnCompileUnit(Boo.Lang.Compiler.Ast.CompileUnit node)
{
if (EnterCompileUnit(node))
{
Visit(node.Modules);
LeaveCompileUnit(node);
}
}
开发者ID:HaKDMoDz,项目名称:GNet,代码行数:8,代码来源:DepthFirstVisitor.cs
示例12: AttributeApplicationError
public static CompilerError AttributeApplicationError(Exception error, Boo.Lang.Compiler.Ast.Attribute attribute, Type attributeType)
{
return new CompilerError("BCE0009",
attribute.LexicalInfo,
error,
attributeType,
error.Message);
}
开发者ID:w4x,项目名称:boolangstudio,代码行数:8,代码来源:CompilerErrorFactory.cs
示例13: LeaveEnumDefinition
public override void LeaveEnumDefinition(Boo.Lang.Compiler.Ast.EnumDefinition node)
{
var designator=new StringBuilder();
designator.Append("T:");
designator.Append(node.FullName);
this.ProcessDocumentation(designator.ToString(), node);
base.LeaveEnumDefinition(node);
}
开发者ID:hlizard,项目名称:boo,代码行数:8,代码来源:CreateAndSaveDocs.cs
示例14: Prepare
public static void Prepare(Boo.Lang.Compiler.Pipelines.Parse result)
{
if(-1!=result.Find(typeof(BooParsingStep))){
result.InsertAfter(typeof (BooParsingStep), new IncludeAstMacroExpandStep());
}else if (-1!=result.Find(typeof(WSABooParsingStep))){
result.InsertAfter(typeof(WSABooParsingStep), new IncludeAstMacroExpandStep());
}
}
开发者ID:Qorpent,项目名称:comdiv.oldcore,代码行数:8,代码来源:IncludeAstMacroExpandStep.cs
示例15: OnExplicitMemberInfo
public virtual void OnExplicitMemberInfo(Boo.Lang.Compiler.Ast.ExplicitMemberInfo node)
{
if (EnterExplicitMemberInfo(node))
{
Visit(node.InterfaceType);
LeaveExplicitMemberInfo(node);
}
}
开发者ID:HaKDMoDz,项目名称:GNet,代码行数:8,代码来源:DepthFirstVisitor.cs
示例16: GetDocumentation
protected string GetDocumentation(Boo.Lang.Compiler.Ast.Module module)
{
string doc = module.Documentation;
if (null == module.Documentation)
{
Assert.Fail(string.Format("Test case '{0}' does not have a docstring!", module.LexicalInfo.FileName));
}
return doc;
}
开发者ID:Rfvgyhn,项目名称:boo,代码行数:9,代码来源:AbstractParserTestFixture.cs
示例17: OnTypeMemberStatement
public virtual void OnTypeMemberStatement(Boo.Lang.Compiler.Ast.TypeMemberStatement node)
{
if (EnterTypeMemberStatement(node))
{
Visit(node.Modifier);
Visit(node.TypeMember);
LeaveTypeMemberStatement(node);
}
}
开发者ID:HaKDMoDz,项目名称:GNet,代码行数:9,代码来源:DepthFirstVisitor.cs
示例18: CustomizeCompiler
protected override void CustomizeCompiler(Boo.Lang.Compiler.BooCompiler compiler, Boo.Lang.Compiler.CompilerPipeline pipeline, string[] urls)
{
Logger log = LogManager.GetCurrentClassLogger();
compiler.Parameters.Ducky = true;
compiler.Parameters.Debug = true;
pipeline.Insert(1, new ImplicitBaseClassCompilerStep(typeof(ProcessDefDSLBase), "Prepare", _namespaces));
}
开发者ID:yonglehou,项目名称:NGinnBPM,代码行数:10,代码来源:PackageDSLEngine.cs
示例19: AnotherUnflatTest
public void AnotherUnflatTest()
{
var flat = new FlatBoo { Boo1Id = 5 };
var boo = new Boo();
boo.InjectFrom<UnflatLoopInjection>(flat);
boo.Boo1Id.IsEqualTo(5);
boo.Boo1.IsEqualTo(null);
}
开发者ID:tidusjar,项目名称:ValueInjecter,代码行数:10,代码来源:QrowTest.cs
示例20:
void IAstVisitor.OnExplicitMemberInfo(Boo.Lang.Compiler.Ast.ExplicitMemberInfo node)
{
{
var interfaceType = node.InterfaceType;
if (interfaceType != null)
interfaceType.Accept(this);
}
var handler = OnExplicitMemberInfo;
if (handler != null)
handler(node);
}
开发者ID:HaKDMoDz,项目名称:GNet,代码行数:11,代码来源:DepthFirstGuide.cs
注:本文中的Boo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论