36 while (!m_Input.IsEOF()) {
37 wchar_t wch = m_Input.GetChar();
45 if (m_Input.GetNextChar() ==
'*') {
46 SaveMode(Mode::kRuleSet);
47 m_eMode = Mode::kComment;
54 }
else if (IsSelectorStart(wch)) {
55 m_eMode = Mode::kSelector;
68 if (!m_Output.IsEmpty())
72 if (!m_Output.IsEmpty())
75 SaveMode(Mode::kRuleSet);
76 m_eMode = Mode::kPropertyName;
79 if (m_Input.GetNextChar() ==
'*') {
80 SaveMode(Mode::kSelector);
81 m_eMode = Mode::kComment;
82 if (!m_Output.IsEmpty())
88 m_Output.AppendCharIfNotLeadingBlank(wch);
93 case Mode::kPropertyName:
97 m_eMode = Mode::kPropertyValue;
106 if (m_Input.GetNextChar() ==
'*') {
107 SaveMode(Mode::kPropertyName);
108 m_eMode = Mode::kComment;
109 if (!m_Output.IsEmpty())
115 m_Output.AppendCharIfNotLeadingBlank(wch);
120 case Mode::kPropertyValue:
126 m_eMode = Mode::kPropertyName;
129 if (m_Input.GetNextChar() ==
'*') {
130 SaveMode(Mode::kPropertyValue);
131 m_eMode = Mode::kComment;
132 if (!m_Output.IsEmpty())
138 m_Output.AppendCharIfNotLeadingBlank(wch);
144 if (wch ==
'*' && m_Input.GetNextChar() ==
'/') {
153 if (m_eMode == Mode::kPropertyValue && !m_Output.IsEmpty())