コード例 #1
0
ファイル: StructSyntax.cs プロジェクト: btbaggin/SmallLang
 public StructSyntax(string pName, string pPrefix, IList <string> pTypeArgs, IList <FieldDeclarationSyntax> pFields, BlockSyntax pInitializer)
 {
     Name     = pName;
     Prefix   = pPrefix;
     TypeArgs = pTypeArgs;
     Fields   = pFields;
     foreach (var f in Fields)
     {
         f.Parent = this;
     }
     Initializer = pInitializer;
     if (Initializer != null)
     {
         Initializer.Parent = this;
     }
 }
コード例 #2
0
 public InitializerInfo(Syntax.BlockSyntax pBlock)
 {
     _block = pBlock;
 }
コード例 #3
0
 public static StructSyntax Struct(string pName, string pPrefix, IList <string> pTypeArgs, IList <FieldDeclarationSyntax> pFields, BlockSyntax pInitializer)
 {
     return(new StructSyntax(pName, pPrefix, pTypeArgs, pFields, pInitializer));
 }
コード例 #4
0
 public static ForSyntax For(DeclarationStatementSyntax pDeclaration, ExpressionSyntax pCondition, SyntaxNode pPostLoop, BlockSyntax pBody)
 {
     return(new ForSyntax(pDeclaration, pCondition, pPostLoop, pBody));
 }
コード例 #5
0
 public static WhileSyntax While(ExpressionSyntax pCondition, BlockSyntax pBody)
 {
     return(new WhileSyntax(pCondition, pBody));
 }
コード例 #6
0
 public static ElseSyntax Else(IfSyntax pIf, BlockSyntax pBody)
 {
     return(new ElseSyntax(pIf, pBody));
 }
コード例 #7
0
 public static IfSyntax If(ExpressionSyntax pCondition, BlockSyntax pBlock, ElseSyntax pElse)
 {
     return(new IfSyntax(pCondition, pBlock, pElse));
 }
コード例 #8
0
 public static CastSyntax Cast(ParameterSyntax pParameter, ReturnValueSyntax pReturnValue, BlockSyntax pBody)
 {
     return(new CastSyntax(pParameter, pReturnValue, pBody));
 }
コード例 #9
0
 public static MethodSyntax Method(string pName, IList <ParameterSyntax> pParameters, IList <ReturnValueSyntax> pReturnValues, BlockSyntax pBody, bool pIsExtern)
 {
     return(new MethodSyntax(pName, pParameters, pReturnValues, pBody, pIsExtern));
 }