本文整理汇总了C#中YieldBreakStatement类的典型用法代码示例。如果您正苦于以下问题:C# YieldBreakStatement类的具体用法?C# YieldBreakStatement怎么用?C# YieldBreakStatement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
YieldBreakStatement类属于命名空间,在下文中一共展示了YieldBreakStatement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
if (this.ThrowException)
{
throw (Exception)this.CreateException(yieldBreakStatement);
}
}
示例3: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement) {
_result.Add(JsStatement.Yield(null));
}
示例4: BreakBlock
public BreakBlock(IEmitter emitter, YieldBreakStatement breakStatement)
: base(emitter, breakStatement)
{
this.Emitter = emitter;
this.YieldBreakStatement = breakStatement;
}
示例5: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
FixSemicolon(yieldBreakStatement.SemicolonToken);
}
示例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);
}
示例7: VisitYieldBreakStatement
public StringBuilder VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement, int data)
{
throw new SLSharpException("SL# does not have iterators.");
}
示例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);
}
示例9: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
new YieldBlock(this, yieldBreakStatement).Emit();
}
示例10: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
this.Found = true;
}
示例11: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
_result.Add(new JsYieldBreakStatement());
}
示例12: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
StartNode(yieldBreakStatement);
DebugStart(yieldBreakStatement);
WriteKeywordReferences(YieldBreakStatement.YieldKeywordRole, YieldBreakStatement.BreakKeywordRole, currentMethodReference);
SemicolonDebugEnd(yieldBreakStatement);
EndNode(yieldBreakStatement);
}
示例13: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
StartNode(yieldBreakStatement);
DebugStart(yieldBreakStatement);
WriteKeyword(YieldBreakStatement.YieldKeywordRole);
WriteKeyword(YieldBreakStatement.BreakKeywordRole);
SemicolonDebugEnd(yieldBreakStatement);
EndNode(yieldBreakStatement);
}
示例14: VisitYieldBreakStatement
public override void VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement)
{
_errorReporter.Message(7998, yieldBreakStatement.GetRegion(), "yield break");
_result = false;
}
示例15: VisitYieldBreakStatement
public virtual void VisitYieldBreakStatement (YieldBreakStatement yieldBreakStatement)
{
VisitChildren (yieldBreakStatement);
}