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

Side by Side Diff: src/ast.h

Issue 329413002: Throw syntax error when a getter/setter has the wrong number of params (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test exception Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/parser.h » ('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_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 enum IsParenthesizedFlag { 2290 enum IsParenthesizedFlag {
2291 kIsParenthesized, 2291 kIsParenthesized,
2292 kNotParenthesized 2292 kNotParenthesized
2293 }; 2293 };
2294 2294
2295 enum IsGeneratorFlag { 2295 enum IsGeneratorFlag {
2296 kIsGenerator, 2296 kIsGenerator,
2297 kNotGenerator 2297 kNotGenerator
2298 }; 2298 };
2299 2299
2300 enum ArityRestriction {
2301 NORMAL_ARITY,
2302 GETTER_ARITY,
2303 SETTER_ARITY
2304 };
2305
2300 DECLARE_NODE_TYPE(FunctionLiteral) 2306 DECLARE_NODE_TYPE(FunctionLiteral)
2301 2307
2302 Handle<String> name() const { return name_; } 2308 Handle<String> name() const { return name_; }
2303 Scope* scope() const { return scope_; } 2309 Scope* scope() const { return scope_; }
2304 ZoneList<Statement*>* body() const { return body_; } 2310 ZoneList<Statement*>* body() const { return body_; }
2305 void set_function_token_position(int pos) { function_token_position_ = pos; } 2311 void set_function_token_position(int pos) { function_token_position_ = pos; }
2306 int function_token_position() const { return function_token_position_; } 2312 int function_token_position() const { return function_token_position_; }
2307 int start_position() const; 2313 int start_position() const;
2308 int end_position() const; 2314 int end_position() const;
2309 int SourceSize() const { return end_position() - start_position(); } 2315 int SourceSize() const { return end_position() - start_position(); }
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
3338 3344
3339 private: 3345 private:
3340 Zone* zone_; 3346 Zone* zone_;
3341 Visitor visitor_; 3347 Visitor visitor_;
3342 }; 3348 };
3343 3349
3344 3350
3345 } } // namespace v8::internal 3351 } } // namespace v8::internal
3346 3352
3347 #endif // V8_AST_H_ 3353 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698