dom/xslt/xslt/txPatternParser.h
author btian <btian@mozilla.com>
Fri, 14 Jul 2017 09:56:33 +0800
changeset 369216 10677a3988fc028ae07c324f410d1c520bcd6082
parent 365758 2915d4b7849612e583048650beabe33bad2cfeca
child 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1379925 - Part 2: Revise method |updateWith| based on spec change. r=baku MozReview-Commit-ID: FpTGFlMvl0S

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */

#ifndef TX_PATTERNPARSER_H
#define TX_PATTERNPARSER_H

#include "txXSLTPatterns.h"
#include "txExprParser.h"

class txStylesheetCompilerState;

class txPatternParser : public txExprParser
{
public:
    static nsresult createPattern(const nsString& aPattern,
                                  txIParseContext* aContext,
                                  txPattern** aResult);
protected:
    static nsresult createUnionPattern(txExprLexer& aLexer,
                                       txIParseContext* aContext,
                                       txPattern*& aPattern);
    static nsresult createLocPathPattern(txExprLexer& aLexer,
                                         txIParseContext* aContext,
                                         txPattern*& aPattern);
    static nsresult createIdPattern(txExprLexer& aLexer,
                                    txPattern*& aPattern);
    static nsresult createKeyPattern(txExprLexer& aLexer,
                                     txIParseContext* aContext,
                                     txPattern*& aPattern);
    static nsresult createStepPattern(txExprLexer& aLexer,
                                      txIParseContext* aContext,
                                      txPattern*& aPattern);
};

#endif // TX_PATTERNPARSER_H