本文整理汇总了C#中Mono.CSharp.Unchecked类的典型用法代码示例。如果您正苦于以下问题:C# Unchecked类的具体用法?C# Unchecked怎么用?C# Unchecked使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Unchecked类属于Mono.CSharp命名空间,在下文中一共展示了Unchecked类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Visit
public override object Visit(Unchecked uncheckedStatement)
{
var result = new UncheckedStatement();
result.AddChild(new CSharpTokenNode(Convert(uncheckedStatement.loc), UncheckedStatement.UncheckedKeywordRole), UncheckedStatement.UncheckedKeywordRole);
if (uncheckedStatement.Block != null)
result.AddChild((BlockStatement)uncheckedStatement.Block.Accept(this), Roles.Body);
return result;
}
示例2: Visit
public override object Visit (Unchecked uncheckedStatement)
{
var result = new UncheckedStatement ();
result.AddChild (new CSharpTokenNode (Convert (uncheckedStatement.loc), "unchecked".Length), UncheckedStatement.Roles.Keyword);
result.AddChild ((INode)uncheckedStatement.Block.Accept (this), UncheckedStatement.Roles.EmbeddedStatement);
return result;
}
示例3: yyparse
//.........这里部分代码省略.........
case 916:
case_916();
break;
case 919:
#line 6131 "cs-parser.jay"
{
yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 920:
case_920();
break;
case 921:
#line 6150 "cs-parser.jay"
{
yyVal = yyVals[-1+yyTop];
}
break;
case 922:
case_922();
break;
case 923:
case_923();
break;
case 924:
#line 6191 "cs-parser.jay"
{
yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 925:
#line 6198 "cs-parser.jay"
{
yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 926:
case_926();
break;
case 927:
#line 6208 "cs-parser.jay"
{
yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
case 928:
case_928();
break;
case 929:
case_929();
break;
case 930:
case_930();
break;
case 931:
case_931();
break;
case 932:
case_932();
break;
case 933:
case_933();
break;
case 934:
case_934();
break;
示例4: Visit
public virtual object Visit (Unchecked uncheckedStatement)
{
return null;
}
示例5: yyparse
//.........这里部分代码省略.........
case 832:
case_832();
break;
case 833:
case_833();
break;
case 836:
#line 5319 "cs-parser.jay"
{
yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 837:
case_837();
break;
case 838:
#line 5338 "cs-parser.jay"
{
yyVal = yyVals[-1+yyTop];
}
break;
case 839:
case_839();
break;
case 840:
#line 5356 "cs-parser.jay"
{
yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 841:
#line 5363 "cs-parser.jay"
{
yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 842:
case_842();
break;
case 843:
#line 5373 "cs-parser.jay"
{
yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
case 844:
case_844();
break;
case 845:
case_845();
break;
case 846:
case_846();
break;
case 847:
case_847();
break;
case 848:
case_848();
break;
case 849:
case_849();
break;
case 850:
case_850();
break;
示例6: yyparse
//.........这里部分代码省略.........
var_block = end_block (lexer.Location);
}
}
yyVal = new Catch (type, id, (Block) yyVals[0+yyTop], var_block, ((Block) yyVals[0+yyTop]).loc);
}
break;
case 811:
#line 5240 "cs-parser.jay"
{ yyVal = null; }
break;
case 813:
#line 5246 "cs-parser.jay"
{
yyVal = new Tuple<FullNamedExpression, Tokenizer.LocatedToken> ((FullNamedExpression)yyVals[-2+yyTop], (Tokenizer.LocatedToken) yyVals[-1+yyTop]);
}
break;
case 814:
#line 5250 "cs-parser.jay"
{
Report.Error (1015, GetLocation (yyVals[-1+yyTop]), "A type that derives from `System.Exception', `object', or `string' expected");
yyVal = null;
}
break;
case 815:
#line 5258 "cs-parser.jay"
{
yyVal = new Checked ((Block) yyVals[0+yyTop]);
}
break;
case 816:
#line 5265 "cs-parser.jay"
{
yyVal = new Unchecked ((Block) yyVals[0+yyTop]);
}
break;
case 817:
#line 5272 "cs-parser.jay"
{
RootContext.CheckUnsafeOption (GetLocation (yyVals[0+yyTop]), Report);
}
break;
case 818:
#line 5274 "cs-parser.jay"
{
yyVal = new Unsafe ((Block) yyVals[0+yyTop]);
}
break;
case 819:
#line 5283 "cs-parser.jay"
{
start_block (lexer.Location);
}
break;
case 820:
#line 5287 "cs-parser.jay"
{
Expression type = (Expression) yyVals[-4+yyTop];
var list = (List<KeyValuePair<Tokenizer.LocatedToken, Expression>>) yyVals[-3+yyTop];
Fixed f = new Fixed (type,
list.ConvertAll (i => {
var v = new KeyValuePair<LocalInfo, Expression> (current_block.AddVariable (type, i.Key.Value, i.Key.Location), i.Value);
if (v.Key != null) {
v.Key.SetReadOnlyContext (LocalInfo.ReadOnlyContext.Fixed);
v.Key.Pinned = true;
}
示例7: yyparse
//.........这里部分代码省略.........
lbag.AddLocation (c, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
yyVal = c;
}
break;
case 870:
#line 5812 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = yyVals[-1+yyTop];
}
break;
case 871:
#line 5816 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
if (yyToken == Token.CLOSE_PARENS) {
report.Error (1015, lexer.Location,
"A type that derives from `System.Exception', `object', or `string' expected");
} else {
Error_SyntaxError (yyToken);
}
yyVal = new Catch (null, GetLocation (yyVals[-2+yyTop]));
}
break;
case 872:
#line 5830 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 873:
#line 5837 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 874:
#line 5844 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
if (!settings.Unsafe)
Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop]));
}
break;
case 875:
#line 5847 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
case 876:
#line 5854 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
yyVal = new Lock ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
}
break;
case 877:
#line 5865 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
start_block (GetLocation (yyVals[-2+yyTop]));
current_block.IsCompilerGenerated = true;
var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];