本文整理汇总了C#中UncheckedExpression类的典型用法代码示例。如果您正苦于以下问题:C# UncheckedExpression类的具体用法?C# UncheckedExpression怎么用?C# UncheckedExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UncheckedExpression类属于命名空间,在下文中一共展示了UncheckedExpression类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Visit
public override object Visit(UncheckedExpression uncheckedExpression, object data)
{
return uncheckedExpression.Expression.AcceptVisitor(this, data);
}
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:4,代码来源:TypeVisitor.cs
示例2: VisitUncheckedExpression
public override void VisitUncheckedExpression(UncheckedExpression uncheckedExpression)
{
uncheckedExpression.Expression.AcceptVisitor(this);
}
开发者ID:yindongfei,项目名称:bridge.lua,代码行数:4,代码来源:Emitter.Visitor.cs
示例3: VisitUncheckedExpression
public abstract StringBuilder VisitUncheckedExpression(UncheckedExpression uncheckedExpression, int data);
开发者ID:hach-que,项目名称:SLSharp,代码行数:1,代码来源:VisitorBase.Abstract.cs
示例4: VisitUncheckedExpression
public sealed override object VisitUncheckedExpression(UncheckedExpression uncheckedExpression, object data) {
BeginVisit(uncheckedExpression);
object result = TrackedVisitUncheckedExpression(uncheckedExpression, data);
EndVisit(uncheckedExpression);
return result;
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:6,代码来源:NodeTrackingAstVisitor.cs
示例5: ParseCheckedOrMakeRefOrRefTypeOrUnchecked
private Expression ParseCheckedOrMakeRefOrRefTypeOrUnchecked(TokenSet followers)
//^ requires this.currentToken == Token.Checked || this.currentToken == Token.MakeRef || this.currentToken == Token.RefType || this.currentToken == Token.Unchecked;
//^ ensures followers[this.currentToken] || this.currentToken == Token.EndOfFile;
{
SourceLocationBuilder slb = new SourceLocationBuilder(this.scanner.SourceLocationOfLastScannedToken);
Token tok = this.currentToken;
this.GetNextToken();
this.Skip(Token.LeftParenthesis);
Expression operand = this.ParseExpression(followers|Token.RightParenthesis);
Expression result;
switch (tok) {
case Token.Checked: result = new CheckedExpression(operand, slb); break;
case Token.MakeRef: result = new MakeTypedReference(operand, slb); break;
case Token.RefType: result = new GetTypeOfTypedReference(operand, slb); break;
case Token.Unchecked: result = new UncheckedExpression(operand, slb); break;
default:
//^ assert false;
goto case Token.Checked;
}
this.SkipOverTo(Token.RightParenthesis, followers);
return result;
}
开发者ID:hesam,项目名称:SketchSharp,代码行数:22,代码来源:Parser.cs
示例6: Visit
public override object Visit(UnCheckedExpr uncheckedExpression)
{
var result = new UncheckedExpression();
var location = LocationsBag.GetLocations(uncheckedExpression);
result.AddChild(new CSharpTokenNode(Convert(uncheckedExpression.Location), UncheckedExpression.UncheckedKeywordRole), UncheckedExpression.UncheckedKeywordRole);
if (location != null)
result.AddChild(new CSharpTokenNode(Convert(location [0]), Roles.LPar), Roles.LPar);
if (uncheckedExpression.Expr != null)
result.AddChild((Expression)uncheckedExpression.Expr.Accept(this), Roles.Expression);
if (location != null && location.Count > 1)
result.AddChild(new CSharpTokenNode(Convert(location [1]), Roles.RPar), Roles.RPar);
return result;
}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:13,代码来源:CSharpParser.cs
示例7: Visit
public override object Visit (UnCheckedExpr uncheckedExpression)
{
var result = new UncheckedExpression ();
var location = LocationsBag.GetLocations (uncheckedExpression);
result.AddChild (new CSharpTokenNode (Convert (uncheckedExpression.Location), "unchecked".Length), TypeOfExpression.Roles.Keyword);
if (location != null)
result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), TypeOfExpression.Roles.LPar);
result.AddChild ((INode)uncheckedExpression.Expr.Accept (this), TypeOfExpression.Roles.Expression);
if (location != null)
result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), TypeOfExpression.Roles.RPar);
return result;
}
开发者ID:pgoron,项目名称:monodevelop,代码行数:12,代码来源:CSharpParser.cs
示例8: VisitUncheckedExpression
public virtual object VisitUncheckedExpression(UncheckedExpression uncheckedExpression, object data) {
Debug.Assert((uncheckedExpression != null));
Debug.Assert((uncheckedExpression.Expression != null));
return uncheckedExpression.Expression.AcceptVisitor(this, data);
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:5,代码来源:AbstractASTVisitor.cs
示例9: PrimaryExpr
//.........这里部分代码省略.........
Expect(21);
#line 1934 "cs.ATG"
pexpr = new DefaultValueExpression(type);
} else if (la.kind == 105) {
lexer.NextToken();
Expect(20);
Type(
#line 1935 "cs.ATG"
out type);
Expect(21);
#line 1935 "cs.ATG"
pexpr = new SizeOfExpression(type);
} else if (la.kind == 58) {
lexer.NextToken();
Expect(20);
Expr(
#line 1936 "cs.ATG"
out expr);
Expect(21);
#line 1936 "cs.ATG"
pexpr = new CheckedExpression(expr);
} else if (la.kind == 118) {
lexer.NextToken();
Expect(20);
Expr(
#line 1937 "cs.ATG"
out expr);
Expect(21);
#line 1937 "cs.ATG"
pexpr = new UncheckedExpression(expr);
} else if (la.kind == 64) {
lexer.NextToken();
AnonymousMethodExpr(
#line 1938 "cs.ATG"
out expr);
#line 1938 "cs.ATG"
pexpr = expr;
} else SynErr(209);
#line 1940 "cs.ATG"
if (pexpr != null) {
if (pexpr.StartLocation.IsEmpty)
pexpr.StartLocation = startLocation;
if (pexpr.EndLocation.IsEmpty)
pexpr.EndLocation = t.EndLocation;
}
while (StartOf(36)) {
if (la.kind == 31 || la.kind == 32) {
#line 1948 "cs.ATG"
startLocation = la.Location;
if (la.kind == 31) {
lexer.NextToken();
#line 1950 "cs.ATG"
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement);
} else if (la.kind == 32) {
lexer.NextToken();
#line 1951 "cs.ATG"
开发者ID:mgagne-atman,项目名称:Projects,代码行数:67,代码来源:Parser.cs
示例10: VisitUncheckedExpression
public void VisitUncheckedExpression(UncheckedExpression node)
{
NotSupported(node);
}
开发者ID:evanw,项目名称:minisharp,代码行数:4,代码来源:Lower.cs
示例11: VisitUncheckedExpression
public void VisitUncheckedExpression(UncheckedExpression uncheckedExpression)
{
JsonObject expression = CreateJsonExpression(uncheckedExpression);
AddKeyword(expression, UncheckedExpression.UncheckedKeywordRole);
expression.AddJsonValue("expression", GenExpression(uncheckedExpression.Expression));
Push(expression);
}
开发者ID:CompilerKit,项目名称:CodeWalk,代码行数:9,代码来源:AstCsToJson.cs
示例12: VisitUncheckedExpression
public virtual object VisitUncheckedExpression(UncheckedExpression uncheckedExpression, object data) {
throw new global::System.NotImplementedException("UncheckedExpression");
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:3,代码来源:NotImplementedAstVisitor.cs
示例13: PrimaryExpr
//.........这里部分代码省略.........
base.Expect(0x15);
pexpr = new TypeOfExpression(typeReference);
}
else if ((this.la.kind == 0x3e) && (this.Peek(1).kind == 20))
{
base.Expect(0x3e);
base.Expect(20);
this.Type(out typeReference);
base.Expect(0x15);
pexpr = new DefaultValueExpression(typeReference);
}
else if (this.la.kind == 0x68)
{
base.lexer.NextToken();
base.Expect(20);
this.Type(out typeReference);
base.Expect(0x15);
pexpr = new SizeOfExpression(typeReference);
}
else if (this.la.kind == 0x39)
{
base.lexer.NextToken();
base.Expect(20);
this.Expr(out expression);
base.Expect(0x15);
pexpr = new CheckedExpression(expression);
}
else if (this.la.kind == 0x75)
{
base.lexer.NextToken();
base.Expect(20);
this.Expr(out expression);
base.Expect(0x15);
pexpr = new UncheckedExpression(expression);
}
else if (this.la.kind == 0x3f)
{
base.lexer.NextToken();
this.AnonymousMethodExpr(out expression);
pexpr = expression;
}
else
{
base.SynErr(0xb7);
}
}
else
{
string typeName = null;
switch (this.la.kind)
{
case 0x3d:
base.lexer.NextToken();
typeName = "decimal";
break;
case 0x41:
base.lexer.NextToken();
typeName = "double";
break;
case 0x4a:
base.lexer.NextToken();
typeName = "float";
break;
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:66,代码来源:Parser.cs
示例14: VisitUncheckedExpression
public virtual object VisitUncheckedExpression(UncheckedExpression uncheckedExpression, object data) {
Debug.Assert((uncheckedExpression != null));
Debug.Assert((uncheckedExpression.Expression != null));
nodeStack.Push(uncheckedExpression.Expression);
uncheckedExpression.Expression.AcceptVisitor(this, data);
uncheckedExpression.Expression = ((Expression)(nodeStack.Pop()));
return null;
}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:8,代码来源:AbstractAstTransformer.cs
示例15: VisitUncheckedExpression
public override void VisitUncheckedExpression(UncheckedExpression uncheckedExpression)
{
ForceSpacesAfter(uncheckedExpression.LParToken, policy.SpacesWithinCheckedExpressionParantheses);
ForceSpacesBefore(uncheckedExpression.RParToken, policy.SpacesWithinCheckedExpressionParantheses);
base.VisitUncheckedExpression(uncheckedExpression);
}
开发者ID:txdv,项目名称:monodevelop,代码行数:6,代码来源:AstFormattingVisitor.cs
示例16: VisitUncheckedExpression
public virtual void VisitUncheckedExpression(UncheckedExpression uncheckedExpression)
{
DebugExpression(uncheckedExpression);
StartNode(uncheckedExpression);
WriteKeywordReference(UncheckedExpression.UncheckedKeywordRole);
var braceHelper = BraceHelper.LeftParen(this, CodeBracesRangeFlags.Parentheses);
Space(policy.SpacesWithinCheckedExpressionParantheses);
uncheckedExpression.Expression.AcceptVisitor(this);
Space(policy.SpacesWithinCheckedExpressionParantheses);
braceHelper.RightParen();
EndNode(uncheckedExpression);
}
开发者ID:0xd4d,项目名称:NRefactory,代码行数:12,代码来源:CSharpOutputVisitor.cs
示例17: VisitUncheckedExpression
public virtual void VisitUncheckedExpression(UncheckedExpression uncheckedExpression)
{
if (this.ThrowException)
{
throw (Exception)this.CreateException(uncheckedExpression);
}
}
开发者ID:fabriciomurta,项目名称:BridgeUnified,代码行数:7,代码来源:Visitor.Exception.cs
示例18: Format_Unchecked_Expression
private void Format_Unchecked_Expression(StringBuilder sb, UncheckedExpression exp)
{
sb.Append("unchecked(").Append(FormatExpression(exp.Expression)).Append(")");
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:4,代码来源:CSharpCodeFormatter.cs
示例19: VisitUncheckedExpression
public virtual void VisitUncheckedExpression (UncheckedExpression uncheckedExpression)
{
VisitChildren (uncheckedExpression);
}
开发者ID:modulexcite,项目名称:ICSharpCode.Decompiler-retired,代码行数:4,代码来源:DepthFirstAstVisitor.cs
示例20: VisitUncheckedExpression
public override StringBuilder VisitUncheckedExpression(UncheckedExpression uncheckedExpression, int data)
{
return new StringBuilder();
}
开发者ID:mono-soc-2011,项目名称:SLSharp,代码行数:4,代码来源:GlslVisitor.Unimplemented.cs
注:本文中的UncheckedExpression类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论