src/compiler/AST.h
changeset 261 219b49bf4a03
parent 258 241d082d6d89
child 263 ba85a47ee414
     1.1 --- a/src/compiler/AST.h	Sat Jan 12 16:35:26 2013 -0800
     1.2 +++ b/src/compiler/AST.h	Sun Jan 27 17:34:30 2013 -0800
     1.3 @@ -873,11 +873,13 @@
     1.4          ScopedRoot<String> name;
     1.5          Expression *expr;
     1.6          SourcePosition pos;
     1.7 +        ConstantSymbol *sym;
     1.8  
     1.9          Entry(Handle<String> name, Expression *expr, const SourcePosition &pos)
    1.10            : name(name),
    1.11              expr(expr),
    1.12 -            pos(pos)
    1.13 +            pos(pos),
    1.14 +            sym(NULL)
    1.15          {
    1.16          }
    1.17      };
    1.18 @@ -885,17 +887,18 @@
    1.19      typedef PoolList<Entry> EntryList;
    1.20  
    1.21    public:
    1.22 -    EnumStatement(const SourcePosition &pos, Handle<String> name, EntryList *entries)
    1.23 +    EnumStatement(const SourcePosition &pos, TokenKind visibility, Handle<String> name, EntryList *entries)
    1.24        : Statement(pos),
    1.25          name_(name),
    1.26          sym_(NULL),
    1.27 -        entries_(entries)
    1.28 +        entries_(entries),
    1.29 +        visibility_(visibility)
    1.30      {
    1.31      }
    1.32  
    1.33      DECLARE_NODE(EnumStatement);
    1.34  
    1.35 -    String *name() const {
    1.36 +    Handle<String> name() const {
    1.37          return name_;
    1.38      }
    1.39      EntryList *entries() const {
    1.40 @@ -908,9 +911,13 @@
    1.41      TypeSymbol *sym() const {
    1.42          return sym_;
    1.43      }
    1.44 +    TokenKind visibility() const {
    1.45 +        return visibility_;
    1.46 +    }
    1.47  
    1.48    private:
    1.49      EntryList *entries_;
    1.50 +    TokenKind visibility_;
    1.51  };
    1.52  
    1.53  class IncDecExpression : public Expression