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 |
124 //-------------------------------------------------------------------------- | 128 //-------------------------------------------------------------------------- |
125 // TODO(titzer): these should not be part of ParseInfo. | 129 // TODO(titzer): these should not be part of ParseInfo. |
126 //-------------------------------------------------------------------------- | 130 //-------------------------------------------------------------------------- |
127 Isolate* isolate() { return isolate_; } | 131 Isolate* isolate() { return isolate_; } |
128 Handle<JSFunction> closure() { return closure_; } | 132 Handle<JSFunction> closure() { return closure_; } |
129 Handle<SharedFunctionInfo> shared_info() { return shared_; } | 133 Handle<SharedFunctionInfo> shared_info() { return shared_; } |
130 Handle<Script> script() { return script_; } | 134 Handle<Script> script() { return script_; } |
131 Handle<Context> context() { return context_; } | 135 Handle<Context> context() { return context_; } |
132 void clear_script() { script_ = Handle<Script>::null(); } | 136 void clear_script() { script_ = Handle<Script>::null(); } |
133 void set_isolate(Isolate* isolate) { isolate_ = isolate; } | 137 void set_isolate(Isolate* isolate) { isolate_ = isolate; } |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 | 1251 |
1248 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1252 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1249 return parser_->ParseDoExpression(ok); | 1253 return parser_->ParseDoExpression(ok); |
1250 } | 1254 } |
1251 | 1255 |
1252 | 1256 |
1253 } // namespace internal | 1257 } // namespace internal |
1254 } // namespace v8 | 1258 } // namespace v8 |
1255 | 1259 |
1256 #endif // V8_PARSING_PARSER_H_ | 1260 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |