| 795 | } |
| 796 | |
| 797 | static RefPtr<VarDeclBase> CreateVarDeclForContext( |
| 798 | ContainerDecl* containerDecl ) |
| 799 | { |
| 800 | if (dynamic_cast<StructSyntaxNode*>(containerDecl)) |
| 801 | { |
| 802 | return new StructField(); |
| 803 | } |
| 804 | else if (dynamic_cast<FunctionDeclBase*>(containerDecl)) |
| 805 | { |
| 806 | return new ParameterSyntaxNode(); |
| 807 | } |
| 808 | else |
| 809 | { |
| 810 | return new Variable(); |
| 811 | } |
| 812 | } |
| 813 | |
| 814 | static RefPtr<Decl> ParseVarDecl( |
| 815 | Parser* parser, |