本文整理汇总了C#中GotoCaseStatement类的典型用法代码示例。如果您正苦于以下问题:C# GotoCaseStatement类的具体用法?C# GotoCaseStatement怎么用?C# GotoCaseStatement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GotoCaseStatement类属于命名空间,在下文中一共展示了GotoCaseStatement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AcceptGotoCase
public void AcceptGotoCase(GotoCaseStatement stmt)
{
_result.Add(stmt);
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:4,代码来源:ProgramflowSuccessors.cs
示例2: AcceptGotoCase
public void AcceptGotoCase(GotoCaseStatement stmt)
{
Check(stmt);
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:4,代码来源:HierarchyAnalysis.cs
示例3: VisitGotoCaseStatement
public sealed override object VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, object data) {
BeginVisit(gotoCaseStatement);
object result = TrackedVisitGotoCaseStatement(gotoCaseStatement, data);
EndVisit(gotoCaseStatement);
return result;
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:6,代码来源:NodeTrackingAstVisitor.cs
示例4: VisitGotoCaseStatement
public override void VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement) {
var value = _resolver.Resolve(gotoCaseStatement.LabelExpression).ConstantValue;
_result.Add(JsStatement.Goto(_currentGotoCaseMap[NormalizeSwitchLabelValue(value)]));
}
开发者ID:chenxustu1,项目名称:SaltarelleCompiler,代码行数:4,代码来源:StatementCompiler.cs
示例5: Visit
public override object Visit(GotoCase gotoCase)
{
var result = new GotoCaseStatement();
result.AddChild(new CSharpTokenNode(Convert(gotoCase.loc), GotoCaseStatement.GotoKeywordRole), GotoCaseStatement.GotoKeywordRole);
var location = LocationsBag.GetLocations(gotoCase);
if (location != null)
result.AddChild(new CSharpTokenNode(Convert(location [0]), GotoCaseStatement.CaseKeywordRole), GotoCaseStatement.CaseKeywordRole);
if (gotoCase.Expr != null)
result.AddChild((Expression)gotoCase.Expr.Accept(this), Roles.Expression);
if (location != null && location.Count > 1)
result.AddChild(new CSharpTokenNode(Convert(location [1]), Roles.Semicolon), Roles.Semicolon);
return result;
}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:14,代码来源:CSharpParser.cs
示例6: Visit
public override object Visit (GotoCase gotoCase)
{
var result = new GotoCaseStatement ();
result.AddChild (new CSharpTokenNode (Convert (gotoCase.loc), "goto".Length), GotoCaseStatement.Roles.Keyword);
var location = LocationsBag.GetLocations (gotoCase);
if (location != null)
result.AddChild (new CSharpTokenNode (Convert (location[0]), "case".Length), GotoCaseStatement.CaseKeywordRole);
result.AddChild ((MonoDevelop.CSharp.Ast.Expression)gotoCase.Expr.Accept (this), GotoCaseStatement.Roles.Expression);
if (location != null)
result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), GotoCaseStatement.Roles.Semicolon);
return result;
}
开发者ID:sandyarmstrong,项目名称:monodevelop,代码行数:13,代码来源:CSharpParser.cs
示例7: AcceptGotoCase
public void AcceptGotoCase(GotoCaseStatement stmt)
{
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:3,代码来源:StatementRemoval.cs
示例8: VisitGotoCaseStatement
public void VisitGotoCaseStatement(GotoCaseStatement node)
{
NotSupported(node);
}
开发者ID:evanw,项目名称:minisharp,代码行数:4,代码来源:Lower.cs
示例9: VisitGotoCaseStatement
public void VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement)
{
JsonObject statement = CreateJsonStatement(gotoCaseStatement);
AddKeyword(statement, GotoCaseStatement.GotoKeywordRole);
AddKeyword(statement, "case-keyword", GotoCaseStatement.CaseKeywordRole);
statement.AddJsonValue("label-expression", GenExpression(gotoCaseStatement.LabelExpression));
Push(statement);
//implement already, but not tested
throw new FirstTimeUseException();
}
开发者ID:CompilerKit,项目名称:CodeWalk,代码行数:11,代码来源:AstCsToJson.cs
示例10: GotoStatement
private void GotoStatement(out ICSharpCode.NRefactory.Parser.AST.Statement stmt)
{
stmt = null;
base.Expect(0x4d);
if (this.la.kind == 1)
{
base.lexer.NextToken();
stmt = new ICSharpCode.NRefactory.Parser.AST.GotoStatement(this.t.val);
base.Expect(11);
}
else if (this.la.kind == 0x36)
{
Expression expression;
base.lexer.NextToken();
this.Expr(out expression);
base.Expect(11);
stmt = new GotoCaseStatement(expression);
}
else if (this.la.kind == 0x3e)
{
base.lexer.NextToken();
base.Expect(11);
stmt = new GotoCaseStatement(null);
}
else
{
base.SynErr(0xae);
}
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:29,代码来源:Parser.cs
示例11: VisitGotoCaseStatement
public virtual object VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, object data) {
throw new global::System.NotImplementedException("GotoCaseStatement");
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:3,代码来源:NotImplementedAstVisitor.cs
示例12: VisitGotoCaseStatement
public virtual object VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, object data) {
Debug.Assert((gotoCaseStatement != null));
Debug.Assert((gotoCaseStatement.Expression != null));
nodeStack.Push(gotoCaseStatement.Expression);
gotoCaseStatement.Expression.AcceptVisitor(this, data);
gotoCaseStatement.Expression = ((Expression)(nodeStack.Pop()));
return null;
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:8,代码来源:AbstractAstTransformer.cs
示例13: AcceptGotoCase
public void AcceptGotoCase(GotoCaseStatement stmt)
{
SimpleResult(stmt);
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:4,代码来源:SingleStatement.cs
示例14: AcceptGotoCase
/// <summary>
/// Transforms a "goto case" statement. The default implementation places a new "goto case"
/// statement inside the current case selection.
/// </summary>
/// <param name="stmt">"goto case" statement</param>
public virtual void AcceptGotoCase(GotoCaseStatement stmt)
{
GotoCase(_caseMap[stmt.CaseStmt], stmt.TargetIndex);
CopyAttributesToLastStatement(stmt);
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:10,代码来源:DefaultTransformer.cs
示例15: VisitGotoCaseStatement
public override void VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement)
{
_errorReporter.Message(7998, gotoCaseStatement.GetRegion(), "goto case");
_result = false;
}
开发者ID:arnauddias,项目名称:SaltarelleCompiler,代码行数:5,代码来源:UnsupportedConstructsScanner.cs
示例16: AcceptGotoCase
public void AcceptGotoCase(GotoCaseStatement stmt)
{
IsEmpty = false;
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:4,代码来源:IfStatementBeautifier.cs
示例17: VisitGotoCaseStatement
public virtual object VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, object data) {
Debug.Assert((gotoCaseStatement != null));
Debug.Assert((gotoCaseStatement.Expression != null));
return gotoCaseStatement.Expression.AcceptVisitor(this, data);
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:5,代码来源:AbstractASTVisitor.cs
示例18: VisitGotoCaseStatement
public StringBuilder VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, int data)
{
throw new SLSharpException("SL# cannot jump from one case to another.");
}
开发者ID:hach-que,项目名称:SLSharp,代码行数:4,代码来源:VisitorBase.Illegal.cs
示例19: AcceptGotoCase
public void AcceptGotoCase(GotoCaseStatement stmt)
{
GotoCase(_caseMap[stmt.CaseStmt], stmt.TargetIndex);
}
开发者ID:venusdharan,项目名称:systemsharp,代码行数:4,代码来源:RetRemoval.cs
示例20: VisitGotoCaseStatement
public virtual void VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement)
{
if (this.ThrowException)
{
throw (Exception)this.CreateException(gotoCaseStatement);
}
}
开发者ID:fabriciomurta,项目名称:BridgeUnified,代码行数:7,代码来源:Visitor.Exception.cs
注:本文中的GotoCaseStatement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论