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

Side by Side Diff: src/parsing/preparser.h

Issue 1839393002: Add parsing for type aliases (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-1841093002-fun-decl
Patch Set: More tests and allow type as an indentifier 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 | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
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_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 PreParserExpressionList arguments, 665 PreParserExpressionList arguments,
666 int pos) { 666 int pos) {
667 return PreParserExpression::Default(); 667 return PreParserExpression::Default();
668 } 668 }
669 PreParserExpression NewCallRuntime(const AstRawString* name, 669 PreParserExpression NewCallRuntime(const AstRawString* name,
670 const Runtime::Function* function, 670 const Runtime::Function* function,
671 PreParserExpressionList arguments, 671 PreParserExpressionList arguments,
672 int pos) { 672 int pos) {
673 return PreParserExpression::Default(); 673 return PreParserExpression::Default();
674 } 674 }
675 PreParserStatement NewEmptyStatement(int pos) {
676 return PreParserStatement::Default();
677 }
675 PreParserStatement NewReturnStatement(PreParserExpression expression, 678 PreParserStatement NewReturnStatement(PreParserExpression expression,
676 int pos) { 679 int pos) {
677 return PreParserStatement::Default(); 680 return PreParserStatement::Default();
678 } 681 }
679 PreParserExpression NewFunctionLiteral( 682 PreParserExpression NewFunctionLiteral(
680 PreParserIdentifier name, Scope* scope, PreParserStatementList body, 683 PreParserIdentifier name, Scope* scope, PreParserStatementList body,
681 int materialized_literal_count, int expected_property_count, 684 int materialized_literal_count, int expected_property_count,
682 int parameter_count, 685 int parameter_count,
683 FunctionLiteral::ParameterFlag has_duplicate_parameters, 686 FunctionLiteral::ParameterFlag has_duplicate_parameters,
684 FunctionLiteral::FunctionType function_type, 687 FunctionLiteral::FunctionType function_type,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 typedef PreParserExpression Expression; 845 typedef PreParserExpression Expression;
843 typedef PreParserExpression YieldExpression; 846 typedef PreParserExpression YieldExpression;
844 typedef PreParserExpression FunctionLiteral; 847 typedef PreParserExpression FunctionLiteral;
845 typedef PreParserExpression ClassLiteral; 848 typedef PreParserExpression ClassLiteral;
846 typedef PreParserExpression ObjectLiteralProperty; 849 typedef PreParserExpression ObjectLiteralProperty;
847 typedef PreParserExpression Literal; 850 typedef PreParserExpression Literal;
848 typedef PreParserExpressionList ExpressionList; 851 typedef PreParserExpressionList ExpressionList;
849 typedef PreParserExpressionList PropertyList; 852 typedef PreParserExpressionList PropertyList;
850 typedef PreParserIdentifier FormalParameter; 853 typedef PreParserIdentifier FormalParameter;
851 typedef PreParserFormalParameters FormalParameters; 854 typedef PreParserFormalParameters FormalParameters;
855 typedef PreParserStatement Statement;
852 typedef PreParserStatementList StatementList; 856 typedef PreParserStatementList StatementList;
853 857
854 struct TypeSystem { 858 struct TypeSystem {
855 typedef typesystem::PreParserType Type; 859 typedef typesystem::PreParserType Type;
856 typedef typesystem::PreParserTypeList TypeList; 860 typedef typesystem::PreParserTypeList TypeList;
857 typedef typesystem::PreParserTypeParameter TypeParameter; 861 typedef typesystem::PreParserTypeParameter TypeParameter;
858 typedef typesystem::PreParserTypeParameters TypeParameters; 862 typedef typesystem::PreParserTypeParameters TypeParameters;
859 typedef typesystem::PreParserFormalParameter FormalParameter; 863 typedef typesystem::PreParserFormalParameter FormalParameter;
860 typedef typesystem::PreParserFormalParameters FormalParameters; 864 typedef typesystem::PreParserFormalParameters FormalParameters;
861 typedef typesystem::PreParserTypeMember TypeMember; 865 typedef typesystem::PreParserTypeMember TypeMember;
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 const PreParserFormalParameters& parameters, FunctionKind kind, 1485 const PreParserFormalParameters& parameters, FunctionKind kind,
1482 FunctionLiteral::FunctionType function_type, bool* ok) { 1486 FunctionLiteral::FunctionType function_type, bool* ok) {
1483 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1487 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1484 kind, function_type, ok); 1488 kind, function_type, ok);
1485 } 1489 }
1486 1490
1487 } // namespace internal 1491 } // namespace internal
1488 } // namespace v8 1492 } // namespace v8
1489 1493
1490 #endif // V8_PARSING_PREPARSER_H 1494 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698