src/SemanticAnalysis.h
changeset 187 9308d52205a0
parent 174 e718b56aba78
child 191 9d17f29fe16a
     1.1 --- a/src/SemanticAnalysis.h	Sat Sep 15 19:33:24 2012 -0700
     1.2 +++ b/src/SemanticAnalysis.h	Sun Sep 16 19:02:23 2012 -0700
     1.3 @@ -21,6 +21,7 @@
     1.4  
     1.5  #include <assert.h>
     1.6  #include "AST.h"
     1.7 +#include "Types.h"
     1.8  
     1.9  namespace ke {
    1.10  
    1.11 @@ -174,6 +175,13 @@
    1.12      Type *visitAndApplyType(Expression *expression);
    1.13      ControlStatus visitForControl(Statement *statement);
    1.14  
    1.15 +    bool evaluateDimensions(ExpressionList *exprs, int dims[MAX_ARRAY_DEPTH]);
    1.16 +    bool inferFixedArrayLiteral(ArrayLiteral *literal,
    1.17 +                                Handle<Type> type,
    1.18 +                                int dims[MAX_ARRAY_DEPTH],
    1.19 +                                unsigned dimcount,
    1.20 +                                unsigned level);
    1.21 +
    1.22      Box *evaluateDefaultParameter(Handle<Type> type, Parameter *parameter);
    1.23      bool checkArgumentCount(Handle<Type> type, unsigned actual);
    1.24      bool buildFunctionArgs(AstNode *node, TokenKind kind, const FunctionSignature &sig,
    1.25 @@ -215,6 +223,7 @@
    1.26      void visit(FieldExpression *node);
    1.27      void visit(SwitchStatement *node);
    1.28      void visit(FunctionTypeStatement *node);
    1.29 +    void visit(ArrayLiteral *node);
    1.30  };
    1.31  
    1.32  const char *GetTypeName(Type *type);