本文整理汇总了C#中YieldBreakStatement类的典型用法代码示例。如果您正苦于以下问题:C# YieldBreakStatement类的具体用法?C# YieldBreakStatement怎么用?C# YieldBreakStatement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
YieldBreakStatement类属于命名空间,在下文中一共展示了YieldBreakStatement类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Visit
public override object Visit(YieldBreak yieldBreakStatement)
{
var result = new YieldBreakStatement();
var location = LocationsBag.GetLocations(yieldBreakStatement);
result.AddChild(new CSharpTokenNode(Convert(yieldBreakStatement.loc), YieldBreakStatement.YieldKeywordRole), YieldBreakStatement.YieldKeywordRole);
if (location != null) {
result.AddChild(new CSharpTokenNode(Convert(location [0]), YieldBreakStatement.BreakKeywordRole), YieldBreakStatement.BreakKeywordRole);
if (location.Count > 1)
result.AddChild(new CSharpTokenNode(Convert(location [1]), Roles.Semicolon), Roles.Semicolon);
}
return result;
}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:12,代码来源:CSharpParser.cs
示例2: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
if (this.ThrowException)
{
throw (Exception)this.CreateException(yieldBreakStatement);
}
}
开发者ID:fabriciomurta,项目名称:BridgeUnified,代码行数:7,代码来源:Visitor.Exception.cs
示例3: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement) {
_result.Add(JsStatement.Yield(null));
}
开发者ID:chenxustu1,项目名称:SaltarelleCompiler,代码行数:3,代码来源:StatementCompiler.cs
示例4: BreakBlock
public BreakBlock(IEmitter emitter, YieldBreakStatement breakStatement)
: base(emitter, breakStatement)
{
this.Emitter = emitter;
this.YieldBreakStatement = breakStatement;
}
开发者ID:wangxueqzz,项目名称:Bridge,代码行数:6,代码来源:BreakBlock.cs
示例5: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
FixSemicolon(yieldBreakStatement.SemicolonToken);
}
开发者ID:txdv,项目名称:monodevelop,代码行数:4,代码来源:AstFormattingVisitor.cs
示例6: VisitYieldBreakStatement
public void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
JsonObject statement = CreateJsonStatement(yieldBreakStatement);
statement.AddJsonValue("yield-keyword", GetKeyword(YieldBreakStatement.YieldKeywordRole));
statement.AddJsonValue("break-keyword", GetKeyword(YieldBreakStatement.BreakKeywordRole));
Push(statement);
}
开发者ID:CompilerKit,项目名称:CodeWalk,代码行数:7,代码来源:AstCsToJson.cs
示例7: VisitYieldBreakStatement
public StringBuilder VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement, int data)
{
throw new SLSharpException("SL# does not have iterators.");
}
开发者ID:hach-que,项目名称:SLSharp,代码行数:4,代码来源:VisitorBase.Illegal.cs
示例8: ParseYield
private Statement ParseYield(TokenSet followers)
//^ requires this.currentToken == Token.Yield;
//^ ensures followers[this.currentToken] || this.currentToken == Token.EndOfFile;
{
Token nextToken = this.PeekNextToken();
if (nextToken == Token.Break){
this.GetNextToken();
ISourceLocation sctx = this.scanner.SourceLocationOfLastScannedToken;
Statement result = new YieldBreakStatement(sctx);
this.SkipOverTo(Token.Break, followers);
return result;
}
if (nextToken == Token.Return) {
this.GetNextToken();
//^ assume this.currentToken == Token.Return;
this.GetNextToken();
Expression val = this.ParseExpression(followers);
ISourceLocation sctx = this.scanner.SourceLocationOfLastScannedToken;
Statement result = new YieldReturnStatement(val, sctx);
//^ assume followers[this.currentToken] || this.currentToken == Token.EndOfFile;
return result;
}
return this.ParseExpressionStatementOrDeclaration(false, true, followers, true);
}
开发者ID:hesam,项目名称:SketchSharp,代码行数:24,代码来源:Parser.cs
示例9: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
new YieldBlock(this, yieldBreakStatement).Emit();
}
开发者ID:yindongfei,项目名称:bridge.lua,代码行数:4,代码来源:Emitter.Visitor.cs
示例10: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
this.Found = true;
}
开发者ID:yindongfei,项目名称:bridge.lua,代码行数:4,代码来源:YieldSearchVisitor.cs
示例11: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
_result.Add(new JsYieldBreakStatement());
}
开发者ID:arnauddias,项目名称:SaltarelleCompiler,代码行数:4,代码来源:StatementCompiler.cs
示例12: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
StartNode(yieldBreakStatement);
DebugStart(yieldBreakStatement);
WriteKeywordReferences(YieldBreakStatement.YieldKeywordRole, YieldBreakStatement.BreakKeywordRole, currentMethodReference);
SemicolonDebugEnd(yieldBreakStatement);
EndNode(yieldBreakStatement);
}
开发者ID:0xd4d,项目名称:NRefactory,代码行数:8,代码来源:CSharpOutputVisitor.cs
示例13: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
StartNode(yieldBreakStatement);
DebugStart(yieldBreakStatement);
WriteKeyword(YieldBreakStatement.YieldKeywordRole);
WriteKeyword(YieldBreakStatement.BreakKeywordRole);
SemicolonDebugEnd(yieldBreakStatement);
EndNode(yieldBreakStatement);
}
开发者ID:JackWangCUMT,项目名称:NRefactory,代码行数:9,代码来源:CSharpOutputVisitor.cs
示例14: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
_errorReporter.Message(7998, yieldBreakStatement.GetRegion(), "yield break");
_result = false;
}
开发者ID:arnauddias,项目名称:SaltarelleCompiler,代码行数:5,代码来源:UnsupportedConstructsScanner.cs
示例15: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement (YieldBreakStatement yieldBreakStatement)
{
VisitChildren (yieldBreakStatement);
}
开发者ID:modulexcite,项目名称:ICSharpCode.Decompiler-retired,代码行数:4,代码来源:DepthFirstAstVisitor.cs
示例16: YieldBlock
public YieldBlock(IEmitter emitter, YieldBreakStatement yieldBreakStatement)
: base(emitter, yieldBreakStatement)
{
this.Emitter = emitter;
this.YieldBreakStatement = yieldBreakStatement;
}
开发者ID:yindongfei,项目名称:bridge.lua,代码行数:6,代码来源:YieldBlock.cs
示例17: VisitYieldBreakStatement
public void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
StartNode(yieldBreakStatement);
WriteKeyword(YieldBreakStatement.YieldKeywordRole);
WriteKeyword(YieldBreakStatement.BreakKeywordRole);
Semicolon();
EndNode(yieldBreakStatement);
}
开发者ID:x-strong,项目名称:ILSpy,代码行数:8,代码来源:CSharpOutputVisitor.cs
示例18: VisitYieldBreakStatement
public void VisitYieldBreakStatement(YieldBreakStatement node)
{
NotSupported(node);
}
开发者ID:evanw,项目名称:minisharp,代码行数:4,代码来源:Lower.cs
注:本文中的YieldBreakStatement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论