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 ignore_html_comments() const { |
| 125 return !script_.is_null() && script_->origin_options().SkipHtmlComments(); |
| 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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 | 1241 |
1238 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1242 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1239 return parser_->ParseDoExpression(ok); | 1243 return parser_->ParseDoExpression(ok); |
1240 } | 1244 } |
1241 | 1245 |
1242 | 1246 |
1243 } // namespace internal | 1247 } // namespace internal |
1244 } // namespace v8 | 1248 } // namespace v8 |
1245 | 1249 |
1246 #endif // V8_PARSING_PARSER_H_ | 1250 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |