Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: src/ast/ast.h

Issue 1853763002: Allow constructor and method signatures in classes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-1849803002-intf-decl
Patch Set: Fix method type annotations in the preparser Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | test/cctest/test-parsing.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 { 2939 enum TypeFlagsEnum {
2940 kNormalTypes = 0, 2940 kNormalTypes = 0,
2941 kDisallowTypeParameters = 1 << 0, 2941 kDisallowTypeParameters = 1 << 0,
2942 kDisallowTypeAnnotation = 1 << 1, 2942 kDisallowTypeAnnotation = 1 << 1,
2943 kAllowSignature = 1 << 2, 2943 kAllowSignature = 1 << 2,
2944 kConstructorTypes = kDisallowTypeParameters | kDisallowTypeAnnotation 2944 kConstructorTypes = kDisallowTypeParameters | kDisallowTypeAnnotation
2945 }; 2945 };
2946 2946
2947 typedef base::Flags<TypeFlagsEnum> TypeFlags;
2948
2947 class FormalParameter; 2949 class FormalParameter;
2948 2950
2949 2951
2950 // Abstract class for all types. 2952 // Abstract class for all types.
2951 // It also covers: binding identifiers, binding (array and object) patterns 2953 // It also covers: binding identifiers, binding (array and object) patterns
2952 // and formal parameter lists. 2954 // and formal parameter lists.
2953 class Type : public AstNode { 2955 class Type : public AstNode {
2954 public: 2956 public:
2955 // Uncovers the case of a single, parenthesized valid type. 2957 // Uncovers the case of a single, parenthesized valid type.
2956 V8_INLINE Type* Uncover(bool* ok); 2958 V8_INLINE Type* Uncover(bool* ok);
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
4110 : NULL; \ 4112 : NULL; \
4111 } 4113 }
4112 TYPESYSTEM_NODE_LIST(DECLARE_NODE_FUNCTIONS) 4114 TYPESYSTEM_NODE_LIST(DECLARE_NODE_FUNCTIONS)
4113 #undef DECLARE_NODE_FUNCTIONS 4115 #undef DECLARE_NODE_FUNCTIONS
4114 4116
4115 4117
4116 } // namespace internal 4118 } // namespace internal
4117 } // namespace v8 4119 } // namespace v8
4118 4120
4119 #endif // V8_AST_AST_H_ 4121 #endif // V8_AST_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | test/cctest/test-parsing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698