| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
| 6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
| 10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
| (...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2929 DECLARE_NODE_TYPE(EmptyParentheses) | 2929 DECLARE_NODE_TYPE(EmptyParentheses) |
| 2930 | 2930 |
| 2931 private: | 2931 private: |
| 2932 EmptyParentheses(Zone* zone, int pos) : Expression(zone, pos) {} | 2932 EmptyParentheses(Zone* zone, int pos) : Expression(zone, pos) {} |
| 2933 }; | 2933 }; |
| 2934 | 2934 |
| 2935 | 2935 |
| 2936 // Nodes for the optional type system. | 2936 // Nodes for the optional type system. |
| 2937 namespace typesystem { | 2937 namespace typesystem { |
| 2938 | 2938 |
| 2939 enum TypeFlags { |
| 2940 kNormalTypes = 0, |
| 2941 kDisallowTypeParameters = 1 << 0, |
| 2942 kDisallowTypeAnnotation = 1 << 1, |
| 2943 kAllowSignature = 1 << 2, |
| 2944 kConstructorTypes = kDisallowTypeParameters | kDisallowTypeAnnotation |
| 2945 }; |
| 2946 |
| 2939 class FormalParameter; | 2947 class FormalParameter; |
| 2940 | 2948 |
| 2941 | 2949 |
| 2942 // Abstract class for all types. | 2950 // Abstract class for all types. |
| 2943 // It also covers: binding identifiers, binding (array and object) patterns | 2951 // It also covers: binding identifiers, binding (array and object) patterns |
| 2944 // and formal parameter lists. | 2952 // and formal parameter lists. |
| 2945 class Type : public AstNode { | 2953 class Type : public AstNode { |
| 2946 public: | 2954 public: |
| 2947 // Uncovers the case of a single, parenthesized valid type. | 2955 // Uncovers the case of a single, parenthesized valid type. |
| 2948 V8_INLINE Type* Uncover(bool* ok); | 2956 V8_INLINE Type* Uncover(bool* ok); |
| (...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4102 : NULL; \ | 4110 : NULL; \ |
| 4103 } | 4111 } |
| 4104 TYPESYSTEM_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 4112 TYPESYSTEM_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
| 4105 #undef DECLARE_NODE_FUNCTIONS | 4113 #undef DECLARE_NODE_FUNCTIONS |
| 4106 | 4114 |
| 4107 | 4115 |
| 4108 } // namespace internal | 4116 } // namespace internal |
| 4109 } // namespace v8 | 4117 } // namespace v8 |
| 4110 | 4118 |
| 4111 #endif // V8_AST_AST_H_ | 4119 #endif // V8_AST_AST_H_ |
| OLD | NEW |