| 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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
| 6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void set_unicode_cache(UnicodeCache* unicode_cache) { | 114 void set_unicode_cache(UnicodeCache* unicode_cache) { |
| 115 unicode_cache_ = unicode_cache; | 115 unicode_cache_ = unicode_cache; |
| 116 } | 116 } |
| 117 | 117 |
| 118 uintptr_t stack_limit() { return stack_limit_; } | 118 uintptr_t stack_limit() { return stack_limit_; } |
| 119 void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } | 119 void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } |
| 120 | 120 |
| 121 uint32_t hash_seed() { return hash_seed_; } | 121 uint32_t hash_seed() { return hash_seed_; } |
| 122 void set_hash_seed(uint32_t hash_seed) { hash_seed_ = hash_seed; } | 122 void set_hash_seed(uint32_t hash_seed) { hash_seed_ = hash_seed; } |
| 123 | 123 |
| 124 bool allow_html_comments() const { | |
| 125 return !script_.is_null() && script_->origin_options().AllowHtmlComments(); | |
| 126 } | |
| 127 | |
| 128 //-------------------------------------------------------------------------- | 124 //-------------------------------------------------------------------------- |
| 129 // TODO(titzer): these should not be part of ParseInfo. | 125 // TODO(titzer): these should not be part of ParseInfo. |
| 130 //-------------------------------------------------------------------------- | 126 //-------------------------------------------------------------------------- |
| 131 Isolate* isolate() { return isolate_; } | 127 Isolate* isolate() { return isolate_; } |
| 132 Handle<JSFunction> closure() { return closure_; } | 128 Handle<JSFunction> closure() { return closure_; } |
| 133 Handle<SharedFunctionInfo> shared_info() { return shared_; } | 129 Handle<SharedFunctionInfo> shared_info() { return shared_; } |
| 134 Handle<Script> script() { return script_; } | 130 Handle<Script> script() { return script_; } |
| 135 Handle<Context> context() { return context_; } | 131 Handle<Context> context() { return context_; } |
| 136 void clear_script() { script_ = Handle<Script>::null(); } | 132 void clear_script() { script_ = Handle<Script>::null(); } |
| 137 void set_isolate(Isolate* isolate) { isolate_ = isolate; } | 133 void set_isolate(Isolate* isolate) { isolate_ = isolate; } |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 | 1247 |
| 1252 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1248 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1253 return parser_->ParseDoExpression(ok); | 1249 return parser_->ParseDoExpression(ok); |
| 1254 } | 1250 } |
| 1255 | 1251 |
| 1256 | 1252 |
| 1257 } // namespace internal | 1253 } // namespace internal |
| 1258 } // namespace v8 | 1254 } // namespace v8 |
| 1259 | 1255 |
| 1260 #endif // V8_PARSING_PARSER_H_ | 1256 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |