1 // Copyright 2017 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCRT_CSS_CFX_CSSVALUELISTPARSER_H_ 8 #define CORE_FXCRT_CSS_CFX_CSSVALUELISTPARSER_H_ 9 10 #include "core/fxcrt/css/cfx_css.h" 11 #include "core/fxcrt/fx_system.h" 12 13 class CFX_CSSValueListParser { 14 public: 15 CFX_CSSValueListParser(const wchar_t* psz, int32_t iLen, wchar_t separator); 16 17 bool NextValue(CFX_CSSPrimitiveType* eType, 18 const wchar_t** pStart, 19 int32_t* iLength); UseCommaSeparator()20 void UseCommaSeparator() { m_Separator = ','; } 21 22 private: 23 int32_t SkipTo(wchar_t wch, bool breakOnSpace, bool matchBrackets); 24 25 wchar_t m_Separator; 26 const wchar_t* m_pCur; 27 const wchar_t* m_pEnd; 28 }; 29 30 #endif // CORE_FXCRT_CSS_CFX_CSSVALUELISTPARSER_H_ 31