src/AST.h
author David Anderson <dvander@alliedmods.net>
Sat Aug 04 17:51:43 2012 -0700 (2012-08-04)
changeset 146 dc7d3b7a918c
parent 145 e9d804821c48
child 148 c0740249963c
permissions -rw-r--r--
Basic support for parsing and creating types from structure syntax.
     1 /* vim: set ts=4 sw=4 tw=99 et:
     2  *
     3  * Copyright (C) 2012 David Anderson
     4  *
     5  * This file is part of SourcePawn.
     6  *
     7  * SourcePawn is free software: you can redistribute it and/or modify it under
     8  * the terms of the GNU General Public License as published by the Free
     9  * Software Foundation, either version 3 of the License, or (at your option)
    10  * any later version.
    11  * 
    12  * SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
    13  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    14  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    15  *
    16  * You should have received a copy of the GNU General Public License along with
    17  * SourcePawn. If not, see http://www.gnu.org/licenses/.
    18  */
    19 #ifndef _include_jitcraft_ast_h_
    20 #define _include_jitcraft_ast_h_
    21 
    22 #include "PoolAllocator.h"
    23 #include "Token.h"
    24 #include "NameBinding.h"
    25 #include "Vector.h"
    26 
    27 namespace ke {
    28 
    29 #define ASTKINDS(_)             \
    30     _(VariableDeclaration)      \
    31     _(ForStatement)             \
    32     _(ReturnStatement)          \
    33     _(IntegerLiteral)           \
    34     _(FloatLiteral)             \
    35     _(StringLiteral)            \
    36     _(BinaryExpression)         \
    37     _(BlockStatement)           \
    38     _(Assignment)               \
    39     _(NameProxy)                \
    40     _(ExpressionStatement)      \
    41     _(FunctionStatement)        \
    42     _(CallExpression)           \
    43     _(IfStatement)              \
    44     _(IndexExpression)          \
    45     _(EnumStatement)            \
    46     _(WhileStatement)           \
    47     _(BreakStatement)           \
    48     _(ContinueStatement)        \
    49     _(IncDecExpression)         \
    50     _(UnaryExpression)          \
    51     _(TernaryExpression)        \
    52     _(BooleanLiteral)           \
    53     _(StructureStatement)
    54 
    55 // Forward declarations.
    56 #define _(name) class name;
    57 ASTKINDS(_)
    58 #undef _
    59 
    60 class AstVisitor;
    61 
    62 // Interface for AST nodes.
    63 class AstNode : public PoolObject
    64 {
    65     SourcePosition pos_;
    66 
    67   public:
    68     enum Kind {
    69 #       define _(name) k##name,
    70         ASTKINDS(_)
    71 #       undef _
    72         AstKind_Invalid
    73     };
    74 
    75     AstNode(const SourcePosition &pos)
    76       : pos_(pos)
    77     {
    78     }
    79     
    80     virtual Kind kind() const = 0;
    81 
    82 #define _(name)     bool is##name() { return kind() == k##name; }                   \
    83                     name *to##name() { assert(is##name()); return (name *)this; }
    84     ASTKINDS(_)
    85 #undef _
    86 
    87     virtual void accept(AstVisitor *visitor) = 0;
    88 
    89     const SourcePosition &pos() const {
    90         return pos_;
    91     }
    92 };
    93 
    94 class AstVisitor
    95 {
    96   public:
    97 #define _(name) virtual void visit(name *node) = 0;
    98     ASTKINDS(_)
    99 #undef _
   100 };
   101 
   102 class Statement : public AstNode
   103 {
   104   public:
   105     Statement(const SourcePosition &pos)
   106       : AstNode(pos)
   107     {
   108     }
   109 };
   110 
   111 class Expression : public AstNode
   112 {
   113     ScopedRoot<Type> type_;
   114 
   115   public:
   116     Expression(const SourcePosition &pos)
   117       : AstNode(pos),
   118         type_(NULL)
   119     {
   120     }
   121 
   122     void setType(Type *type) {
   123         type_ = type;
   124     }
   125     Type *type() const {
   126         return type_;
   127     }
   128 };
   129 
   130 typedef PoolList<Statement *> StatementList;
   131 typedef PoolList<Expression *> ExpressionList;
   132 
   133 class VariableDeclaration : public Statement
   134 {
   135     Variable *variable_;
   136     Expression *initialization_;
   137     ExpressionList *postDimensions_;
   138     BoundName *type_;
   139     TokenKind declarator_;
   140 
   141   public:
   142     VariableDeclaration(const SourcePosition &pos, TokenKind declarator, Variable *var,
   143                         BoundName *type, ExpressionList *postDimensions,
   144                         Expression *initialization)
   145       : Statement(pos),
   146         variable_(var),
   147         initialization_(initialization),
   148         postDimensions_(postDimensions),
   149         type_(type),
   150         declarator_(declarator)
   151     {
   152     }
   153 
   154     BoundName *type() const {
   155         return type_;
   156     }
   157     Kind kind() const {
   158         return kVariableDeclaration;
   159     }
   160     Variable *variable() const {
   161         return variable_;
   162     }
   163     Expression *initialization() const {
   164         return initialization_;
   165     }
   166     ExpressionList *postDimensions() const {
   167         return postDimensions_;
   168     }
   169     void accept(AstVisitor *visitor) {
   170         visitor->visit(this);
   171     }
   172     TokenKind declarator() const {
   173         return declarator_;
   174     }
   175 };
   176 
   177 class Parameter : public PoolObject
   178 {
   179     Variable *variable_;
   180     BoundName *type_;
   181     bool reference_;
   182     bool const_;
   183     ExpressionList *dimensions_;
   184     Expression *initializer_;
   185 
   186   public:
   187     Parameter(Variable *var, BoundName *type, bool reference, bool isConst,
   188               ExpressionList *dimensions, Expression *initializer)
   189       : variable_(var),
   190         type_(type),
   191         reference_(reference),
   192         const_(isConst),
   193         dimensions_(dimensions),
   194         initializer_(initializer)
   195     {
   196     }
   197 
   198     BoundName *type() const {
   199         return type_;
   200     }
   201     Variable *variable() const {
   202         return variable_;
   203     }
   204     bool reference() const {
   205         return reference_;
   206     }
   207     ExpressionList *dimensions() const {
   208         return dimensions_;
   209     }
   210     bool isConst() const {
   211         return const_;
   212     }
   213     Expression *initializer() const {
   214         return initializer_;
   215     }
   216 };
   217 
   218 class NameProxy : public Expression
   219 {
   220     ScopedRoot<String> name_;
   221     BoundName *binding_;
   222 
   223   public:
   224     NameProxy(const SourcePosition &pos, Handle<String> name, BoundName *binding)
   225       : Expression(pos),
   226         name_(name),
   227         binding_(binding)
   228     {
   229     }
   230 
   231     Kind kind() const {
   232         return kNameProxy;
   233     }
   234     String *name() const {
   235         return name_;
   236     }
   237     void accept(AstVisitor *visitor) {
   238         visitor->visit(this);
   239     }
   240     BoundName *binding() const {
   241         return binding_;
   242     }
   243     void bind(BoundName *name) {
   244         assert(!binding());
   245         binding_ = name;
   246     }
   247 };
   248 
   249 class BooleanLiteral : public Expression
   250 {
   251     TokenKind token_;
   252 
   253   public:
   254     BooleanLiteral(const SourcePosition &pos, TokenKind token)
   255       : Expression(pos),
   256         token_(token)
   257     {
   258     }
   259 
   260     Kind kind() const {
   261         return kBooleanLiteral;
   262     }
   263     TokenKind token() const {
   264         return token_;
   265     }
   266     void accept(AstVisitor *visitor) {
   267         visitor->visit(this);
   268     }
   269 };
   270 
   271 class IntegerLiteral : public Expression
   272 {
   273     int value_;
   274 
   275   public:
   276     IntegerLiteral(const SourcePosition &pos, int value)
   277       : Expression(pos),
   278         value_(value)
   279     {
   280     }
   281 
   282     Kind kind() const {
   283         return kIntegerLiteral;
   284     }
   285     int value() const {
   286         return value_;
   287     }
   288     void accept(AstVisitor *visitor) {
   289         visitor->visit(this);
   290     }
   291 };
   292 
   293 class FloatLiteral : public Expression
   294 {
   295     double value_;
   296 
   297   public:
   298     FloatLiteral(const SourcePosition &pos, double value)
   299       : Expression(pos),
   300         value_(value)
   301     {
   302     }
   303 
   304     Kind kind() const {
   305         return kFloatLiteral;
   306     }
   307     double value() const {
   308         return value_;
   309     }
   310     void accept(AstVisitor *visitor) {
   311         visitor->visit(this);
   312     }
   313 };
   314 
   315 class StringLiteral : public Expression
   316 {
   317     ScopedRoot<ByteArray> string_;
   318 
   319   public:
   320     StringLiteral(const SourcePosition &pos, ByteArray *array)
   321       : Expression(pos),
   322         string_(array)
   323     {
   324     }
   325 
   326     Kind kind() const {
   327         return kStringLiteral;
   328     }
   329     ByteArray *string() const {
   330         return string_;
   331     }
   332     void accept(AstVisitor *visitor) {
   333         visitor->visit(this);
   334     }
   335 };
   336 
   337 class UnaryExpression : public Expression
   338 {
   339     Expression *expression_;
   340     TokenKind token_;
   341     BoundName *type_;
   342 
   343   public:
   344     UnaryExpression(const SourcePosition &pos, TokenKind token, Expression *expr)
   345       : Expression(pos),
   346         expression_(expr),
   347         token_(token)
   348     {
   349     }
   350 
   351     UnaryExpression(const SourcePosition &pos, TokenKind token, Expression *expr,
   352                     BoundName *type)
   353       : Expression(pos),
   354         expression_(expr),
   355         token_(token),
   356         type_(type)
   357     {
   358     }
   359 
   360     Kind kind() const {
   361         return kUnaryExpression;
   362     }
   363     Expression *expression() const {
   364         return expression_;
   365     }
   366     TokenKind token() const {
   367         return token_;
   368     }
   369     BoundName *type() const {
   370         return type_;
   371     }
   372     void accept(AstVisitor *visitor) {
   373         visitor->visit(this);
   374     }
   375 };
   376 
   377 class BinaryExpression : public Expression
   378 {
   379     Expression *left_;
   380     Expression *right_;
   381     TokenKind token_;
   382 
   383   public:
   384     BinaryExpression(const SourcePosition &pos, TokenKind token, Expression *left, Expression *right)
   385       : Expression(pos),
   386         left_(left),
   387         right_(right),
   388         token_(token)
   389     {
   390     }
   391 
   392     Kind kind() const {
   393         return kBinaryExpression;
   394     }
   395     Expression *left() const {
   396         return left_;
   397     }
   398     Expression *right() const {
   399         return right_;
   400     }
   401     TokenKind token() const {
   402         return token_;
   403     }
   404     void accept(AstVisitor *visitor) {
   405         visitor->visit(this);
   406     }
   407 };
   408 
   409 class TernaryExpression : public Expression
   410 {
   411     Expression *condition_;
   412     Expression *left_;
   413     Expression *right_;
   414 
   415   public:
   416     TernaryExpression(const SourcePosition &pos, Expression *condition, Expression *left, Expression *right)
   417       : Expression(pos),
   418         condition_(condition),
   419         left_(left),
   420         right_(right)
   421     {
   422     }
   423 
   424     Kind kind() const {
   425         return kTernaryExpression;
   426     }
   427     Expression *condition() const {
   428         return condition_;
   429     }
   430     Expression *left() const {
   431         return left_;
   432     }
   433     Expression *right() const {
   434         return right_;
   435     }
   436     void accept(AstVisitor *visitor) {
   437         visitor->visit(this);
   438     }
   439 };
   440 
   441 class IndexExpression : public Expression
   442 {
   443     Expression *left_;
   444     Expression *right_;
   445 
   446   public:
   447     IndexExpression(const SourcePosition &pos, Expression *left, Expression *right)
   448       : Expression(pos),
   449         left_(left),
   450         right_(right)
   451     {
   452     }
   453 
   454     Kind kind() const {
   455         return kIndexExpression;
   456     }
   457     Expression *left() const {
   458         return left_;
   459     }
   460     Expression *right() const {
   461         return right_;
   462     }
   463     void accept(AstVisitor *visitor) {
   464         visitor->visit(this);
   465     }
   466 };
   467 
   468 class CallExpression : public Expression
   469 {
   470     Expression *callee_;
   471     ExpressionList *arguments_;
   472 
   473   public:
   474     CallExpression(const SourcePosition &pos, Expression *callee, ExpressionList *arguments)
   475       : Expression(pos),
   476         callee_(callee),
   477         arguments_(arguments)
   478     {
   479     }
   480 
   481     Kind kind() const {
   482         return kCallExpression;
   483     }
   484     Expression *callee() const {
   485         return callee_;
   486     }
   487     ExpressionList *arguments() const {
   488         return arguments_;
   489     }
   490     void accept(AstVisitor *visitor) {
   491         visitor->visit(this);
   492     }
   493 };
   494 
   495 class ForStatement : public Statement
   496 {
   497     Scope *scope_;
   498     Statement *initialization_;
   499     Expression *condition_;
   500     Statement *update_;
   501     Statement *body_;
   502 
   503   public:
   504     ForStatement(const SourcePosition &pos, Scope *scope, Statement *initialization,
   505                  Expression *condition, Statement *update, Statement *body)
   506       : Statement(pos),
   507         scope_(scope),
   508         initialization_(initialization),
   509         condition_(condition),
   510         update_(update),
   511         body_(body)
   512     {
   513     }
   514 
   515     Kind kind() const {
   516         return kForStatement;
   517     }
   518     Statement *initialization() const {
   519         return initialization_;
   520     }
   521     Scope *scope() const {
   522         return scope_;
   523     }
   524     Expression *condition() const {
   525         return condition_;
   526     }
   527     Statement *update() const {
   528         return update_;
   529     }
   530     Statement *body() const {
   531         return body_;
   532     }
   533     void accept(AstVisitor *visitor) {
   534         visitor->visit(this);
   535     }
   536 };
   537 
   538 class WhileStatement : public Statement
   539 {
   540     TokenKind token_;
   541     Expression *condition_;
   542     Statement *body_;
   543 
   544   public:
   545     WhileStatement(const SourcePosition &pos, TokenKind kind, Expression *condition, Statement *body)
   546       : Statement(pos),
   547         token_(kind),
   548         condition_(condition),
   549         body_(body)
   550     {
   551     }
   552     
   553     Kind kind() const {
   554         return kWhileStatement;
   555     }
   556     TokenKind token() const {
   557         return token_;
   558     }
   559     Expression *condition() const {
   560         return condition_;
   561     }
   562     Statement *body() const {
   563         return body_;
   564     }
   565     void accept(AstVisitor *visitor) {
   566         visitor->visit(this);
   567     }
   568 };
   569 
   570 class ReturnStatement : public Statement
   571 {
   572     Expression *expression_;
   573 
   574   public:
   575     ReturnStatement(const SourcePosition &pos, Expression *expression)
   576       : Statement(pos),
   577         expression_(expression)
   578     {
   579     }
   580 
   581     Kind kind() const {
   582         return kReturnStatement;
   583     }
   584     Expression *expression() const {
   585         return expression_;
   586     }
   587     void accept(AstVisitor *visitor) {
   588         visitor->visit(this);
   589     }
   590 };
   591 
   592 class BreakStatement : public Statement
   593 {
   594   public:
   595     BreakStatement(const SourcePosition &pos)
   596       : Statement(pos)
   597     {
   598     }
   599 
   600     Kind kind() const {
   601         return kBreakStatement;
   602     }
   603     void accept(AstVisitor *visitor) {
   604         visitor->visit(this);
   605     }
   606 };
   607 
   608 class ContinueStatement : public Statement
   609 {
   610   public:
   611     ContinueStatement(const SourcePosition &pos)
   612       : Statement(pos)
   613     {
   614     }
   615 
   616     Kind kind() const {
   617         return kContinueStatement;
   618     }
   619     void accept(AstVisitor *visitor) {
   620         visitor->visit(this);
   621     }
   622 };
   623 
   624 class Assignment : public Expression
   625 {
   626     TokenKind token_;
   627     Expression *lvalue_;
   628     Expression *expression_;
   629 
   630   public:
   631     Assignment(const SourcePosition &pos, TokenKind token, Expression *left, Expression *right)
   632       : Expression(pos),
   633         token_(token),
   634         lvalue_(left),
   635         expression_(right)
   636     {
   637     }
   638 
   639     Kind kind() const {
   640         return kAssignment;
   641     }
   642     TokenKind token() const {
   643         return token_;
   644     }
   645     Expression *lvalue() const {
   646         return lvalue_;
   647     }
   648     Expression *expression() const {
   649         return expression_;
   650     }
   651     void accept(AstVisitor *visitor) {
   652         visitor->visit(this);
   653     }
   654 };
   655 
   656 class ExpressionStatement : public Statement
   657 {
   658     Expression *expression_;
   659 
   660   public:
   661     ExpressionStatement(Expression *expression)
   662       : Statement(expression->pos()),
   663         expression_(expression)
   664     {
   665     }
   666 
   667     Kind kind() const {
   668         return kExpressionStatement;
   669     }
   670     Expression *expression() const {
   671         return expression_;
   672     }
   673     void accept(AstVisitor *visitor) {
   674         visitor->visit(this);
   675     }
   676 };
   677 
   678 class BlockStatement : public Statement
   679 {
   680     Scope *scope_;
   681     StatementList *statements_;
   682 
   683   public:
   684     BlockStatement(const SourcePosition &pos, Scope *scope, StatementList *statements)
   685       : Statement(pos),
   686         scope_(scope),
   687         statements_(statements)
   688     {
   689     }
   690 
   691     Kind kind() const {
   692         return kBlockStatement;
   693     }
   694     Scope *scope() const {
   695         return scope_;
   696     }
   697     StatementList *statements() const {
   698         return statements_;
   699     }
   700     void accept(AstVisitor *visitor) {
   701         visitor->visit(this);
   702     }
   703 };
   704 
   705 typedef PoolList<Parameter *> ParameterList;
   706 
   707 class FunctionStatement : public Statement
   708 {
   709     Scope *scope_;
   710     NamedFunction *fun_;
   711     Statement *body_;
   712     ParameterList *parameters_;
   713     bool explicitReturn_;
   714     BoundName *returnType_;
   715 
   716   public:
   717     FunctionStatement(const SourcePosition &pos, Scope *scope, NamedFunction *fun, Statement *body,
   718                       ParameterList *parameters, BoundName *returnType, bool explicitReturn)
   719       : Statement(pos),
   720         scope_(scope),
   721         fun_(fun),
   722         body_(body),
   723         parameters_(parameters),
   724         explicitReturn_(explicitReturn),
   725         returnType_(returnType)
   726     {
   727     }
   728 
   729     Kind kind() const {
   730         return kFunctionStatement;
   731     }
   732     Scope *scope() const {
   733         return scope_;
   734     }
   735     NamedFunction *fun() const {
   736         return fun_;
   737     }
   738     Statement *body() const {
   739         return body_;
   740     }
   741     ParameterList *parameters() const {
   742         return parameters_;
   743     }
   744     void accept(AstVisitor *visitor) {
   745         visitor->visit(this);
   746     }
   747     bool hasExplicitReturn() const {
   748         return explicitReturn_;
   749     }
   750     BoundName *returnType() const {
   751         return returnType_;
   752     }
   753 };
   754 
   755 class IfStatement : public Statement
   756 {
   757     Expression *condition_;
   758     Statement *ifTrue_;
   759     Statement *ifFalse_;
   760 
   761   public:
   762     IfStatement(const SourcePosition &pos, Expression *condition, Statement *ifTrue)
   763       : Statement(pos),
   764         condition_(condition),
   765         ifTrue_(ifTrue),
   766         ifFalse_(NULL)
   767     {
   768     }
   769 
   770     Kind kind() const {
   771         return kIfStatement;
   772     }
   773     Expression *condition() const {
   774         return condition_;
   775     }
   776     Statement *ifTrue() const {
   777         return ifTrue_;
   778     }
   779     Statement *ifFalse() const {
   780         return ifFalse_;
   781     }
   782     void setIfFalse(Statement *ifFalse) {
   783         ifFalse_ = ifFalse;
   784     }
   785     void accept(AstVisitor *visitor) {
   786         visitor->visit(this);
   787     }
   788 };
   789 
   790 class EnumStatement : public Statement
   791 {
   792     ScopedRoot<String> name_;
   793     NamedType *type_;
   794 
   795   public:
   796     struct Entry {
   797         NamedConstant *name;
   798         Expression *expr;
   799 
   800         Entry(NamedConstant *name, Expression *expr)
   801           : name(name),
   802             expr(expr)
   803         {
   804         }
   805     };
   806 
   807     typedef PoolList<Entry> EntryList;
   808 
   809   public:
   810     EnumStatement(const SourcePosition &pos, NamedType *type, Handle<String> name, EntryList *entries)
   811       : Statement(pos),
   812         name_(name),
   813         type_(type),
   814         entries_(entries)
   815     {
   816     }
   817 
   818     Kind kind() const {
   819         return kEnumStatement;
   820     }
   821     String *name() const {
   822         return name_;
   823     }
   824     EntryList *entries() const {
   825         return entries_;
   826     }
   827     NamedType *decl() const {
   828         return type_;
   829     }
   830     void accept(AstVisitor *visitor) {
   831         visitor->visit(this);
   832     }
   833 
   834   private:
   835     EntryList *entries_;
   836 };
   837 
   838 class IncDecExpression : public Expression
   839 {
   840     TokenKind token_;
   841     Expression *expression_;
   842     bool postfix_;
   843 
   844   public:
   845     IncDecExpression(const SourcePosition &pos, TokenKind token, Expression *expression, bool postfix)
   846       : Expression(pos),
   847         token_(token),
   848         expression_(expression),
   849         postfix_(postfix)
   850     {
   851     }
   852 
   853     Kind kind() const {
   854         return kIncDecExpression;
   855     }
   856     TokenKind token() const {
   857         return token_;
   858     }
   859     Expression *expression() const {
   860         return expression_;
   861     }
   862     bool postfix() const {
   863         return postfix_;
   864     }
   865     void accept(AstVisitor *visitor) {
   866         visitor->visit(this);
   867     }
   868 };
   869 
   870 class StructureStatement : public Statement
   871 {
   872   public:
   873     class Field : public PoolObject
   874     {
   875         SourcePosition pos_;
   876         BoundName *type_;
   877         ScopedRoot<String> name_;
   878         ExpressionList *dimensions_;
   879 
   880       public:
   881         Field(const SourcePosition &pos,
   882               BoundName *type,
   883               Handle<String> name,
   884               ExpressionList *dimensions)
   885           : pos_(pos),
   886             type_(type),
   887             name_(name),
   888             dimensions_(dimensions)
   889         {
   890         }
   891 
   892         const SourcePosition &pos() const {
   893             return pos_;
   894         }
   895         BoundName *type() const {
   896             return type_;
   897         }
   898         String *name() const {
   899             return name_;
   900         }
   901         ExpressionList *dimensions() const {
   902             return dimensions_;
   903         }
   904     };
   905 
   906     typedef PoolList<StructureStatement::Field *> FieldList;
   907 
   908   public:
   909     StructureStatement(const SourcePosition &pos, NamedType *decl, FieldList *fields)
   910       : Statement(pos),
   911         decl_(decl),
   912         fields_(fields)
   913     {
   914     }
   915 
   916     Kind kind() const {
   917         return kStructureStatement;
   918     }
   919     FieldList *fields() const {
   920         return fields_;
   921     }
   922     NamedType *decl() const {
   923         return decl_;
   924     }
   925     void accept(AstVisitor *visitor) {
   926         visitor->visit(this);
   927     }
   928 
   929   private:
   930     NamedType *decl_;
   931     FieldList *fields_;
   932 };
   933 
   934 typedef StructureStatement::FieldList FieldList;
   935 
   936 class Scope;
   937 
   938 typedef PoolList<NameProxy *> NameProxyList;
   939 
   940 class ParseTree : public PoolObject
   941 {
   942     StatementList *statements_;
   943     Scope *scope_;
   944     NameProxyList *unbound_;
   945 
   946   public:
   947     ParseTree(Scope *scope, StatementList *statements, NameProxyList *unbound)
   948       : statements_(statements),
   949         scope_(scope),
   950         unbound_(unbound)
   951     {
   952     }
   953 
   954     void dump(FILE *fp);
   955 
   956     StatementList *statements() const {
   957         return statements_;
   958     }
   959     Scope *scope() const {
   960         return scope_;
   961     }
   962     NameProxyList *unbound() const {
   963         return unbound_;
   964     }
   965 };
   966 
   967 }
   968 
   969 #endif // _include_jitcraft_ast_h_