Exemple #1
0
 public Declarator CallConventionDeclarator(CTokenType conv, Declarator decl)
 {
     return(new CallConventionDeclarator
     {
         Convention = conv,
         Declarator = decl,
     });
 }
Exemple #2
0
 public ParamDecl ParamDecl(List <CAttribute> attrs, List <DeclSpec> dsl, Declarator decl)
 {
     return(new ParamDecl
     {
         Attributes = attrs,
         DeclSpecs = dsl,
         Declarator = decl,
     });
 }
Exemple #3
0
 public NamedDataType GetNameAndType(Declarator declarator)
 {
     var nt = new NamedDataType { DataType = dt, Size = byteSize };
     if (declarator != null)
     {
         nt = declarator.Accept(this)(nt);
     }
     return nt;
 }
Exemple #4
0
        public static string?GetName(IEnumerable <DeclSpec> declspecs, Declarator declarator, ParserState state)
        {
            var ndte = new NameExtractor();

            if (declarator != null)
            {
                return(declarator.Accept(ndte));
            }
            else
            {
                return(null);
            }
        }
Exemple #5
0
 internal Decl Decl(List <CAttribute> attrs, List <DeclSpec> list, Declarator decl)
 {
     return(new Decl
     {
         attribute_list = attrs,
         decl_specs = list,
         init_declarator_list = new List <InitDeclarator>
         {
             new InitDeclarator {
                 Declarator = decl,
                 Init = null
             }
         }
     });
 }
Exemple #6
0
 internal Decl FunctionDefinition(List <CAttribute> attrs, List <DeclSpec> decl_spec_list, Declarator declarator, List <Stat> statements)
 {
     return(new FunctionDecl
     {
         decl_specs = decl_spec_list,        //$REVIEW: dupe?
         Signature = Decl(attrs, decl_spec_list, declarator),
         Body = statements
     });
 }
Exemple #7
0
 public Declarator ReferenceDeclarator(Declarator decl, List <TypeQualifier> tqs)
 {
     return(new ReferenceDeclarator {
         TypeQualifierList = tqs, Referent = decl
     });
 }
Exemple #8
0
 public Declarator PointerDeclarator(Declarator decl, List <TypeQualifier> tqs)
 {
     return(new PointerDeclarator {
         TypeQualifierList = tqs, Pointee = decl
     });
 }
Exemple #9
0
 public Declarator FunctionDeclarator(Declarator decl, List <ParamDecl> parameters)
 {
     return(new FunctionDeclarator {
         Declarator = decl, Parameters = parameters
     });
 }
Exemple #10
0
 public Declarator ArrayDeclarator(Declarator decl, CExpression expr)
 {
     return(new ArrayDeclarator {
         Declarator = decl, Size = expr
     });
 }
Exemple #11
0
 public InitDeclarator InitDeclarator(Declarator decl, Initializer init)
 {
     return(new InitDeclarator {
         Declarator = decl, Init = init
     });
 }
Exemple #12
0
 public FieldDeclarator FieldDeclarator(Declarator decl, CExpression bitField)
 {
     return(new FieldDeclarator {
         Declarator = decl, FieldSize = bitField
     });
 }