diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /parser/htmlparser/nsHTMLTokenizer.cpp | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'parser/htmlparser/nsHTMLTokenizer.cpp')
-rw-r--r-- | parser/htmlparser/nsHTMLTokenizer.cpp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/parser/htmlparser/nsHTMLTokenizer.cpp b/parser/htmlparser/nsHTMLTokenizer.cpp new file mode 100644 index 000000000..f60a48c3c --- /dev/null +++ b/parser/htmlparser/nsHTMLTokenizer.cpp @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set sw=2 ts=2 et tw=78: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + +/** + * @file nsHTMLTokenizer.cpp + * This is an implementation of the nsITokenizer interface. + * This file contains the implementation of a tokenizer to tokenize an HTML + * document. It attempts to do so, making tradeoffs between compatibility with + * older parsers and the SGML specification. Note that most of the real + * "tokenization" takes place in nsHTMLTokens.cpp. + */ + +#include "nsHTMLTokenizer.h" +#include "nsIParser.h" +#include "nsParserConstants.h" + +/************************************************************************ + And now for the main class -- nsHTMLTokenizer... + ************************************************************************/ + +/** + * Satisfy the nsISupports interface. + */ +NS_IMPL_ISUPPORTS(nsHTMLTokenizer, nsITokenizer) + +/** + * Default constructor + */ +nsHTMLTokenizer::nsHTMLTokenizer() +{ + // TODO Assert about:blank-ness. +} + +nsresult +nsHTMLTokenizer::WillTokenize(bool aIsFinalChunk) +{ + return NS_OK; +} + +/** + * This method is repeatedly called by the tokenizer. + * Each time, we determine the kind of token we're about to + * read, and then we call the appropriate method to handle + * that token type. + * + * @param aScanner The source of our input. + * @param aFlushTokens An OUT parameter to tell the caller whether it should + * process our queued tokens up to now (e.g., when we + * reach a <script>). + * @return Success or error + */ +nsresult +nsHTMLTokenizer::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens) +{ + return kEOF; +} |