X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..4e4e5a6f2694187498445a6ac6f1634ce8141119:/parser/SourceProvider.h diff --git a/parser/SourceProvider.h b/parser/SourceProvider.h index 07da9e0..1c59eed 100644 --- a/parser/SourceProvider.h +++ b/parser/SourceProvider.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,10 +34,13 @@ namespace JSC { + enum SourceBOMPresence { SourceHasNoBOMs, SourceCouldHaveBOMs }; + class SourceProvider : public RefCounted { public: - SourceProvider(const UString& url) + SourceProvider(const UString& url, SourceBOMPresence hasBOMs = SourceCouldHaveBOMs) : m_url(url) + , m_hasBOMs(hasBOMs) { } virtual ~SourceProvider() { } @@ -49,8 +52,11 @@ namespace JSC { const UString& url() { return m_url; } intptr_t asID() { return reinterpret_cast(this); } + SourceBOMPresence hasBOMs() const { return m_hasBOMs; } + private: UString m_url; + SourceBOMPresence m_hasBOMs; }; class UStringSourceProvider : public SourceProvider {