Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/parser/htmlparser/nsHTMLTokenizer.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set sw=2 ts=2 et tw=78: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
8
/**
9
 * @file nsHTMLTokenizer.cpp
10
 * This is an implementation of the nsITokenizer interface.
11
 * This file contains the implementation of a tokenizer to tokenize an HTML
12
 * document. It attempts to do so, making tradeoffs between compatibility with
13
 * older parsers and the SGML specification. Note that most of the real
14
 * "tokenization" takes place in nsHTMLTokens.cpp.
15
 */
16
17
#include "nsHTMLTokenizer.h"
18
#include "nsIParser.h"
19
20
/************************************************************************
21
  And now for the main class -- nsHTMLTokenizer...
22
 ************************************************************************/
23
24
/**
25
 * Satisfy the nsISupports interface.
26
 */
27
NS_IMPL_ISUPPORTS(nsHTMLTokenizer, nsITokenizer)
28
29
/**
30
 * Default constructor
31
 */
32
nsHTMLTokenizer::nsHTMLTokenizer()
33
0
{
34
0
  // TODO Assert about:blank-ness.
35
0
}
36
37
nsresult
38
nsHTMLTokenizer::WillTokenize(bool aIsFinalChunk)
39
0
{
40
0
  return NS_OK;
41
0
}
42
43
/**
44
 * This method is repeatedly called by the tokenizer. 
45
 * Each time, we determine the kind of token we're about to 
46
 * read, and then we call the appropriate method to handle
47
 * that token type.
48
 *  
49
 * @param  aScanner The source of our input.
50
 * @param  aFlushTokens An OUT parameter to tell the caller whether it should
51
 *                      process our queued tokens up to now (e.g., when we
52
 *                      reach a <script>).
53
 * @return Success or error
54
 */
55
nsresult
56
nsHTMLTokenizer::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
57
0
{
58
0
  return NS_ERROR_HTMLPARSER_EOF;
59
0
}